Changeset 1fa4120a0445d0692f6e35fbc512ed95c16d9080

Show
Ignore:
Timestamp:
12/16/08 11:32:57 (3 years ago)
Author:
Lincoln de Sousa <lincoln@…>
Children:
dc6d6ff67aa9be656398ff38c2dc74af60162cc2
Parents:
f900ed0e2fd323b79bc64e5297248bcbeb80480d
git-committer:
Lincoln de Sousa <lincoln@…> (12/16/08 11:32:57)
Message:

Making the popup notification be shown in the end of
the Guake class constructor, it was done to make sure
that guake really started before showing this notification.

This patch is a contribution made by Pierre-Yves aka pingou =)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/guake.py

    rf900ed0 r1fa4120  
    104104        label = gtk.accelerator_get_label(keyval, mask) 
    105105 
    106         filename = pixmapfile('guake-notification.png') 
    107         if not globalhotkeys.bind(key, self.show_hide): 
    108             n = pynotify.Notification(_('Guake!'), 
    109                 _('A problem happened when binding <b>%s</b> key.\n' 
    110                   'Please use guake properties form to choose another ' 
    111                   'key') % label, filename) 
    112         else: 
    113             n = pynotify.Notification(_('Guake!'), 
    114                 _('Guake is already running,\n' 
    115                   'press <b>%s</b> to use it.') % label, filename) 
    116         n.show() 
    117  
    118106        # trayicon! 
    119107        tray_icon = GuakeStatusIcon() 
     
    165153        self.window.set_geometry_hints(min_width=1, min_height=1) 
    166154        self.window.connect('focus-out-event', self.on_window_lostfocus) 
     155        self.get_widget('context-menu').set_accel_group(self.accel_group) 
    167156 
    168157        # resizer stuff 
    169158        self.resizer.connect('motion-notify-event', self.on_resizer_drag) 
    170              
    171         self.get_widget('context-menu').set_accel_group(self.accel_group) 
    172159 
    173160        self.load_accel_map() 
     
    177164        self.add_tab() 
    178165        self.toggle_ontop() 
     166 
     167        # Pop-up that shows that guake is working properly (if not 
     168        # unset in the preferences windows) 
     169        filename = pixmapfile('guake-notification.png') 
     170        if not globalhotkeys.bind(key, self.show_hide): 
     171            n = pynotify.Notification(_('Guake!'), 
     172                _('A problem happened when binding <b>%s</b> key.\n' 
     173                  'Please use guake properties form to choose another ' 
     174                  'key') % label, filename) 
     175        else: 
     176            n = pynotify.Notification(_('Guake!'), 
     177                _('Guake is already running,\n' 
     178                  'press <b>%s</b> to use it.') % label, filename) 
     179        n.show() 
    179180 
    180181    def on_resizer_drag(self, widget, event):