[Xfce4-commits] <xfce4-panel:devel> Missed the button title was also used as tooltip.
Nick Schermer
noreply at xfce.org
Thu Feb 18 21:02:01 CET 2010
Updating branch refs/heads/devel
to 27e52f93e0bf97b8220b0c93d22648d61c38fb69 (commit)
from d7c0e5f70b6080fbe203c76024f5a73789279205 (commit)
commit 27e52f93e0bf97b8220b0c93d22648d61c38fb69
Author: Nick Schermer <nick at xfce.org>
Date: Thu Feb 18 21:01:04 2010 +0100
Missed the button title was also used as tooltip.
.../applicationsmenu/applicationsmenu-dialog.glade | 135 +++++++++-----------
plugins/applicationsmenu/applicationsmenu.c | 6 +-
2 files changed, 62 insertions(+), 79 deletions(-)
diff --git a/plugins/applicationsmenu/applicationsmenu-dialog.glade b/plugins/applicationsmenu/applicationsmenu-dialog.glade
index 24983e7..8220535 100644
--- a/plugins/applicationsmenu/applicationsmenu-dialog.glade
+++ b/plugins/applicationsmenu/applicationsmenu-dialog.glade
@@ -30,11 +30,13 @@
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
<child>
<object class="GtkCheckButton" id="show-generic-names">
<property name="label" translatable="yes">Show generic application n_ames</property>
@@ -46,7 +48,7 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="position">0</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
@@ -59,7 +61,9 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
@@ -72,88 +76,74 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="title-box">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="left_padding">22</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Button _title:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">button-title</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="button-title">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Button _title:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">button-title</property>
</object>
<packing>
- <property name="position">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkEntry" id="button-title">
<property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Icon:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">icon-button</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Icon:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">icon-button</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
<child>
- <object class="GtkAlignment" id="alignment2">
+ <object class="GtkButton" id="icon-button">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
<child>
- <object class="GtkButton" id="icon-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
+ <placeholder/>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
- <property name="position">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
</packing>
</child>
</object>
@@ -309,10 +299,5 @@
<action-widget response="0">close-button</action-widget>
</action-widgets>
</object>
- <object class="GtkSizeGroup" id="sizegroup1">
- <widgets>
- <widget name="label4"/>
- <widget name="alignment4"/>
- </widgets>
- </object>
+ <object class="GtkSizeGroup" id="sizegroup1"/>
</interface>
diff --git a/plugins/applicationsmenu/applicationsmenu.c b/plugins/applicationsmenu/applicationsmenu.c
index 7f7dac7..c52365a 100644
--- a/plugins/applicationsmenu/applicationsmenu.c
+++ b/plugins/applicationsmenu/applicationsmenu.c
@@ -202,6 +202,7 @@ applications_menu_plugin_init (ApplicationsMenuPlugin *plugin)
gtk_container_add (GTK_CONTAINER (plugin), plugin->button);
gtk_widget_set_name (plugin->button, "applicationmenu-button");
gtk_button_set_relief (GTK_BUTTON (plugin->button), GTK_RELIEF_NONE);
+ gtk_widget_set_tooltip_text (plugin->button, DEFAULT_TITLE);
g_signal_connect (G_OBJECT (plugin->button), "toggled",
G_CALLBACK (applications_menu_plugin_menu), plugin);
@@ -301,6 +302,7 @@ applications_menu_plugin_set_property (GObject *object,
plugin->button_title = g_value_dup_string (value);
gtk_label_set_text (GTK_LABEL (plugin->label),
plugin->button_title != NULL ? plugin->button_title : "");
+ gtk_widget_set_tooltip_text (plugin->button, plugin->button_title);
break;
case PROP_BUTTON_ICON:
@@ -494,10 +496,6 @@ applications_menu_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
exo_mutual_binding_new (G_OBJECT (plugin), "show-button-title",
G_OBJECT (object), "active");
- object2 = gtk_builder_get_object (builder, "title-box");
- panel_return_if_fail (GTK_IS_WIDGET (object2));
- exo_binding_new (G_OBJECT (object), "active", G_OBJECT (object2), "sensitive");
-
object = gtk_builder_get_object (builder, "button-title");
panel_return_if_fail (GTK_IS_ENTRY (object));
exo_mutual_binding_new (G_OBJECT (plugin), "button-title",
More information about the Xfce4-commits
mailing list