Changeset 6e52bd6bf321347c929997b1f443880fe943884d

Show
Ignore:
Timestamp:
02/25/09 00:34:31 (3 years ago)
Author:
Lincoln de Sousa <lincoln@…>
Children:
c95bf630f021b6586a8fe1f66cb52041c3015b53
Parents:
c4a0f94bc911001699419c287b7c238f89fcec64
git-committer:
Lincoln de Sousa <lincoln@…> (02/25/09 00:34:31)
Message:

Making the quit shortcut configurable

Another change was that the default value to the quit
feature was changed to "Ctrl+Shift+Q" to make it harder
to clash with keybinding of other app. (Closes: #92)

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • data/guake.schemas

    r1f4c866 r6e52bd6  
    264264                <long>Global keybinding to allow user call guake from each 
    265265                place after it's opened without clicks.</long> 
     266            </locale> 
     267        </schema> 
     268 
     269        <schema> 
     270            <key>/schemas/apps/guake/keybindings/local/quit</key> 
     271            <applyto>/apps/guake/keybindings/local/quit</applyto> 
     272            <owner>guake</owner> 
     273            <type>string</type> 
     274            <default>&lt;Control&gt;&lt;Shift&gt;q</default> 
     275            <locale name="C"> 
     276                <short>Quit</short> 
     277                <long>Quit Guake.</long> 
    266278            </locale> 
    267279        </schema> 
  • src/guake.py

    rd0e6e53 r6e52bd6  
    304304        keys = ['toggle_fullscreen', 'new_tab', 'close_tab', 'rename_tab', 
    305305                'previous_tab', 'next_tab', 'clipboard_copy', 'clipboard_paste', 
     306                'quit', 
    306307                ] 
    307308        for key in keys: 
     
    337338        """ 
    338339        gets = lambda x:self.client.get_string(LKEY(x)) 
     340        key, mask = gtk.accelerator_parse(gets('quit')) 
     341        if key > 0: 
     342            gtk.accel_map_change_entry('<Guake>/Quit', key, mask, True) 
     343            ctxbtn = self.guake.get_widget('context_close') 
     344            ctxbtn.set_accel_path('<Guake>/Quit') 
     345 
    339346        key, mask = gtk.accelerator_parse(gets('new_tab')) 
    340347        if key > 0: 
     
    554561        self.hotkeys = globalhotkeys.GlobalHotkey() 
    555562        self.load_config() 
    556         self.load_accel_map() 
    557563 
    558564        key = self.client.get_string(GKEY('show_hide')) 
     
    751757        self.client.notify(KEY('/general/use_default_font')) 
    752758 
    753     def load_accel_map(self): 
    754         """Sets the accel map of quit context option. 
    755         """ 
    756         key, mask = gtk.accelerator_parse('<Control>q') 
    757         gtk.accel_map_add_entry('<Guake>/Quit', key, mask) 
    758         btn = self.get_widget('context_close') 
    759         btn.set_accel_path('<Guake>/Quit') 
    760  
    761759    def accel_add(self, *args): 
    762760        """Callback to add a new tab. Called by the accel key. 
  • src/prefs.py

    rdb4ceb3 r6e52bd6  
    5555              {'key': LKEY('toggle_fullscreen'), 
    5656               'label': _('Toggle Fullscreen')}, 
     57              {'key': LKEY('quit'), 
     58               'label': _('Quit')}, 
    5759              ]}, 
    5860