[gtk+/wip/baedert/visible-widgets: 18/22] shortcutswindow: Use GtkButton:icon-name for search button
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/visible-widgets: 18/22] shortcutswindow: Use GtkButton:icon-name for search button
- Date: Thu, 19 Jan 2017 06:19:53 +0000 (UTC)
commit ae8e6be9c280eb4d89cd76af832c2d3de271415a
Author: Timm Bäder <mail baedert org>
Date: Thu Jan 12 13:10:14 2017 +0100
shortcutswindow: Use GtkButton:icon-name for search button
gtk/gtkshortcutswindow.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c
index ca76ba5..bcdc49a 100644
--- a/gtk/gtkshortcutswindow.c
+++ b/gtk/gtkshortcutswindow.c
@@ -867,7 +867,6 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
GtkWidget *scroller;
GtkWidget *label;
GtkWidget *empty;
- GtkWidget *search_icon;
PangoAttrList *attributes;
gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
@@ -887,13 +886,9 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
NULL);
gtk_window_set_titlebar (GTK_WINDOW (self), GTK_WIDGET (priv->header_bar));
- search_icon = gtk_image_new_from_icon_name ("edit-find-symbolic", GTK_ICON_SIZE_BUTTON);
- gtk_widget_show (search_icon);
-
- search_button = gtk_toggle_button_new ();
- gtk_container_add (GTK_CONTAINER (search_button), search_icon);
- gtk_style_context_add_class (gtk_widget_get_style_context (search_button), "image-button");
- gtk_widget_show (search_button);
+ search_button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
+ "icon-name", "edit-find-symbolic",
+ NULL);
gtk_container_add (GTK_CONTAINER (priv->header_bar), search_button);
priv->main_box = g_object_new (GTK_TYPE_BOX,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]