6bdd276d05
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
82 lines
3.1 KiB
Diff
82 lines
3.1 KiB
Diff
From 4f27e87d62b480a49dcffc232e246295c32113ca Mon Sep 17 00:00:00 2001
|
|
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
|
|
Date: Wed, 16 Nov 2011 09:03:12 +0100
|
|
Subject: [PATCH 02/68] Maintain map/unmap invariants in
|
|
GtkRecentChooserDialog
|
|
|
|
We used to explicitly map and unmap the child GtkRecentChooserWidget when
|
|
mapping and unmapping the dialog, respectively. Now that GtkContainer actually
|
|
unmaps child widgets (instead of avoiding that), we can assume that the
|
|
child GtkRecentChooserWidget will be unmapped when we want it to be.
|
|
|
|
This fixes a warning from gtk_widget_verify_invariants(), as we were mapping
|
|
our child widget before calling our parent class' ::map() handler. Bug #659257.
|
|
(cherry picked from commit e8bb2e4545365d83261381a14920b773aba4a678)
|
|
---
|
|
gtk/gtkrecentchooserdialog.c | 30 ------------------------------
|
|
1 file changed, 30 deletions(-)
|
|
|
|
diff --git a/gtk/gtkrecentchooserdialog.c b/gtk/gtkrecentchooserdialog.c
|
|
index 058439a..1c67b7a 100644
|
|
--- a/gtk/gtkrecentchooserdialog.c
|
|
+++ b/gtk/gtkrecentchooserdialog.c
|
|
@@ -55,9 +55,6 @@ static void gtk_recent_chooser_dialog_get_property (GObject *object,
|
|
GValue *value,
|
|
GParamSpec *pspec);
|
|
|
|
-static void gtk_recent_chooser_dialog_map (GtkWidget *widget);
|
|
-static void gtk_recent_chooser_dialog_unmap (GtkWidget *widget);
|
|
-
|
|
G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserDialog,
|
|
gtk_recent_chooser_dialog,
|
|
GTK_TYPE_DIALOG,
|
|
@@ -68,16 +65,12 @@ static void
|
|
gtk_recent_chooser_dialog_class_init (GtkRecentChooserDialogClass *klass)
|
|
{
|
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
|
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
|
|
|
gobject_class->set_property = gtk_recent_chooser_dialog_set_property;
|
|
gobject_class->get_property = gtk_recent_chooser_dialog_get_property;
|
|
gobject_class->constructor = gtk_recent_chooser_dialog_constructor;
|
|
gobject_class->finalize = gtk_recent_chooser_dialog_finalize;
|
|
|
|
- widget_class->map = gtk_recent_chooser_dialog_map;
|
|
- widget_class->unmap = gtk_recent_chooser_dialog_unmap;
|
|
-
|
|
_gtk_recent_chooser_install_properties (gobject_class);
|
|
|
|
g_type_class_add_private (klass, sizeof (GtkRecentChooserDialogPrivate));
|
|
@@ -224,29 +217,6 @@ gtk_recent_chooser_dialog_finalize (GObject *object)
|
|
G_OBJECT_CLASS (gtk_recent_chooser_dialog_parent_class)->finalize (object);
|
|
}
|
|
|
|
-static void
|
|
-gtk_recent_chooser_dialog_map (GtkWidget *widget)
|
|
-{
|
|
- GtkRecentChooserDialog *dialog = GTK_RECENT_CHOOSER_DIALOG (widget);
|
|
- GtkRecentChooserDialogPrivate *priv = dialog->priv;
|
|
-
|
|
- if (!gtk_widget_get_mapped (priv->chooser))
|
|
- gtk_widget_map (priv->chooser);
|
|
-
|
|
- GTK_WIDGET_CLASS (gtk_recent_chooser_dialog_parent_class)->map (widget);
|
|
-}
|
|
-
|
|
-static void
|
|
-gtk_recent_chooser_dialog_unmap (GtkWidget *widget)
|
|
-{
|
|
- GtkRecentChooserDialog *dialog = GTK_RECENT_CHOOSER_DIALOG (widget);
|
|
- GtkRecentChooserDialogPrivate *priv = dialog->priv;
|
|
-
|
|
- GTK_WIDGET_CLASS (gtk_recent_chooser_dialog_parent_class)->unmap (widget);
|
|
-
|
|
- gtk_widget_unmap (priv->chooser);
|
|
-}
|
|
-
|
|
static GtkWidget *
|
|
gtk_recent_chooser_dialog_new_valist (const gchar *title,
|
|
GtkWindow *parent,
|
|
--
|
|
1.7.10.2 (Apple Git-33)
|