[glade] GladeButtonEditor: Don't allow modifying content of a GtkLinkButton
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GladeButtonEditor: Don't allow modifying content of a GtkLinkButton
- Date: Sun, 12 May 2013 12:09:31 +0000 (UTC)
commit 0cca1d2ee9cbee859b416bbc8472026ed6b8a44b
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun May 12 18:41:29 2013 +0900
GladeButtonEditor: Don't allow modifying content of a GtkLinkButton
plugins/gtk+/glade-button-editor.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/plugins/gtk+/glade-button-editor.c b/plugins/gtk+/glade-button-editor.c
index 21179e4..175e277 100644
--- a/plugins/gtk+/glade-button-editor.c
+++ b/plugins/gtk+/glade-button-editor.c
@@ -142,7 +142,10 @@ glade_button_editor_load (GladeEditable * editable, GladeWidget * widget)
gboolean is_toggle = GTK_IS_TOGGLE_BUTTON (button);
gboolean is_check = GTK_IS_CHECK_BUTTON (button);
gboolean is_radio = GTK_IS_RADIO_BUTTON (button);
- gboolean is_menu = GTK_IS_MENU_BUTTON (button);
+ gboolean modify_content = TRUE;
+
+ if (GTK_IS_MENU_BUTTON (button) || GTK_IS_LINK_BUTTON (button))
+ modify_content = FALSE;
gtk_widget_set_visible (priv->active_shell, is_toggle);
gtk_widget_set_visible (priv->inconsistent_shell, is_toggle);
@@ -157,9 +160,9 @@ glade_button_editor_load (GladeEditable * editable, GladeWidget * widget)
gtk_widget_set_visible (priv->group_label, is_radio);
gtk_widget_set_visible (priv->group_shell, is_radio);
- gtk_widget_set_visible (priv->content_label, !is_menu);
- gtk_widget_set_visible (priv->custom_check, !is_menu);
- gtk_widget_set_visible (priv->standard_frame, !is_menu);
+ gtk_widget_set_visible (priv->content_label, modify_content);
+ gtk_widget_set_visible (priv->custom_check, modify_content);
+ gtk_widget_set_visible (priv->standard_frame, modify_content);
}
/* Chain up to default implementation */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]