[libgd/wip/ernestask/gtk4: 23/33] notification: use gtk_button_new_from_icon_name()
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd/wip/ernestask/gtk4: 23/33] notification: use gtk_button_new_from_icon_name()
- Date: Sun, 11 Mar 2018 08:19:22 +0000 (UTC)
commit 71ac56ddf374741ed17089d9114abde5c191e12e
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat Mar 10 21:56:52 2018 +0200
notification: use gtk_button_new_from_icon_name()
libgd/gd-notification.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/libgd/gd-notification.c b/libgd/gd-notification.c
index 0dea787..7182d45 100644
--- a/libgd/gd-notification.c
+++ b/libgd/gd-notification.c
@@ -108,7 +108,6 @@ G_DEFINE_TYPE(GdNotification, gd_notification, GTK_TYPE_BIN);
static void
gd_notification_init (GdNotification *notification)
{
- GtkWidget *close_button_image;
GtkStyleContext *context;
GdNotificationPrivate *priv;
@@ -127,7 +126,7 @@ gd_notification_init (GdNotification *notification)
GdNotificationPrivate);
priv->animate_y = 0;
- priv->close_button = gtk_button_new ();
+ priv->close_button = gtk_button_new_from_icon_name ("window-close-symbolic");
gtk_widget_set_parent (priv->close_button, GTK_WIDGET (notification));
gtk_widget_show (priv->close_button);
g_object_set (priv->close_button,
@@ -138,8 +137,6 @@ gd_notification_init (GdNotification *notification)
"clicked",
G_CALLBACK (gd_notification_close_button_clicked_cb),
notification);
- close_button_image = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (notification->priv->close_button), close_button_image);
priv->timeout_source_id = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]