[vinagre] Update the tab tooltip correctly in VinagreBotebook.
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vinagre] Update the tab tooltip correctly in VinagreBotebook.
- Date: Sat, 1 Aug 2009 13:36:56 +0000 (UTC)
commit 24f05462cb3df1dfee8eed31e0d900ac2857de42
Author: Jonh Wendell <jwendell gnome org>
Date: Sat Aug 1 10:29:17 2009 -0300
Update the tab tooltip correctly in VinagreBotebook.
We listen to the notify::tooltip property in VinagreTab.
vinagre/vinagre-notebook.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/vinagre/vinagre-notebook.c b/vinagre/vinagre-notebook.c
index edb4ed7..4d25987 100644
--- a/vinagre/vinagre-notebook.c
+++ b/vinagre/vinagre-notebook.c
@@ -378,10 +378,10 @@ close_button_clicked_cb (GtkWidget *widget,
}
static void
-tab_size_changed_cb (VinagreTab *tab, VinagreNotebook *nb)
+vinagre_notebook_update_tab_tooltip (VinagreNotebook *nb, VinagreTab *tab)
{
- char *str;
- GtkWidget *label;
+ char *str;
+ GtkWidget *label;
label = GTK_WIDGET (g_object_get_data (G_OBJECT (tab), "label-ebox"));
g_return_if_fail (label != NULL);
@@ -393,6 +393,12 @@ tab_size_changed_cb (VinagreTab *tab, VinagreNotebook *nb)
}
static void
+tab_tooltip_changed_cb (GObject *object, GParamSpec *pspec, VinagreNotebook *nb)
+{
+ vinagre_notebook_update_tab_tooltip (nb, VINAGRE_TAB (object));
+}
+
+static void
tab_disconnected_cb (VinagreTab *tab, VinagreNotebook *nb)
{
gchar *message, *name, *emphasis;
@@ -439,6 +445,7 @@ static void
tab_initialized_cb (VinagreTab *tab, VinagreNotebook *nb)
{
vinagre_notebook_update_ui_sentitivity (nb);
+ vinagre_notebook_update_tab_tooltip (nb, tab);
}
static GtkWidget *
@@ -568,8 +575,8 @@ vinagre_notebook_add_tab (VinagreNotebook *nb,
vinagre_tab_set_notebook (tab, nb);
g_signal_connect (tab,
- "notify::original-width",
- G_CALLBACK (tab_size_changed_cb),
+ "notify::tooltip",
+ G_CALLBACK (tab_tooltip_changed_cb),
nb);
g_signal_connect (tab,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]