[gnome-system-log] findbar: port to GtkButton



commit c1fe44dbf37162586ee7258f3d9cef498cea48e1
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Tue Aug 13 11:44:11 2013 +0300

    findbar: port to GtkButton
    
    * GdHeaderSimpleButton -> GtkButton
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705881
    
    Signed-off-by: Yosef Or Boczko <yoseforb gmail com>

 src/logview-findbar.c |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/src/logview-findbar.c b/src/logview-findbar.c
index 3aff9b1..85bb709 100644
--- a/src/logview-findbar.c
+++ b/src/logview-findbar.c
@@ -27,7 +27,6 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <math.h>
-#include <libgd/gd.h>
 
 #include "logview-findbar.h"
 
@@ -117,7 +116,7 @@ entry_key_press_event_cb (GtkWidget *entry,
 static void 
 logview_findbar_init (LogviewFindbar *findbar)
 {
-  GtkWidget *w, *box, *buttons;
+  GtkWidget *w, *box, *buttons, *images;
   GtkToolbar *gtoolbar;
   GtkToolItem *item;
   LogviewFindbarPrivate *priv;
@@ -143,18 +142,24 @@ logview_findbar_init (LogviewFindbar *findbar)
   gtk_container_add (GTK_CONTAINER (box), buttons);
 
   /* "Previous" and "Next" buttons */
-  priv->back_button = gd_header_simple_button_new ();
-  gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (priv->back_button),
-                                           "go-up-symbolic");
-  gd_header_button_set_label (GD_HEADER_BUTTON (priv->back_button),
-                              _("Find previous occurrence of the search string"));
+  priv->back_button = gtk_button_new ();
+  images = gtk_image_new_from_icon_name ("go-up-symbolic", GTK_ICON_SIZE_MENU);
+  gtk_button_set_image (GTK_BUTTON (priv->back_button), images);
+  gtk_widget_set_valign (priv->back_button, GTK_ALIGN_CENTER);
+  gtk_style_context_add_class (gtk_widget_get_style_context (priv->back_button),
+                               "image-button");
+  gtk_widget_set_tooltip_text (priv->back_button,
+                               _("Find previous occurrence of the search string"));
   gtk_container_add (GTK_CONTAINER (buttons), priv->back_button);
 
-  priv->forward_button = gd_header_simple_button_new ();
-  gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (priv->forward_button),
-                                           "go-down-symbolic");
-  gd_header_button_set_label (GD_HEADER_BUTTON (priv->forward_button),
-                              _("Find next occurrence of the search string"));
+  priv->forward_button = gtk_button_new ();
+  images = gtk_image_new_from_icon_name ("go-down-symbolic", GTK_ICON_SIZE_MENU);
+  gtk_button_set_image (GTK_BUTTON (priv->forward_button), images);
+  gtk_widget_set_valign (priv->forward_button, GTK_ALIGN_CENTER);
+  gtk_style_context_add_class (gtk_widget_get_style_context (priv->forward_button),
+                               "image-button");
+  gtk_widget_set_tooltip_text (priv->forward_button,
+                               _("Find next occurrence of the search string"));
   gtk_container_add (GTK_CONTAINER (buttons), priv->forward_button);
 
   item = gtk_tool_item_new ();


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