[glade/headerbar] Revert "Try to make titlebar removal work"
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/headerbar] Revert "Try to make titlebar removal work"
- Date: Sat, 18 Oct 2014 06:21:04 +0000 (UTC)
commit 22feb67c73770e1742faada10d2808c34e9fc1b8
Author: Tristan Van Berkom <tristan upstairslabs com>
Date: Sat Oct 18 14:46:59 2014 +0900
Revert "Try to make titlebar removal work"
This reverts commit 50c8e87f8b001bd15b1d8d5908d0b4a46d8ef4bf.
The above commit tries to issue glade commands from the
GladeWidgetAdaptor methods for applying property values
to the runtime widgets, instead I'm adding a commit which
groups the 'use-csd' property setting with the titlebar
deletion.
plugins/gtk+/glade-gtk-window.c | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-window.c b/plugins/gtk+/glade-gtk-window.c
index aef4980..b4ae523 100644
--- a/plugins/gtk+/glade-gtk-window.c
+++ b/plugins/gtk+/glade-gtk-window.c
@@ -235,10 +235,10 @@ glade_gtk_window_set_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * id, const GValue * value)
{
- GladeWidget *gwidget = glade_widget_get_from_gobject (object);
-
if (!strcmp (id, "glade-window-icon-name"))
{
+ GladeWidget *gwidget = glade_widget_get_from_gobject (object);
+
glade_widget_property_set_sensitive (gwidget, "icon", FALSE, NOT_SELECTED_MSG);
glade_widget_property_set_sensitive (gwidget, "icon-name", FALSE, NOT_SELECTED_MSG);
@@ -249,26 +249,18 @@ glade_gtk_window_set_property (GladeWidgetAdaptor * adaptor,
}
else if (!strcmp (id, "use-csd"))
{
- GtkWidget *titlebar = gtk_window_get_titlebar (GTK_WINDOW (object));
-
if (g_value_get_boolean (value))
{
+ GtkWidget *titlebar;
+
+ titlebar = gtk_window_get_titlebar (GTK_WINDOW (object));
if (!titlebar)
titlebar = glade_placeholder_new ();
g_object_set_data (G_OBJECT (titlebar), "special-child-type", "titlebar");
gtk_window_set_titlebar (GTK_WINDOW (object), titlebar);
}
else
- {
- if (titlebar)
- {
- GList list;
- list.prev = list.next = NULL;
- list.data = glade_widget_get_from_gobject (titlebar);
- glade_command_delete (&list);
- }
- gtk_window_set_titlebar (GTK_WINDOW (object), NULL);
- }
+ gtk_window_set_titlebar (GTK_WINDOW (object), NULL);
}
else
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]