[bijiben] Use GtkRevealer instead of GdRevealer



commit dc70ddd6eebdd8244c6925a3ee205e171fc59c0e
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Tue Jun 18 01:48:05 2013 +0200

    Use GtkRevealer instead of GdRevealer

 configure.ac               |    1 -
 src/bjb-load-more-button.c |    5 ++---
 src/bjb-search-toolbar.c   |   22 +++++++++++-----------
 src/bjb-search-toolbar.h   |    2 +-
 src/bjb-window-base.c      |    2 +-
 5 files changed, 15 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index dd4ee83..d35976f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,6 @@ LIBGD_INIT([
   gtk-hacks
   header-bar
   main-view
-  revealer
   static
   tagged-entry
 ])
diff --git a/src/bjb-load-more-button.c b/src/bjb-load-more-button.c
index 2170a84..b1cf41e 100644
--- a/src/bjb-load-more-button.c
+++ b/src/bjb-load-more-button.c
@@ -26,7 +26,6 @@
 #include <glib/gi18n.h>
 #include <glib/gprintf.h>
 
-#include <libgd/gd-revealer.h>
 
 #include "bjb-load-more-button.h"
 
@@ -67,7 +66,7 @@ on_displayed_items_changed (BjbController     *controller,
   gtk_widget_hide (priv->spinner);
   gtk_label_set_label (GTK_LABEL (priv->label), _("Load More"));
 
-  gd_revealer_set_reveal_child (GD_REVEALER (priv->revealer), remaining);
+  gtk_revealer_set_reveal_child (GTK_REVEALER (priv->revealer), remaining);
 }
 
 
@@ -155,7 +154,7 @@ bjb_load_more_button_init (BjbLoadMoreButton *self)
   gtk_widget_set_visible (priv->label, TRUE);
   gtk_container_add (GTK_CONTAINER (child), priv->label);
 
-  priv->revealer = gd_revealer_new ();
+  priv->revealer = gtk_revealer_new ();
   gtk_container_add (GTK_CONTAINER (priv->revealer), GTK_WIDGET (self));
 }
 
diff --git a/src/bjb-search-toolbar.c b/src/bjb-search-toolbar.c
index eef3070..b66e375 100644
--- a/src/bjb-search-toolbar.c
+++ b/src/bjb-search-toolbar.c
@@ -61,7 +61,7 @@ struct _BjbSearchToolbarPrivate
   gulong            inserted;
 
   /* Misc UI  */
-  GdRevealer        *revealer;
+  GtkRevealer       *revealer;
   GtkWidget         *widget;   // GTK_WIDGET (self)
   GtkWidget         *window;
 };
@@ -79,13 +79,13 @@ bjb_search_toolbar_toggle_search_button (BjbSearchToolbar *self,
 void
 bjb_search_toolbar_fade_in (BjbSearchToolbar *self)
 {
-  if (!gd_revealer_get_child_revealed (self->priv->revealer))
+  if (!gtk_revealer_get_child_revealed (self->priv->revealer))
   {
     GdkDevice *device;
 
 
     /* show the search */
-    gd_revealer_set_reveal_child (self->priv->revealer, TRUE);
+    gtk_revealer_set_reveal_child (self->priv->revealer, TRUE);
 
     /* focus */
     device = gtk_get_current_event_device ();
@@ -100,14 +100,14 @@ bjb_search_toolbar_fade_in (BjbSearchToolbar *self)
 void
 bjb_search_toolbar_fade_out (BjbSearchToolbar *self)
 {
-  if (gd_revealer_get_child_revealed (self->priv->revealer))
+  if (gtk_revealer_get_child_revealed (self->priv->revealer))
   {
     /* clear the search before hiding */
     gtk_entry_set_text (GTK_ENTRY (self->priv->entry), "");
     bjb_controller_set_needle (self->priv->controller, "");
 
     /* hide */
-    gd_revealer_set_reveal_child (self->priv->revealer, FALSE);
+    gtk_revealer_set_reveal_child (self->priv->revealer, FALSE);
 
     /* manually toggle search button */
     bjb_search_toolbar_toggle_search_button (self, FALSE);
@@ -123,7 +123,7 @@ on_key_released (GtkWidget *widget,GdkEvent  *event,gpointer user_data)
   BjbSearchToolbar *self = BJB_SEARCH_TOOLBAR (user_data);
   BjbSearchToolbarPrivate *priv = self->priv;
 
-  if (gd_revealer_get_child_revealed (self->priv->revealer) == TRUE)
+  if (gtk_revealer_get_child_revealed (self->priv->revealer) == TRUE)
     gtk_editable_set_position (GTK_EDITABLE (priv->entry), -1);
 
   return FALSE;
@@ -135,7 +135,7 @@ on_key_pressed (GtkWidget *widget,GdkEvent  *event,gpointer user_data)
   BjbSearchToolbar *self = BJB_SEARCH_TOOLBAR (user_data);
 
   /* Reveal the entry is text is input. TODO add more keys not input */
-  if (gd_revealer_get_child_revealed (self->priv->revealer) == FALSE)
+  if (gtk_revealer_get_child_revealed (self->priv->revealer) == FALSE)
   {
     switch (event->key.keyval)
     {
@@ -326,7 +326,7 @@ bjb_search_toolbar_init (BjbSearchToolbar *self)
   self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, BJB_TYPE_SEARCH_TOOLBAR, BjbSearchToolbarPrivate);
   priv = self->priv;
   priv->widget = GTK_WIDGET (self);
-  priv->revealer = GD_REVEALER (gd_revealer_new ());
+  priv->revealer = GTK_REVEALER (gtk_revealer_new ());
 
   gtk_container_add (GTK_CONTAINER (priv->revealer), priv->widget);
 
@@ -390,14 +390,14 @@ bjb_search_toolbar_new (GtkWidget     *window,
                        NULL);
 }
 
-GdRevealer *
+GtkWidget *
 bjb_search_toolbar_get_revealer (BjbSearchToolbar *self)
 {
-  return self->priv->revealer;
+  return GTK_WIDGET (self->priv->revealer);
 }
 
 gboolean
 bjb_search_toolbar_is_shown (BjbSearchToolbar *self)
 {
-  return gd_revealer_get_child_revealed (self->priv->revealer);
+  return gtk_revealer_get_child_revealed (self->priv->revealer);
 }
diff --git a/src/bjb-search-toolbar.h b/src/bjb-search-toolbar.h
index 82f1153..4d3c2af 100644
--- a/src/bjb-search-toolbar.h
+++ b/src/bjb-search-toolbar.h
@@ -57,7 +57,7 @@ void bjb_search_toolbar_fade_in (BjbSearchToolbar *self);
 
 void bjb_search_toolbar_fade_out (BjbSearchToolbar *self);
 
-GdRevealer * bjb_search_toolbar_get_revealer (BjbSearchToolbar *self);
+GtkWidget * bjb_search_toolbar_get_revealer (BjbSearchToolbar *self);
 
 void bjb_search_toolbar_disconnect (BjbSearchToolbar *self);
 
diff --git a/src/bjb-window-base.c b/src/bjb-window-base.c
index cb49845..4ad9cfd 100644
--- a/src/bjb-window-base.c
+++ b/src/bjb-window-base.c
@@ -102,7 +102,7 @@ bjb_window_base_constructed (GObject *obj)
   GList *icons = NULL;
   GdkPixbuf *bjb ;
   GError *error = NULL;
-  GdRevealer *revealer;
+  GtkWidget *revealer;
 
   G_OBJECT_CLASS (bjb_window_base_parent_class)->constructed (obj);
 


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