~sbackup-team/nssbackup/system-soft-restore

« back to all changes in this revision

Viewing changes to NSsbackup/src/nssbackup/ui/SBRestoreGTK.py

  • Committer: Oumar Aziz OUATTARA (alias wattazoum)
  • Date: 2007-11-04 16:23:26 UTC
  • Revision ID: wattazoum@gmail.com-20071104162326-s4tftk2qah6b8r6m
Soft restore button added and mapped

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
                self.widgets["calendar"].select_month(today[1]-1,today[0])
86
86
                self.widgets["calendar"].select_day(today[2])
87
87
                self.on_calendar_day_selected()
 
88
                
 
89
                # check for dpkg to activate debian only part 
 
90
                try:
 
91
                        getLogger().debug(_("Checking packages File "))
 
92
                        command = "dpkg --version"
 
93
                        s = os.popen( command )
 
94
                        version = s.read()
 
95
                        s.close()
 
96
                        getLogger().debug("DPKG found : " + version)
 
97
                        self.widgets['softRestoreButton'].set_sensitive(True)
 
98
                except Exception, e:
 
99
                        getLogger().info(_("dpkg not found. Disabling functionality : ") + str(e))
 
100
                        self.widgets['softRestoreButton'].set_sensitive(False)
 
101
                
88
102
        
89
103
        #----------------------------------------------------------------------
90
104
 
114
128
                        'restoreas',
115
129
                        'revert',
116
130
                        'revertas',
 
131
                        'softRestoreButton',
117
132
                        ]
118
133
 
119
134
                handlers = [
131
146
                        'on_restoreas_clicked',
132
147
                        'on_revert_clicked',
133
148
                        'on_revertas_clicked',
 
149
                        'on_softRestoreButton_clicked',
134
150
                        ]
135
151
 
136
152
                top_window = 'restorewindow'
427
443
                        dialog = gtk.MessageDialog(flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, buttons=gtk.BUTTONS_CLOSE, message_format=str(e))
428
444
                        dialog.run()
429
445
                        dialog.destroy()
 
446
                        
 
447
        def on_softRestoreButton_clicked(self, *args):
 
448
                """
 
449
                """
430
450
        
431
 
#----------------------------------------------------------------------
 
451
        #----------------------------------------------------------------------
432
452
 
433
453
def main(argv):
434
454
 
435
455
        w = SBRestoreGTK()
436
456
        w.show()
437
 
        gtk.main()
 
 
b'\\ No newline at end of file'
 
457
        gtk.main()
 
458
 
 
459
 
 
460