Skip to content
Permalink
Browse files

avoid 'gtk_info_bar_add_button' with stock ids

  • Loading branch information...
sc0w committed Apr 15, 2018
1 parent 4c0af0c commit 1eb3e7807e74f91c809e0ef57da2ef704fa54237
Showing with 15 additions and 9 deletions.
  1. +11 −6 pluma/pluma-io-error-message-area.c
  2. +4 −3 pluma/pluma-progress-message-area.c
@@ -499,9 +499,11 @@ create_conversion_error_message_area (const gchar *primary_text,
}
else
{
gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
"gtk-cancel",
GTK_RESPONSE_CANCEL);
gtk_button_set_image (GTK_BUTTON (gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
_("_Cancel"),
GTK_RESPONSE_CANCEL)),
gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));

gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
GTK_MESSAGE_ERROR);
}
@@ -1179,9 +1181,12 @@ pluma_externally_modified_message_area_new (const gchar *uri,
_("_Reload"),
"view-refresh",
GTK_RESPONSE_OK);
gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
"gtk-cancel",
GTK_RESPONSE_CANCEL);

gtk_button_set_image (GTK_BUTTON (gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
_("_Cancel"),
GTK_RESPONSE_CANCEL)),
gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));

gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
GTK_MESSAGE_WARNING);

@@ -62,9 +62,10 @@ pluma_progress_message_area_set_has_cancel_button (PlumaProgressMessageArea *are
gboolean has_button)
{
if (has_button)
gtk_info_bar_add_button (GTK_INFO_BAR (area),
"gtk-cancel",
GTK_RESPONSE_CANCEL);
gtk_button_set_image (GTK_BUTTON (gtk_info_bar_add_button (GTK_INFO_BAR (area),
_("_Cancel"),
GTK_RESPONSE_CANCEL)),
gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));

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

0 comments on commit 1eb3e78

Please sign in to comment.
You can’t perform that action at this time.