[gnome-control-center] shell: Use GtkButton instead GdHeaderButton



commit 48789d617e7eb7cc05bc786e47a0459a8f062b6c
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Fri Jul 19 17:30:28 2013 +0300

    shell: Use GtkButton instead GdHeaderButton
    
    remove header-bar from LIBGD_INIT in configure.ac
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704170

 configure.ac      |    2 +-
 shell/cc-window.c |   11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b9d3490..cc5fdb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,7 +111,7 @@ COMMON_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION
  gio-unix-2.0
  gsettings-desktop-schemas >= $SCHEMAS_REQUIRED_VERSION"
 
-LIBGD_INIT([_view-common notification main-toolbar header-bar stack static])
+LIBGD_INIT([_view-common notification main-toolbar stack static])
 
 PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig)
 PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11)
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 0355eb9..cfda82e 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -1414,6 +1414,7 @@ create_header (CcWindow *self)
 {
   CcWindowPrivate *priv = self->priv;
   GtkWidget *button;
+  GtkWidget *button_image;
   AtkObject *accessible;
   gboolean rtl;
 
@@ -1421,9 +1422,13 @@ create_header (CcWindow *self)
 
   priv->header = gtk_header_bar_new ();
 
-  priv->previous_button = button = gd_header_simple_button_new ();
-  gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (button),
-                                           rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic");
+  priv->previous_button = button = gtk_button_new ();
+  button_image = gtk_image_new_from_icon_name (rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic",
+                                               GTK_ICON_SIZE_MENU);
+  gtk_button_set_image (GTK_BUTTON (button), button_image);
+  gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
+  gtk_style_context_add_class (gtk_widget_get_style_context (button),
+                               "image-button");
   gtk_widget_set_no_show_all (button, TRUE);
   accessible = gtk_widget_get_accessible (button);
   atk_object_set_name (accessible, _("All Settings"));


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