[meld/pathlabel] Remove tab labels from app title



commit 5ac4946d1d8a1474bf94bd4eb1cc48db06c600c2
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Aug 22 10:06:36 2021 +1000

    Remove tab labels from app title
    
    Now that we have more complete labelling on individual comparison panes,
    whenever we are displaying tabs we end up with indicators showing that
    we're comparing e.g., [foo] thing.txt : [bar] thing.txt *three times* on
    a single page: the title, the tab label, and the pane labels.
    
    This commit removes the title repetition, so we're now showing it at
    most twice.

 meld/meldwindow.py             | 10 ----------
 meld/resources/ui/appwindow.ui |  2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index c8bc22a5..c044e2ed 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -237,12 +237,6 @@ class MeldWindow(Gtk.ApplicationWindow):
 
         self.lookup_action('close').set_enabled(bool(newdoc))
 
-        if newdoc:
-            nbl = self.notebook.get_tab_label(newdoc)
-            self.set_title(nbl.props.label_text)
-        else:
-            self.set_title("Meld")
-
         if hasattr(newdoc, 'scheduler'):
             self.scheduler.add_task(newdoc.scheduler)
 
@@ -255,10 +249,6 @@ class MeldWindow(Gtk.ApplicationWindow):
         newdoc = notebook.get_nth_page(which)
         newdoc.on_container_switch_in_event(self)
 
-    @Gtk.Template.Callback()
-    def on_page_label_changed(self, notebook, label_text):
-        self.set_title(label_text)
-
     def action_new_tab(self, action, parameter):
         self.append_new_comparison()
 
diff --git a/meld/resources/ui/appwindow.ui b/meld/resources/ui/appwindow.ui
index f0122083..97aca640 100644
--- a/meld/resources/ui/appwindow.ui
+++ b/meld/resources/ui/appwindow.ui
@@ -14,6 +14,7 @@
       <object class="GtkHeaderBar" id="header_bar">
         <property name="show-close-button">true</property>
         <property name="visible">true</property>
+        <property name="title" translatable="yes">Meld</property>
         <child>
           <object class="GtkBox">
             <property name="visible">True</property>
@@ -252,7 +253,6 @@
             <property name="show_border">False</property>
             <signal name="switch-page" handler="on_switch_page" swapped="no"/>
             <signal name="switch-page" handler="after_switch_page" after="yes" swapped="no"/>
-            <signal name="page-label-changed" handler="on_page_label_changed" swapped="no"/>
           </object>
           <packing>
             <property name="expand">True</property>


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