This file is indexed.

/usr/share/phatch/phatch/pyWx/wxGlade/dialogs.py is in phatch 0.2.7.1-3.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# -*- coding: utf-8 -*-

# generated by wxGlade 0.5.1cvs on Thu Jun 14 14:07:44 2007 from /home/stani/sync/python/convert/trunk/gui/wxGlade/dialogs.wxg

import wx
from lib.pyWx import folderFileBrowser as ffb
from lib.desktop import USER_FOLDER

class StatusDialog(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: StatusDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_1 = wx.Panel(self, -1)
        self.message = wx.StaticText(self.panel_1, -1, _("Done"))
        self.log = wx.Button(self.panel_1, -1, _("Show &Log"))
        self.report = wx.Button(self.panel_1, -1, _("Show &Images"))
        self.ok = wx.Button(self.panel_1, wx.ID_OK, "")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_button_log, self.log)
        self.Bind(wx.EVT_BUTTON, self.on_button_report, self.report)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: StatusDialog.__set_properties
        self.SetTitle(_("Ready!"))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: StatusDialog.__do_layout
        sizer_18 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_19 = wx.BoxSizer(wx.VERTICAL)
        sizer_20 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_19.Add(self.message, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_20.Add(self.log, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_20.Add(self.report, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_20.Add(self.ok, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_19.Add(sizer_20, 0, wx.ALIGN_RIGHT, 0)
        self.panel_1.SetSizer(sizer_19)
        sizer_18.Add(self.panel_1, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_18)
        sizer_18.Fit(self)
        self.Layout()
        # end wxGlade

    def on_button_report(self, event): # wxGlade: StatusDialog.<event_handler>
        print "Event handler `on_button_report' not implemented!"
        event.Skip()

    def on_button_log(self, event): # wxGlade: StatusDialog.<event_handler>
        print "Event handler `on_button_log' not implemented!"
        event.Skip()

# end of class StatusDialog


class FolderFileBrowser(ffb.PreviewMixin, ffb.Panel):
    def GetTreeLabel(self, label, parent_label):
        return label[:-1].replace(parent_label,'')\
            .replace(USER_FOLDER,'~')

class ImageTreeDialog(wx.Dialog):
    def __init__(self, data, Data, headers, *args, **kwds):
        # begin wxGlade: ImageTreeDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel = wx.Panel(self, -1)
        self.browser = FolderFileBrowser(self.panel, -1, data, Data, headers)
        self.hint = wx.StaticText(self.panel, -1, _("Double click to open or right click for more options."))
        self.cancel = wx.Button(self.panel, wx.ID_CANCEL, "")
        self.ok = wx.Button(self.panel, wx.ID_OK, "")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: ImageTreeDialog.__set_properties
        self.SetTitle(_("Explorer"))
        self.browser.SetFocus()
        self.hint.Enable(False)
        self.ok.SetDefault()
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: ImageTreeDialog.__do_layout
        sizer_14 = wx.BoxSizer(wx.VERTICAL)
        sizer_15 = wx.BoxSizer(wx.VERTICAL)
        sizer_16 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_15.Add(self.browser, 1, wx.EXPAND, 0)
        sizer_16.Add(self.hint, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_16.Add(self.cancel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_16.Add(self.ok, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_15.Add(sizer_16, 0, wx.EXPAND|wx.ALIGN_RIGHT, 0)
        self.panel.SetSizer(sizer_15)
        sizer_14.Add(self.panel, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_14)
        sizer_14.Fit(self)
        self.Layout()
        # end wxGlade

# end of class ImageTreeDialog


class WritePluginDialog(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: WritePluginDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.icon = wx.StaticBitmap(self, -1, wx.NullBitmap)
        self.message = wx.StaticText(self, -1, _("You only need to know PIL to write a plugin for Phatch,"))
        self.template = wx.CheckBox(self, -1, _("&Show template for action plugin"))
        self.path = wx.StaticText(self, -1, _("Path"))
        self.code = wx.TextCtrl(self, -1, _("Code"), style=wx.TE_MULTILINE|wx.TE_READONLY)
        self.help = wx.Button(self, -1, _("&Ask for Help"))
        self.ok_copy_1 = wx.Button(self, wx.ID_OK, _("&OK"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_CHECKBOX, self.on_template, self.template)
        self.Bind(wx.EVT_BUTTON, self.on_help, self.help)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: WritePluginDialog.__set_properties
        self.SetTitle(_("Write Action Plugin"))
        self.icon.SetMinSize((32, 32))
        self.code.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_INFOBK))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: WritePluginDialog.__do_layout
        sizer_7 = wx.BoxSizer(wx.VERTICAL)
        sizer_9 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_11 = wx.BoxSizer(wx.VERTICAL)
        sizer_10 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_9.Add(self.icon, 0, wx.ALL, 6)
        sizer_11.Add(self.message, 0, wx.ALL, 6)
        sizer_11.Add(self.template, 0, wx.ALL, 6)
        sizer_11.Add(self.path, 0, wx.ALL, 6)
        sizer_11.Add(self.code, 1, wx.ALL|wx.EXPAND, 6)
        sizer_10.Add(self.help, 0, wx.ALL|wx.EXPAND, 6)
        sizer_10.Add(self.ok_copy_1, 0, wx.ALL|wx.EXPAND, 6)
        sizer_11.Add(sizer_10, 0, wx.ALIGN_RIGHT, 0)
        sizer_9.Add(sizer_11, 1, wx.EXPAND, 0)
        sizer_7.Add(sizer_9, 0, wx.EXPAND, 0)
        self.SetSizer(sizer_7)
        sizer_7.Fit(self)
        self.Layout()
        # end wxGlade

    def on_help(self, event): # wxGlade: WritePluginDialog.<event_handler>
        print "Event handler `on_help' not implemented!"
        event.Skip()

    def on_template(self, event): # wxGlade: WritePluginDialog.<event_handler>
        print "Event handler `on_template' not implemented"
        event.Skip()

# end of class WritePluginDialog


class ErrorDialog(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: ErrorDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.icon = wx.StaticBitmap(self, -1, wx.NullBitmap)
        self.message = wx.StaticText(self, -1, "")
        self.future_errors = wx.CheckBox(self, -1, _("Apply for future errors        "))
        self.abort = wx.Button(self, wx.ID_ABORT, _("&Abort"))
        self.ignore = wx.Button(self, wx.ID_IGNORE, _("&Skip to Next Action"))
        self.skip = wx.Button(self, wx.ID_FORWARD, _("Skip To Next &Image"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_abort, id=wx.ID_ABORT)
        self.Bind(wx.EVT_BUTTON, self.on_ignore, id=wx.ID_IGNORE)
        self.Bind(wx.EVT_BUTTON, self.on_skip, id=wx.ID_FORWARD)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: ErrorDialog.__set_properties
        self.icon.SetMinSize((32, 32))
        self.ignore.SetDefault()
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: ErrorDialog.__do_layout
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_5 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        sizer_5.Add(self.icon, 0, wx.ALL, 6)
        sizer_2.Add(self.message, 0, wx.ALL, 6)
        sizer_5.Add(sizer_2, 1, wx.EXPAND, 0)
        sizer.Add(sizer_5, 0, wx.EXPAND, 0)
        sizer_4.Add(self.future_errors, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_4.Add(self.abort, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_4.Add(self.ignore, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_4.Add(self.skip, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer.Add(sizer_4, 0, wx.EXPAND, 0)
        self.SetSizer(sizer)
        sizer.Fit(self)
        self.Layout()
        # end wxGlade

    def on_abort(self, event): # wxGlade: ErrorDialog.<event_handler>
        print "Event handler `on_abort' not implemented!"
        event.Skip()

    def on_skip(self, event): # wxGlade: ErrorDialog.<event_handler>
        print "Event handler `on_skip' not implemented!"
        event.Skip()

    def on_ignore(self, event): # wxGlade: ErrorDialog.<event_handler>
        print "Event handler `on_ignore' not implemented!"
        event.Skip()

    def on_details(self, event): # wxGlade: ErrorDialog.<event_handler>
        print "Event handler `on_details' not implemented"
        event.Skip()

# end of class ErrorDialog


class FilesDialog(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: FilesDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX
        wx.Dialog.__init__(self, *args, **kwds)
        self.icon = wx.StaticBitmap(self, -1, wx.NullBitmap)
        self.message = wx.StaticText(self, -1, _("Message"))
        self.list = wx.ListCtrl(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
        self.cancel = wx.Button(self, wx.ID_CANCEL, _("&Abort"))
        self.ok = wx.Button(self, wx.ID_OK, _("&Continue Anyway"))

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: FilesDialog.__set_properties
        self.icon.SetMinSize((32, 32))
        self.ok.SetDefault()
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: FilesDialog.__do_layout
        sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_12 = wx.BoxSizer(wx.VERTICAL)
        sizer_13 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_1.Add(self.icon, 0, wx.ALL, 6)
        sizer_12.Add(self.message, 0, wx.ALL, 6)
        sizer_12.Add(self.list, 1, wx.ALL|wx.EXPAND, 6)
        sizer_13.Add(self.cancel, 0, wx.ALL|wx.EXPAND, 6)
        sizer_13.Add(self.ok, 0, wx.ALL|wx.EXPAND, 6)
        sizer_12.Add(sizer_13, 0, wx.ALIGN_RIGHT, 0)
        sizer_1.Add(sizer_12, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        sizer_1.Fit(self)
        self.Layout()
        # end wxGlade

# end of class FilesDialog

class ExecuteDialog(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: ExecuteDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.sizer_11_copy_4_staticbox = wx.StaticBox(self, -1, _("Options"))
        self.sizer_8_staticbox = wx.StaticBox(self, -1, _("Types"))
        self.browse = wx.Button(self, -1, _("Browse Folder"))
        self.path = wx.TextCtrl(self, -1, "", style=wx.TE_RICH2)
        self.extensions = wx.CheckListBox(self, -1)
        self.source = wx.RadioBox(self, -1, _("Source"), choices=[_("Folder"), _("File(s)"), _("Clipboard")], majorDimension=0, style=wx.RA_SPECIFY_COLS)
        self.stop_for_errors = wx.CheckBox(self, -1, _("Stop for errors"))
        self.check_images_first = wx.CheckBox(self, -1, _("Check images first"))
        self.overwrite_existing_images = wx.CheckBox(self, -1, _("Overwrite existing images"))
        self.recursive = wx.CheckBox(self, -1, _("Include all subfolders"))
        self.always_show_status_dialog = wx.CheckBox(self, -1, _("Always show status dialog when done"))
        self.desktop = wx.CheckBox(self, -1, _("Always save on desktop"))
        self.repeat_label = wx.StaticText(self, -1, _("Repeat images"))
        self.repeat = wx.SpinCtrl(self, -1, "1", min=1, max=9999999)
        self.select = wx.Button(self, wx.ID_DEFAULT, _("&All Types"))
        self.button_1 = wx.Button(self, wx.ID_CANCEL, _("&Cancel"))
        self.ok_copy = wx.Button(self, wx.ID_OK, _("&Batch"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_browse, self.browse)
        self.Bind(wx.EVT_RADIOBOX, self.on_source, self.source)
        self.Bind(wx.EVT_BUTTON, self.on_default, id=wx.ID_DEFAULT)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: ExecuteDialog.__set_properties
        self.source.SetSelection(0)
        self.stop_for_errors.SetValue(1)
        self.check_images_first.SetValue(1)
        self.always_show_status_dialog.SetValue(1)
        self.ok_copy.SetDefault()
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: ExecuteDialog.__do_layout
        grid_sizer = wx.FlexGridSizer(5, 2, 4, 4)
        sizer_10_copy = wx.BoxSizer(wx.VERTICAL)
        sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_6 = wx.BoxSizer(wx.VERTICAL)
        sizer_11_copy_4 = wx.StaticBoxSizer(self.sizer_11_copy_4_staticbox, wx.VERTICAL)
        grid_sizer_1 = wx.FlexGridSizer(1, 2, 6, 6)
        sizer_8 = wx.StaticBoxSizer(self.sizer_8_staticbox, wx.VERTICAL)
        grid_sizer.Add(self.browse, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 6)
        grid_sizer.Add(self.path, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_8.Add(self.extensions, 1, wx.ALL|wx.EXPAND, 6)
        grid_sizer.Add(sizer_8, 1, wx.ALL|wx.EXPAND, 6)
        sizer_10_copy.Add(self.source, 0, wx.ALL|wx.EXPAND, 6)
        sizer_11_copy_4.Add(self.stop_for_errors, 0, wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_11_copy_4.Add(self.check_images_first, 0, 0, 6)
        sizer_11_copy_4.Add(self.overwrite_existing_images, 0, 0, 6)
        sizer_11_copy_4.Add(self.recursive, 0, wx.ALIGN_CENTER_VERTICAL, 6)
        sizer_11_copy_4.Add(self.always_show_status_dialog, 0, 0, 0)
        sizer_11_copy_4.Add(self.desktop, 0, 0, 0)
        grid_sizer_1.Add(self.repeat_label, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.repeat, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        sizer_11_copy_4.Add(grid_sizer_1, 1, 0, 0)
        sizer_10_copy.Add(sizer_11_copy_4, 0, wx.ALL|wx.EXPAND, 6)
        sizer_10_copy.Add((20, 20), 1, wx.EXPAND, 0)
        sizer_10_copy.Add(sizer_6, 0, wx.EXPAND, 0)
        sizer_3.Add(self.select, 0, wx.ALL|wx.EXPAND, 6)
        sizer_3.Add((148, 10), 1, wx.EXPAND, 0)
        sizer_3.Add(self.button_1, 0, wx.ALL|wx.ALIGN_BOTTOM, 6)
        sizer_3.Add(self.ok_copy, 0, wx.ALL|wx.ALIGN_BOTTOM, 6)
        sizer_10_copy.Add(sizer_3, 0, wx.EXPAND, 0)
        grid_sizer.Add(sizer_10_copy, 1, wx.EXPAND, 0)
        self.SetSizer(grid_sizer)
        grid_sizer.Fit(self)
        grid_sizer.AddGrowableRow(1)
        grid_sizer.AddGrowableCol(1)
        self.Layout()
        # end wxGlade
        self.options_sizer = sizer_11_copy_4

    def on_browse(self, event): # wxGlade: ExecuteDialog.<event_handler>
        print "Event handler `on_browse' not implemented!"
        event.Skip()

    def on_source(self, event): # wxGlade: ExecuteDialog.<event_handler>
        print "Event handler `on_source' not implemented!"
        event.Skip()

    def on_default(self, event): # wxGlade: ExecuteDialog.<event_handler>
        print "Event handler `on_default' not implemented!"
        event.Skip()

# end of class ExecuteDialog


if __name__ == "__main__":
    import gettext
    gettext.install("app") # replace with the appropriate catalog name

    app = wx.PySimpleApp(0)
    aboutDialog = StatusDialog(None, -1, "")
    app.SetTopWindow(aboutDialog)
    aboutDialog.Show()
    app.MainLoop()