diff options
author | Milan Crha <mcrha@redhat.com> | 2014-02-13 03:45:53 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-02-13 03:47:07 +0800 |
commit | b48e21d9aa7eb16e559739b71b9d08f90dfa92be (patch) | |
tree | 22244f22b235b1dfc80bbc50c7e2ab8eecb91cdf /e-util/e-alert-bar.c | |
parent | 4bdbb71da69076287ffbb781109aa5687026349c (diff) | |
download | gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.gz gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.bz2 gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.lz gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.xz gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.zst gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.zip |
Stop using deprecated gtk-stock items
Diffstat (limited to 'e-util/e-alert-bar.c')
-rw-r--r-- | e-util/e-alert-bar.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/e-util/e-alert-bar.c b/e-util/e-alert-bar.c index 2ed7dfe45a..233de93245 100644 --- a/e-util/e-alert-bar.c +++ b/e-util/e-alert-bar.c @@ -20,6 +20,8 @@ #include <config.h> #include <glib/gi18n-lib.h> +#include "e-dialog-widgets.h" + #define E_ALERT_BAR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_ALERT_BAR, EAlertBarPrivate)) @@ -65,7 +67,7 @@ alert_bar_show_alert (EAlertBar *alert_bar) GtkMessageType message_type; const gchar *primary_text; const gchar *secondary_text; - const gchar *stock_id; + const gchar *icon_name; gboolean have_primary_text; gboolean have_secondary_text; gboolean visible; @@ -108,11 +110,7 @@ alert_bar_show_alert (EAlertBar *alert_bar) } /* Add a dismiss button. */ - widget = gtk_button_new (); - gtk_button_set_image ( - GTK_BUTTON (widget), - gtk_image_new_from_stock ( - GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU)); + widget = e_dialog_button_new_with_icon ("window-close", NULL); gtk_button_set_relief ( GTK_BUTTON (widget), GTK_RELIEF_NONE); gtk_widget_set_tooltip_text ( @@ -166,9 +164,9 @@ alert_bar_show_alert (EAlertBar *alert_bar) gtk_widget_set_visible (widget, have_secondary_text); g_free (markup); - stock_id = e_alert_get_stock_id (alert); + icon_name = e_alert_get_icon_name (alert); image = GTK_IMAGE (alert_bar->priv->image); - gtk_image_set_from_stock (image, stock_id, ICON_SIZE); + gtk_image_set_from_icon_name (image, icon_name, ICON_SIZE); /* Avoid showing an image for one-line alerts, * which are usually questions or informational. */ |