Skip to content

Commit 1eb3e78

Browse files
committed
avoid 'gtk_info_bar_add_button' with stock ids
1 parent 4c0af0c commit 1eb3e78

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

pluma/pluma-io-error-message-area.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,11 @@ create_conversion_error_message_area (const gchar *primary_text,
499499
}
500500
else
501501
{
502-
gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
503-
"gtk-cancel",
504-
GTK_RESPONSE_CANCEL);
502+
gtk_button_set_image (GTK_BUTTON (gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
503+
_("_Cancel"),
504+
GTK_RESPONSE_CANCEL)),
505+
gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));
506+
505507
gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
506508
GTK_MESSAGE_ERROR);
507509
}
@@ -1179,9 +1181,12 @@ pluma_externally_modified_message_area_new (const gchar *uri,
11791181
_("_Reload"),
11801182
"view-refresh",
11811183
GTK_RESPONSE_OK);
1182-
gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
1183-
"gtk-cancel",
1184-
GTK_RESPONSE_CANCEL);
1184+
1185+
gtk_button_set_image (GTK_BUTTON (gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
1186+
_("_Cancel"),
1187+
GTK_RESPONSE_CANCEL)),
1188+
gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));
1189+
11851190
gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
11861191
GTK_MESSAGE_WARNING);
11871192

pluma/pluma-progress-message-area.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ pluma_progress_message_area_set_has_cancel_button (PlumaProgressMessageArea *are
6262
gboolean has_button)
6363
{
6464
if (has_button)
65-
gtk_info_bar_add_button (GTK_INFO_BAR (area),
66-
"gtk-cancel",
67-
GTK_RESPONSE_CANCEL);
65+
gtk_button_set_image (GTK_BUTTON (gtk_info_bar_add_button (GTK_INFO_BAR (area),
66+
_("_Cancel"),
67+
GTK_RESPONSE_CANCEL)),
68+
gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));
6869

6970
g_object_notify (G_OBJECT (area), "has-cancel-button");
7071
}

0 commit comments

Comments
 (0)