[gtk+/gtk-3-22] placesview: Simplify button construction
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] placesview: Simplify button construction
- Date: Thu, 2 Mar 2017 18:49:01 +0000 (UTC)
commit f7479bf3697c9c21acd3b1e80b11f03c8bfd1b76
Author: Timm Bäder <mail baedert org>
Date: Thu Mar 2 14:06:01 2017 +0100
placesview: Simplify button construction
gtk/gtkplacesview.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index d0d7404..15d95cc 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -588,15 +588,12 @@ populate_servers (GtkPlacesView *view)
gtk_container_add (GTK_CONTAINER (grid), label);
/* remove button */
- button = gtk_button_new ();
+ button = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_widget_set_halign (button, GTK_ALIGN_END);
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- gtk_style_context_add_class (gtk_widget_get_style_context (button), "image-button");
gtk_style_context_add_class (gtk_widget_get_style_context (button), "sidebar-button");
gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 2);
- gtk_container_add (GTK_CONTAINER (button),
- gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON));
gtk_container_add (GTK_CONTAINER (row), grid);
gtk_container_add (GTK_CONTAINER (priv->recent_servers_listbox), row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]