[meld] Only update the window title when the active notebook label changes



commit 5458b129a10ac22b89a5d7c7a0381f38047763f3
Author: Peter Tyser <ptyser gmail com>
Date:   Wed Apr 11 01:10:52 2012 -0500

    Only update the window title when the active notebook label changes
    
    Previously the Meld window title was changed whenever a notebook label
    changed, regardless if that notebook was active or not.  This change
    allows background notebook labels to change without impacting the Meld
    window title.
    
    The "Only transfer focus once when opening multiple file diffs" patch
    causes the Meld window title to cycle even though the active
    notebook/tab did not change.
    
    Signed-off-by: Peter Tyser <ptyser gmail com>

 meld/meldwindow.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index 5fe6ce5..aa6bfc2 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -346,7 +346,10 @@ class MeldWindow(gnomeglade.Component):
         nbl = self.notebook.get_tab_label(page)
         nbl.set_label_text(text)
         nbl.set_tooltip_text(tooltip)
-        self.widget.set_title(text + " - Meld")
+
+        # Only update the window title if the current page is active
+        if self.notebook.get_current_page() == self.notebook.page_num(page):
+            self.widget.set_title(text + " - Meld")
         self.notebook.child_set_property(page, "menu-label", text)
 
         actiongroup = self.tab_switch_actiongroup



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]