Ticket #200: 0001-Do-not-hide-when-showing-rename-dialog.patch

File 0001-Do-not-hide-when-showing-rename-dialog.patch, 2.0 KB (added by SnapShot, 3 years ago)
  • src/guake.py

    From 0998b171671a3a8758f584894d24e64e01377f47 Mon Sep 17 00:00:00 2001
    From: Aleksandar Krsteski <alekrsteski@gmail.com>
    Date: Sat, 27 Feb 2010 14:48:02 +0100
    Subject: [PATCH] Do not hide when showing rename dialog
    
    Guake is hiding when showing rename dialog and hide in lose focus
    is enabled. This patch adds variable to disable lose focus hiding
    that we may use in other situations.
    ---
     src/guake.py |   10 +++++++++-
     1 files changed, 9 insertions(+), 1 deletions(-)
    
    diff --git a/src/guake.py b/src/guake.py
    index 08ade24..0458a07 100644
    a b  
    584584        self.get_widget('tab-menu').connect('hide', hide_context_menu) 
    585585        self.window.connect('focus-out-event', self.on_window_losefocus) 
    586586 
     587        # Flag to completly disable losefocus hiding 
     588        self.disable_losefocus_hiding = False 
     589 
    587590        # this line is important to resize the main window and make it 
    588591        # smaller. 
    589592        self.window.set_geometry_hints(min_width=1, min_height=1) 
     
    659662        """Hides terminal main window when it loses the focus and if 
    660663        the window_losefocus gconf variable is True. 
    661664        """ 
     665        if self.disable_losefocus_hiding or self.showing_context_menu: 
     666            return 
     667 
    662668        value = self.client.get_bool(KEY('/general/window_losefocus')) 
    663669        visible = window.get_property('visible') 
    664         if value and visible and not self.showing_context_menu: 
     670        if value and visible: 
    665671            self.losefocus_time = \ 
    666672                gtk.gdk.x11_get_server_time(self.window.window) 
    667673            self.hide() 
     
    979985        dialog.add_action_widget(entry, gtk.RESPONSE_ACCEPT) 
    980986        entry.reparent(vbox) 
    981987 
     988        self.disable_losefocus_hiding = True 
    982989        response = dialog.run() 
    983990        dialog.destroy() 
     991        self.disable_losefocus_hiding = False 
    984992 
    985993        if response == gtk.RESPONSE_ACCEPT: 
    986994            self.selected_tab.set_label(entry.get_text())