[gnome-builder] tabs: set tab tooltip text based on tab title



commit 1a4be9d68c33f103e26c2bc6925f83f6b50e55f6
Author: Christian Hergert <christian hergert me>
Date:   Fri Nov 21 03:22:01 2014 -0800

    tabs: set tab tooltip text based on tab title

 src/resources/ui/gb-tab-label.ui |    1 +
 src/tabs/gb-tab-label.c          |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/resources/ui/gb-tab-label.ui b/src/resources/ui/gb-tab-label.ui
index 0f28eb0..84aefc2 100644
--- a/src/resources/ui/gb-tab-label.ui
+++ b/src/resources/ui/gb-tab-label.ui
@@ -45,6 +45,7 @@
             <property name="vexpand">False</property>
             <property name="visible">True</property>
             <property name="can-focus">False</property>
+            <property name="tooltip-text" translatable="yes">Close tab</property>
           </object>
         </child>
       </object>
diff --git a/src/tabs/gb-tab-label.c b/src/tabs/gb-tab-label.c
index 1955c1e..e361d30 100644
--- a/src/tabs/gb-tab-label.c
+++ b/src/tabs/gb-tab-label.c
@@ -117,6 +117,8 @@ gb_tab_label_set_tab (GbTabLabel *label,
                                    NULL, NULL, NULL);
       g_object_bind_property (tab, "title", priv->label, "label",
                               G_BINDING_SYNC_CREATE);
+      g_object_bind_property (tab, "title", label, "tooltip-text",
+                              G_BINDING_SYNC_CREATE);
     }
 }
 


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