~ubuntu-branches/ubuntu/trusty/sbackup/trusty

« back to all changes in this revision

Viewing changes to src/sbackup/ui/gtk_rsrc.py

  • Committer: Bazaar Package Importer
  • Author(s): Jean-Peer Lorenz
  • Date: 2010-09-18 18:44:57 UTC
  • Revision ID: james.westby@ubuntu.com-20100918184457-m9mryw5mzu405b2h
Tags: 0.11.2ubuntu1
* New upstream release. LP: #620384
* [Fix] LP: #638072 Exclude rules not working on some dirs
* [Fix] LP: #634356 Exception on reading snapshots in restore ui
* [Fix] LP: #634031 Default behavior incorrectly set to `Cancel` instead
                    of `Retry`
* [Fix] LP: #632605 catch error while closing snapshot file over FTP
* [Fix] LP: #642087 Log. purge not working under certain circumstances
* Workaround for LP #640034 Setting status to attention does not change
                            to specified icon (indicator-application)
* Fix: don't block restore gui on long running tasks
* Fix: don't touch snapshots being upgraded from backup process

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#   Simple Backup - GTK+ GUI resources
 
2
#
 
3
#   Copyright (c)2010: Jean-Peer Lorenz <peer.loz@gmx.net>
 
4
#
 
5
#   This program is free software; you can redistribute it and/or modify
 
6
#   it under the terms of the GNU General Public License as published by
 
7
#   the Free Software Foundation; either version 2 of the License, or
 
8
#   (at your option) any later version.
 
9
#
 
10
#   This program is distributed in the hope that it will be useful,
 
11
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
#   GNU General Public License for more details.
 
14
#
 
15
#   You should have received a copy of the GNU General Public License
 
16
#   along with this program; if not, write to the Free Software
 
17
#   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
#
 
19
 
 
20
 
 
21
CONFIGGUI_TOPWINDOW = 'sbackupConfApp'
 
22
CONFIGGUI_GLADEFILE = 'sbackup-config.glade'
 
23
 
 
24
RESTOREGUI_TOPWINDOW = 'restorewindow'
 
25
RESTOREGUI_GLADEFILE = 'sbackup-restore.glade'
 
26
 
 
27
 
 
28
def get_configgui_widgets():
 
29
    widget_list = [
 
30
        'sbackupConfApp',
 
31
        'menubar',
 
32
        'toolbar',
 
33
        'askSaveDialog',
 
34
        'fusehelplabel',
 
35
        'regexdialog',
 
36
        'ftypedialog',
 
37
        'dialog-vbox4',
 
38
        'vbox18',
 
39
        'ftype_st',
 
40
        'ftype_box',
 
41
        'hbox25',
 
42
        'ftype_custom',
 
43
        'ftype_custom_ex',
 
44
        'cancelbutton',
 
45
        'okbutton',
 
46
        'dialog-vbox5',
 
47
        'vbox19',
 
48
        'regex_box',
 
49
        'cancelbutton2',
 
50
        'okbutton2',
 
51
        'statusBar',
 
52
        'vbox17',
 
53
        'save',
 
54
        'save_as',
 
55
        'saveButton',
 
56
        'exit',
 
57
        'imagemenuitem6',
 
58
        'imagemenuitem7',
 
59
        'imagemenuitem8',
 
60
        'imagemenuitem9',
 
61
        'about',
 
62
        'vbox1',
 
63
        'notebook',
 
64
#
 
65
# general/main page
 
66
        'label_general_page',
 
67
        'vbox_general_page',
 
68
        'cformat',
 
69
        'splitsizeCB',
 
70
        'splitsizeSB',
 
71
        'splitsizevbox',
 
72
        'label_splitsize_custom',
 
73
#
 
74
        'vbox3',
 
75
        'scrolledwindow1',
 
76
        'includetv',
 
77
        'inc_addfile',
 
78
        'hbox4',
 
79
        'inc_adddir',
 
80
        'hbox5',
 
81
        'inc_del',
 
82
        'notebook2',
 
83
        'vbox4',
 
84
        'scrolledwindow2',
 
85
        'ex_pathstv',
 
86
        'ex_addfile1',
 
87
        'hbox6',
 
88
        'ex_adddir',
 
89
        'hbox7',
 
90
        'ex_delpath',
 
91
        'vbox5',
 
92
        'scrolledwindow3',
 
93
        'ex_ftypetv',
 
94
        'ex_addftype',
 
95
        'ex_delftype',
 
96
        'vbox6',
 
97
        'scrolledwindow4',
 
98
        'ex_regextv',
 
99
        'ex_addregex',
 
100
        'ex_delregex',
 
101
        'vbox7',
 
102
        'hbox8',
 
103
        'ex_max',
 
104
        'ex_maxsize',
 
105
        'vbox_destination_page',
 
106
        'dest1',
 
107
        'dest2',
 
108
        'label_default_target',
 
109
        'hbox9',
 
110
        'dest_localpath',
 
111
        'dest3',
 
112
        'hbox10',
 
113
        'dest_remote',
 
114
#            'dest_remotetest',
 
115
        'dest_remote_light',
 
116
        'hbox11',
 
117
        'dest_unusable',
 
118
#
 
119
#            schedule page
 
120
        'label_schedule_page',
 
121
        'vbox_schedule_page',
 
122
        'table_schedule',
 
123
        'rdbtn_no_schedule',
 
124
        'rdbtn_simple_schedule',
 
125
        'rdbtn_custom_schedule',
 
126
        'label_simple_schedule_freq',
 
127
        'label_custom_cronline',
 
128
        'txtfld_custom_cronline',
 
129
        'cmbbx_simple_schedule_freq',
 
130
        'lnkbtn_help_schedule',
 
131
        'hbox_schedule_footer',
 
132
        'hbox_schedule_infotext',
 
133
        'img_schedule_infotext',
 
134
        'label_schedule_infotext',
 
135
#
 
136
        'time_maxinc',
 
137
        'purgevbox',
 
138
        'purgecheckbox',
 
139
        'hbox16',
 
140
        'purgeradiobutton',
 
141
        'purgedays',
 
142
        'purgelabel',
 
143
        'hbox17',
 
144
        'logpurgeradiobutton',
 
145
        'purgelabel2',
 
146
        'hbox18',
 
147
        'reportvbox',
 
148
        'hbox19',
 
149
        'table2',
 
150
        'loglevelcombobox',
 
151
        'logfilechooser',
 
152
        'hbox20',
 
153
        'vbox11',
 
154
        'vbox12',
 
155
        'table3',
 
156
        'smtpport',
 
157
        'smtpserver',
 
158
        'smtpto',
 
159
        'smtpfrom',
 
160
        'hbox21',
 
161
        'testMailButton',
 
162
        'vbox13',
 
163
        'vbox14',
 
164
        'smtplogincheckbox',
 
165
        'smtplogininfo',
 
166
        'smtppassword',
 
167
        'smtplogin',
 
168
        'vbox15',
 
169
        'TLScheckbutton',
 
170
        'TLSinfos',
 
171
        'TLSradiobutton',
 
172
        'SSLradiobutton',
 
173
        'crtfilechooser',
 
174
        'keyfilechooser',
 
175
        'label_certificate',
 
176
        'label_key',
 
177
#
 
178
        'pluginscombobox',
 
179
        'ProfileManagerDialog',
 
180
        'profilesListTreeView',
 
181
        'addProfileButton',
 
182
        'removeProfileButton',
 
183
        'editProfileButton',
 
184
        'closeProfileManagerButton',
 
185
        'askNewPrfNameDialog',
 
186
        'enableNewPrfCB',
 
187
        'newPrfNameEntry',
 
188
        'followlinks',
 
189
# dialog set default settings
 
190
        'dialog_default_settings',
 
191
        'label_dialog_default_settings_content',
 
192
        'btn_set_default_settings',
 
193
        'btn_cancel_default_settings',
 
194
#
 
195
# dialog set remote destination
 
196
        'dialog_connect_remote',
 
197
        'btn_set_remote',
 
198
        'btn_cancel_remote',
 
199
        'btn_connect_remote',
 
200
        'cmb_set_remote_service',
 
201
        'entry_set_remote_server',
 
202
        'entry_set_remote_port',
 
203
        'entry_set_remote_dir',
 
204
        'entry_set_remote_user',
 
205
        'entry_set_remote_pass',
 
206
        'label_set_remote_user',
 
207
        'label_set_remote_pass',
 
208
        'checkbtn_show_password',
 
209
# dialog make backup
 
210
        'dialog_make_backup',
 
211
        'checkbtn_make_backup_full',
 
212
        'btn_make_backup',
 
213
        'btn_cancel_make_backup'
 
214
        ]
 
215
    return widget_list
 
216
 
 
217
 
 
218
def get_configgui_handlers():
 
219
    handlers = [
 
220
        'on_ftype_toggled',
 
221
        'on_ftype_st_box_changed',
 
222
        'on_ftype_custom_ex_changed',
 
223
        'on_save_activate',
 
224
        'on_save_as_activate',
 
225
        'on_exit_activate',
 
226
        'on_prfManager_activate',
 
227
        'on_menu_about_activate',
 
228
        'on_menu_help_activate',
 
229
        'on_reload_clicked',
 
230
        'on_save_clicked',
 
231
        'on_backup_clicked',
 
232
        'on_cformat_changed',
 
233
        'on_splitsizeCB_changed',
 
234
        'on_splitsizeSB_value_changed',
 
235
        'on_inc_addfile_clicked',
 
236
        'on_inc_adddir_clicked',
 
237
        'on_inc_del_clicked',
 
238
        'on_ex_addfile_clicked',
 
239
        'on_ex_adddir_clicked',
 
240
        'on_ex_delpath_clicked',
 
241
        'on_ex_addftype_clicked',
 
242
        'on_ex_delftype_clicked',
 
243
        'on_ex_addregex_clicked',
 
244
        'on_ex_delregex_clicked',
 
245
        'on_ex_max_toggled',
 
246
        'on_ex_maxsize_changed',
 
247
        'on_dest1_toggled',
 
248
        'on_dest_localpath_selection_changed',
 
249
#     connect to remote host
 
250
        'on_btn_set_remote_clicked',
 
251
        'on_cmb_set_remote_service_changed',
 
252
        'on_checkbtn_show_password_toggled',
 
253
#     scheduling
 
254
        'on_cmbbx_simple_schedule_freq_changed',
 
255
        'on_rdbtn_schedule_toggled',
 
256
        'on_txtfld_custom_cronline_changed',
 
257
#
 
258
        'on_time_maxinc_changed',
 
259
        'on_purgecheckbox_toggled',
 
260
        'on_purgeradiobutton_toggled',
 
261
        'on_purgedays_changed',
 
262
        'on_logfilechooser_selection_changed',
 
263
        'on_loglevelcombobox_changed',
 
264
        'on_smtpfrom_changed',
 
265
        'on_smtpto_changed',
 
266
        'on_smtpserver_changed',
 
267
        'on_smtpport_changed',
 
268
        'on_testMailButton_clicked',
 
269
        'on_smtplogincheckbox_toggled',
 
270
        'on_smtplogin_changed',
 
271
        'on_smtppassword_changed',
 
272
        'on_TLScheckbutton_toggled',
 
273
        'on_TLSradiobutton_toggled',
 
274
        'on_crtfilechooser_selection_changed',
 
275
        'on_keyfilechooser_selection_changed',
 
276
        'on_addProfileButton_clicked',
 
277
        'on_removeProfileButton_clicked',
 
278
        'on_editProfileButton_clicked',
 
279
        'on_closeProfileManagerButton_clicked',
 
280
        'on_includetv_key_press_event',
 
281
        'on_ex_pathstv_key_press_event',
 
282
        'on_ex_ftypetv_key_press_event',
 
283
        'on_ex_regextv_key_press_event',
 
284
        'on_followlinks_toggled',
 
285
#
 
286
        'on_menu_set_default_settings_activate',
 
287
 
 
288
        'on_exit_activate',
 
289
        'on_sbackupConfApp_delete_event',
 
290
        'on_sbackupConfApp_destroy'
 
291
        ]
 
292
    return handlers
 
293
 
 
294
 
 
295
def get_restoregui_widgets():
 
296
    widget_list = [
 
297
        'restorewindow',
 
298
        'defaultfolderlabel',
 
299
        'defaultradiob',
 
300
        'customradiob',
 
301
        'custominfos',
 
302
        'customentry',
 
303
        'customchooser',
 
304
        'customapply',
 
305
        'calendar',
 
306
        'snplist',
 
307
        'scrolledwindow1',
 
308
        'snplisttreeview',
 
309
        'snpdetails',
 
310
        'scrolledwindow2',
 
311
        'restoreExpander',
 
312
        'snpmanExpander',
 
313
        'filelisttreeview',
 
314
        'buttonspool',
 
315
        'restore',
 
316
        'restoreas',
 
317
        'revert',
 
318
        'revertas',
 
319
        'upgradeBox',
 
320
        'upgradeButton',
 
321
        'RebaseBox',
 
322
        'txt_current_base',
 
323
        'rebaseButton',
 
324
        'deleteBox',
 
325
        'deleteButton',
 
326
        'snphistoryFrame',
 
327
        'historytv',
 
328
        'statusbar',
 
329
        'progressbar',
 
330
        'box_management',
 
331
        'box_restorewin_content',
 
332
        'vbox_customdest'
 
333
        ]
 
334
    return widget_list
 
335
 
 
336
 
 
337
def get_restoregui_handlers():
 
338
    handlers = [
 
339
        'gtk_main_quit',
 
340
        'on_defaultradiob_toggled',
 
341
        'on_customchooser_clicked',
 
342
        'on_customapply_clicked',
 
343
        'on_calendar_month_changed',
 
344
        'on_calendar_day_selected',
 
345
        'on_snplisttreeview_cursor_changed',
 
346
        'on_filelisttreeview_row_expanded',
 
347
        'on_filelisttreeview_cursor_changed',
 
348
        'on_filelisttreeview_unselect_all',
 
349
        'on_restore_clicked',
 
350
        'on_restoreas_clicked',
 
351
        'on_revert_clicked',
 
352
        'on_revertas_clicked',
 
353
        'on_restoreExpander_activate',
 
354
        'on_snpmanExpander_activate',
 
355
        'on_upgradeButton_clicked',
 
356
        'on_rebaseButton_toggled',
 
357
        'on_deleteButton_clicked',
 
358
        'on_exportmanExpander_activate'
 
359
        ]
 
360
    return handlers
 
361