diff options
author | raveit65 <[email protected]> | 2017-03-11 19:33:35 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-04-07 13:03:17 +0200 |
commit | f2064cf1c9eb305dbf3a0fd9a77bd7fde2ca95c9 (patch) | |
tree | e45f371e2cd5b963da90d25ad045a6230ae59697 /shell | |
parent | a7213ba90c625a0f28eb1138797ccb732fb0e167 (diff) | |
download | atril-f2064cf1c9eb305dbf3a0fd9a77bd7fde2ca95c9.tar.bz2 atril-f2064cf1c9eb305dbf3a0fd9a77bd7fde2ca95c9.tar.xz |
message-area: replace some GtkStock deprecations
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-message-area.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/shell/ev-message-area.c b/shell/ev-message-area.c index 64a11ee2..7b77ddb1 100644 --- a/shell/ev-message-area.c +++ b/shell/ev-message-area.c @@ -126,7 +126,7 @@ ev_message_area_init (EvMessageArea *area) gtk_widget_set_can_focus (area->priv->secondary_label, TRUE); gtk_box_pack_start (GTK_BOX (vbox), area->priv->secondary_label, TRUE, TRUE, 0); - area->priv->image = gtk_image_new_from_stock (NULL, GTK_ICON_SIZE_DIALOG); + area->priv->image = gtk_image_new_from_icon_name (NULL, GTK_ICON_SIZE_DIALOG); gtk_widget_set_halign (area->priv->image, GTK_ALIGN_CENTER); gtk_widget_set_valign (area->priv->image, GTK_ALIGN_START); gtk_box_pack_start (GTK_BOX (hbox), area->priv->image, FALSE, FALSE, 0); @@ -147,21 +147,21 @@ static void ev_message_area_set_image_for_type (EvMessageArea *area, GtkMessageType type) { - const gchar *stock_id = NULL; + const gchar *icon_name = NULL; AtkObject *atk_obj; switch (type) { case GTK_MESSAGE_INFO: - stock_id = GTK_STOCK_DIALOG_INFO; + icon_name = "dialog-information"; break; case GTK_MESSAGE_QUESTION: - stock_id = GTK_STOCK_DIALOG_QUESTION; + icon_name = "dialog-question"; break; case GTK_MESSAGE_WARNING: - stock_id = GTK_STOCK_DIALOG_WARNING; + icon_name = "dialog-warning"; break; case GTK_MESSAGE_ERROR: - stock_id = GTK_STOCK_DIALOG_ERROR; + icon_name = "dialog-error"; break; case GTK_MESSAGE_OTHER: break; @@ -170,17 +170,17 @@ ev_message_area_set_image_for_type (EvMessageArea *area, break; } - if (stock_id) - gtk_image_set_from_stock (GTK_IMAGE (area->priv->image), stock_id, + if (icon_name) + gtk_image_set_from_icon_name (GTK_IMAGE (area->priv->image), icon_name, GTK_ICON_SIZE_DIALOG); atk_obj = gtk_widget_get_accessible (GTK_WIDGET (area)); if (GTK_IS_ACCESSIBLE (atk_obj)) { atk_object_set_role (atk_obj, ATK_ROLE_ALERT); - if (stock_id) { + if (icon_name) { GtkStockItem item; - gtk_stock_lookup (stock_id, &item); + gtk_stock_lookup (icon_name, &item); atk_object_set_name (atk_obj, item.label); } } @@ -312,13 +312,13 @@ ev_message_area_set_image (EvMessageArea *area, void ev_message_area_set_image_from_stock (EvMessageArea *area, - const gchar *stock_id) + const gchar *icon_name) { g_return_if_fail (EV_IS_MESSAGE_AREA (area)); - g_return_if_fail (stock_id != NULL); + g_return_if_fail (icon_name != NULL); - gtk_image_set_from_stock (GTK_IMAGE (area->priv->image), - stock_id, + gtk_image_set_from_icon_name (GTK_IMAGE (area->priv->image), + icon_name, GTK_ICON_SIZE_DIALOG); } |