[gtk+] Revert "Add a revealer to GtkInfoBar"



commit e63bfabb0783954bcd11bd71ec62d0982ce8bcf4
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Aug 2 17:56:31 2013 +0200

    Revert "Add a revealer to GtkInfoBar"
    
    This reverts commit 1198ffb0bc195c6044d4d0efd864ccf093d637c7.
    
    This change needs more work, to avoid breaking existing
    ui files.

 gtk/gtkinfobar.c  |   35 -----------------
 gtk/gtkinfobar.ui |  110 +++++++++++++++++++++++------------------------------
 2 files changed, 48 insertions(+), 97 deletions(-)
---
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 396a087..776adc0 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -41,7 +41,6 @@
 #include "gtkenums.h"
 #include "gtkbindings.h"
 #include "gtkdialog.h"
-#include "gtkrevealer.h"
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtkorientable.h"
@@ -128,7 +127,6 @@ struct _GtkInfoBarPrivate
   GtkWidget *content_area;
   GtkWidget *action_area;
   GtkWidget *close_button;
-  GtkWidget *revealer;
 
   gboolean show_close_button;
   GtkMessageType message_type;
@@ -380,36 +378,6 @@ gtk_info_bar_draw (GtkWidget *widget,
 }
 
 static void
-gtk_info_bar_show (GtkWidget *widget)
-{
-  GtkInfoBarPrivate *priv = GTK_INFO_BAR (widget)->priv;
-
-  GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->show (widget);
-
-  gtk_revealer_set_reveal_child (GTK_REVEALER (priv->revealer), TRUE);
-}
-
-static void
-child_revealed (GObject *object, GParamSpec *pspec, gpointer data)
-{
-  GtkWidget *widget = data;
-
-  GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->hide (widget);
-  g_signal_handlers_disconnect_by_func (object, child_revealed, widget);
-  g_object_notify (G_OBJECT (widget), "visible");
-}
-
-static void
-gtk_info_bar_hide (GtkWidget *widget)
-{
-  GtkInfoBarPrivate *priv = GTK_INFO_BAR (widget)->priv;
-
-  gtk_revealer_set_reveal_child (GTK_REVEALER (priv->revealer), FALSE);
-  g_signal_connect_object (priv->revealer, "notify::child-revealed",
-                           G_CALLBACK (child_revealed), widget, 0);
-}
-
-static void
 gtk_info_bar_class_init (GtkInfoBarClass *klass)
 {
   GtkWidgetClass *widget_class;
@@ -426,8 +394,6 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
   widget_class->get_preferred_width = gtk_info_bar_get_preferred_width;
   widget_class->get_preferred_height = gtk_info_bar_get_preferred_height;
   widget_class->draw = gtk_info_bar_draw;
-  widget_class->show = gtk_info_bar_show;
-  widget_class->hide = gtk_info_bar_hide;
 
   klass->close = gtk_info_bar_close;
 
@@ -583,7 +549,6 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkInfoBar, content_area);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkInfoBar, action_area);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkInfoBar, close_button);
-  gtk_widget_class_bind_template_child_internal_private (widget_class, GtkInfoBar, revealer);
 }
 
 static void
diff --git a/gtk/gtkinfobar.ui b/gtk/gtkinfobar.ui
index b5823fa..35e2107 100644
--- a/gtk/gtkinfobar.ui
+++ b/gtk/gtkinfobar.ui
@@ -5,76 +5,62 @@
     <property name="app_paintable">True</property>
     <property name="can_focus">False</property>
     <child>
-      <object class="GtkRevealer" id="revealer">
+      <object class="GtkBox" id="content_area">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="border_width">8</property>
+        <property name="spacing">16</property>
         <child>
-          <object class="GtkBox" id="content">
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkButtonBox" id="action_area">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">6</property>
+        <property name="orientation">horizontal</property>
+        <property name="spacing">6</property>
+        <property name="layout_style">end</property>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkButton" id="close_button">
+        <property name="visible">False</property>
+        <property name="can_focus">True</property>
+        <property name="border_width">6</property>
+        <property name="relief">none</property>
+        <style>
+          <class name="raised"/>
+          <class name="close"/>
+        </style>
+        <child>
+          <object class="GtkImage" id="close_image">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="border_width">0</property>
-            <property name="spacing">0</property>
-            <child>
-              <object class="GtkBox" id="content_area">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">8</property>
-                <property name="spacing">16</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButtonBox" id="action_area">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">6</property>
-                <property name="orientation">horizontal</property>
-                <property name="spacing">6</property>
-                <property name="layout_style">end</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close_button">
-                <property name="visible">False</property>
-                <property name="can_focus">True</property>
-                <property name="border_width">6</property>
-                <property name="relief">none</property>
-                <style>
-                  <class name="raised"/>
-                 <class name="close"/>
-                </style>
-                <child>
-                  <object class="GtkImage" id="close_image">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="icon_name">window-close-symbolic</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
+            <property name="icon_name">window-close-symbolic</property>
           </object>
         </child>
       </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
     </child>
   </template>
 </interface>


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