]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkinfobar.c
gtk: remove "gboolean homogeneous" from gtk_box_new()
[~andy/gtk] / gtk / gtkinfobar.c
index 7de08fb5a5abefc42187c500a20b5cb76b2d72ea..86859786e05d4a02021c93efba947a0bf2e2941e 100644 (file)
@@ -159,8 +159,8 @@ static void     gtk_info_bar_get_property (GObject        *object,
                                            GParamSpec     *pspec);
 static void     gtk_info_bar_style_set    (GtkWidget      *widget,
                                            GtkStyle       *prev_style);
-static gboolean gtk_info_bar_expose       (GtkWidget      *widget,
-                                           GdkEventExpose *event);
+static gboolean gtk_info_bar_draw         (GtkWidget      *widget,
+                                           cairo_t        *cr);
 static void     gtk_info_bar_buildable_interface_init     (GtkBuildableIface *iface);
 static GObject *gtk_info_bar_buildable_get_internal_child (GtkBuildable  *buildable,
                                                            GtkBuilder    *builder,
@@ -296,8 +296,8 @@ gtk_info_bar_close (GtkInfoBar *info_bar)
 }
 
 static gboolean
-gtk_info_bar_expose (GtkWidget      *widget,
-                     GdkEventExpose *event)
+gtk_info_bar_draw (GtkWidget      *widget,
+                   cairo_t        *cr)
 {
   GtkInfoBarPrivate *priv = GTK_INFO_BAR (widget)->priv;
   const char* type_detail[] = {
@@ -310,26 +310,23 @@ gtk_info_bar_expose (GtkWidget      *widget,
 
   if (priv->message_type != GTK_MESSAGE_OTHER)
     {
-      GtkAllocation allocation;
       const char *detail;
 
       detail = type_detail[priv->message_type];
 
-      gtk_widget_get_allocation (widget, &allocation);
-
       gtk_paint_box (gtk_widget_get_style (widget),
-                     gtk_widget_get_window (widget),
+                     cr,
                      GTK_STATE_NORMAL,
                      GTK_SHADOW_OUT,
-                     NULL,
                      widget,
                      detail,
-                     allocation.x, allocation.y,
-                     allocation.width, allocation.height);
+                     0, 0,
+                     gtk_widget_get_allocated_width (widget),
+                     gtk_widget_get_allocated_height (widget));
     }
 
-  if (GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->expose_event)
-    GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->expose_event (widget, event);
+  if (GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->draw)
+    GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->draw (widget, cr);
 
   return FALSE;
 }
@@ -349,7 +346,7 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
   object_class->finalize = gtk_info_bar_finalize;
 
   widget_class->style_set = gtk_info_bar_style_set;
-  widget_class->expose_event = gtk_info_bar_expose;
+  widget_class->draw = gtk_info_bar_draw;
 
   klass->close = gtk_info_bar_close;
 
@@ -488,7 +485,7 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
 
   binding_set = gtk_binding_set_by_class (klass);
 
-  gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "close", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "close", 0);
 
   g_type_class_add_private (object_class, sizeof (GtkInfoBarPrivate));
 }
@@ -615,11 +612,11 @@ gtk_info_bar_init (GtkInfoBar *info_bar)
                                                 GTK_TYPE_INFO_BAR,
                                                 GtkInfoBarPrivate);
 
-  content_area = gtk_hbox_new (FALSE, 0);
+  content_area = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_widget_show (content_area);
   gtk_box_pack_start (GTK_BOX (info_bar), content_area, TRUE, TRUE, 0);
 
-  action_area = gtk_vbutton_box_new ();
+  action_area = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
   gtk_widget_show (action_area);
   gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_END);
   gtk_box_pack_start (GTK_BOX (info_bar), action_area, FALSE, TRUE, 0);
@@ -739,7 +736,7 @@ gtk_info_bar_add_action_widget (GtkInfoBar *info_bar,
  *
  * Returns the action area of @info_bar.
  *
- * Returns: the action area.
+ * Returns: (transfer none): the action area
  *
  * Since: 2.18
  */
@@ -757,7 +754,7 @@ gtk_info_bar_get_action_area (GtkInfoBar *info_bar)
  *
  * Returns the content area of @info_bar.
  *
- * Returns: the content area.
+ * Returns: (transfer none): the content area
  *
  * Since: 2.18
  */
@@ -781,7 +778,7 @@ gtk_info_bar_get_content_area (GtkInfoBar *info_bar)
  * to the end of the info bars's action area. The button widget is
  * returned, but usually you don't need it.
  *
- * Returns: the button widget that was added
+ * Returns: (transfer none): the button widget that was added
  *
  * Since: 2.18
  */