[gtk+/gtk-3-2] Init the InfoBar message_type to GTK_MESSAGE_OTHER



commit 7d15f34204300f7ef2d7378fb6a06b5b1c30cb05
Author: Paolo Borelli <pborelli gnome org>
Date:   Fri Feb 24 00:16:33 2012 +0100

    Init the InfoBar message_type to GTK_MESSAGE_OTHER
    
    In this way the the code executed when the message_type property is set
    to its default value (which is 0) gets actually run.

 gtk/gtkinfobar.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 87f6d3b..77de914 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -541,6 +541,11 @@ gtk_info_bar_init (GtkInfoBar *info_bar)
   info_bar->priv->content_area = content_area;
   info_bar->priv->action_area = action_area;
 
+  /* message-type is a CONSTRUCT property, so we init to a value
+   * different from its default to trigger its property setter
+   * during construction */
+  info_bar->priv->message_type = GTK_MESSAGE_OTHER;
+
   gtk_widget_pop_composite_child ();
 
   gtk_info_bar_style_updated (widget);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]