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
|
|
| 584 | 584 | self.get_widget('tab-menu').connect('hide', hide_context_menu) |
| 585 | 585 | self.window.connect('focus-out-event', self.on_window_losefocus) |
| 586 | 586 | |
| | 587 | # Flag to completly disable losefocus hiding |
| | 588 | self.disable_losefocus_hiding = False |
| | 589 | |
| 587 | 590 | # this line is important to resize the main window and make it |
| 588 | 591 | # smaller. |
| 589 | 592 | self.window.set_geometry_hints(min_width=1, min_height=1) |
| … |
… |
|
| 659 | 662 | """Hides terminal main window when it loses the focus and if |
| 660 | 663 | the window_losefocus gconf variable is True. |
| 661 | 664 | """ |
| | 665 | if self.disable_losefocus_hiding or self.showing_context_menu: |
| | 666 | return |
| | 667 | |
| 662 | 668 | value = self.client.get_bool(KEY('/general/window_losefocus')) |
| 663 | 669 | visible = window.get_property('visible') |
| 664 | | if value and visible and not self.showing_context_menu: |
| | 670 | if value and visible: |
| 665 | 671 | self.losefocus_time = \ |
| 666 | 672 | gtk.gdk.x11_get_server_time(self.window.window) |
| 667 | 673 | self.hide() |
| … |
… |
|
| 979 | 985 | dialog.add_action_widget(entry, gtk.RESPONSE_ACCEPT) |
| 980 | 986 | entry.reparent(vbox) |
| 981 | 987 | |
| | 988 | self.disable_losefocus_hiding = True |
| 982 | 989 | response = dialog.run() |
| 983 | 990 | dialog.destroy() |
| | 991 | self.disable_losefocus_hiding = False |
| 984 | 992 | |
| 985 | 993 | if response == gtk.RESPONSE_ACCEPT: |
| 986 | 994 | self.selected_tab.set_label(entry.get_text()) |