[gtk+] GtkWindow: Override gtk_container_remove ()
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkWindow: Override gtk_container_remove ()
- Date: Sun, 6 Oct 2013 03:23:30 +0000 (UTC)
commit 757ae6f1636d3166b08208cc3ff708934728700a
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Oct 3 19:07:37 2013 +0200
GtkWindow: Override gtk_container_remove ()
Check which child is being removed, title_box or the GtkBin child.
https://bugzilla.gnome.org/show_bug.cgi?id=709049
gtk/gtkwindow.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index c573fd1..8686079 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -389,6 +389,8 @@ static gint gtk_window_focus_out_event (GtkWidget *widget,
static void gtk_window_style_updated (GtkWidget *widget);
static gboolean gtk_window_state_event (GtkWidget *widget,
GdkEventWindowState *event);
+static void gtk_window_remove (GtkContainer *container,
+ GtkWidget *widget);
static void gtk_window_check_resize (GtkContainer *container);
static void gtk_window_forall (GtkContainer *container,
gboolean include_internals,
@@ -666,6 +668,7 @@ gtk_window_class_init (GtkWindowClass *klass)
widget_class->get_preferred_height = gtk_window_get_preferred_height;
widget_class->get_preferred_height_for_width = gtk_window_get_preferred_height_for_width;
+ container_class->remove = gtk_window_remove;
container_class->check_resize = gtk_window_check_resize;
container_class->forall = gtk_window_forall;
@@ -7582,6 +7585,17 @@ gtk_window_focus_out_event (GtkWidget *widget,
}
static void
+gtk_window_remove (GtkContainer *container,
+ GtkWidget *widget)
+{
+ GtkWindow *window = GTK_WINDOW (container);
+ if (widget == window->priv->title_box)
+ unset_titlebar (window);
+ else
+ GTK_CONTAINER_CLASS (gtk_window_parent_class)->remove (container, widget);
+}
+
+static void
gtk_window_check_resize (GtkContainer *container)
{
/* If the window is not toplevel anymore than it's embedded somewhere,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]