xed-progress-message-area: Clean up more uses of GtkStock
This commit is contained in:
parent
a1671a6227
commit
32fd96e327
|
@ -275,7 +275,7 @@ XedProgressMessageAreaPrivate
|
|||
<TITLE>XedProgressMessageArea</TITLE>
|
||||
XedProgressMessageArea
|
||||
xed_progress_message_area_new
|
||||
xed_progress_message_area_set_stock_image
|
||||
xed_progress_message_area_set_image
|
||||
xed_progress_message_area_set_markup
|
||||
xed_progress_message_area_set_text
|
||||
xed_progress_message_area_set_fraction
|
||||
|
|
|
@ -64,7 +64,7 @@ xed_progress_message_area_set_has_cancel_button (XedProgressMessageArea *area,
|
|||
{
|
||||
if (has_button)
|
||||
{
|
||||
gtk_info_bar_add_button (GTK_INFO_BAR (area), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
|
||||
gtk_info_bar_add_button (GTK_INFO_BAR (area), _("Cancel"), GTK_RESPONSE_CANCEL);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (area), "has-cancel-button");
|
||||
|
@ -141,7 +141,7 @@ xed_progress_message_area_init (XedProgressMessageArea *area)
|
|||
gtk_widget_show (hbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
area->priv->image = gtk_image_new_from_icon_name (GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_SMALL_TOOLBAR);
|
||||
area->priv->image = gtk_image_new_from_icon_name ("image-missing", GTK_ICON_SIZE_SMALL_TOOLBAR);
|
||||
gtk_widget_show (area->priv->image);
|
||||
gtk_widget_set_halign (area->priv->image, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (area->priv->image, GTK_ALIGN_CENTER);
|
||||
|
@ -166,33 +166,33 @@ xed_progress_message_area_init (XedProgressMessageArea *area)
|
|||
}
|
||||
|
||||
GtkWidget *
|
||||
xed_progress_message_area_new (const gchar *stock_id,
|
||||
xed_progress_message_area_new (const gchar *icon_name,
|
||||
const gchar *markup,
|
||||
gboolean has_cancel)
|
||||
{
|
||||
XedProgressMessageArea *area;
|
||||
|
||||
g_return_val_if_fail (stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (markup != NULL, NULL);
|
||||
|
||||
area = XED_PROGRESS_MESSAGE_AREA (g_object_new (XED_TYPE_PROGRESS_MESSAGE_AREA,
|
||||
"has-cancel-button", has_cancel,
|
||||
NULL));
|
||||
|
||||
xed_progress_message_area_set_stock_image (area, stock_id);
|
||||
xed_progress_message_area_set_image (area, icon_name);
|
||||
xed_progress_message_area_set_markup (area, markup);
|
||||
|
||||
return GTK_WIDGET (area);
|
||||
}
|
||||
|
||||
void
|
||||
xed_progress_message_area_set_stock_image (XedProgressMessageArea *area,
|
||||
const gchar *stock_id)
|
||||
xed_progress_message_area_set_image (XedProgressMessageArea *area,
|
||||
const gchar *icon_name)
|
||||
{
|
||||
g_return_if_fail (XED_IS_PROGRESS_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_ICON_SIZE_SMALL_TOOLBAR);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (area->priv->image), icon_name, GTK_ICON_SIZE_SMALL_TOOLBAR);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -76,12 +76,12 @@ struct _XedProgressMessageAreaClass
|
|||
*/
|
||||
GType xed_progress_message_area_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget *xed_progress_message_area_new (const gchar *stock_id,
|
||||
GtkWidget *xed_progress_message_area_new (const gchar *icon_name,
|
||||
const gchar *markup,
|
||||
gboolean has_cancel);
|
||||
|
||||
void xed_progress_message_area_set_stock_image (XedProgressMessageArea *area,
|
||||
const gchar *stock_id);
|
||||
void xed_progress_message_area_set_image (XedProgressMessageArea *area,
|
||||
const gchar *icon_name);
|
||||
|
||||
void xed_progress_message_area_set_markup (XedProgressMessageArea *area,
|
||||
const gchar *markup);
|
||||
|
|
|
@ -657,7 +657,7 @@ show_loading_message_area (XedTab *tab)
|
|||
msg = g_strdup_printf (_("Reverting %s"), name_markup);
|
||||
}
|
||||
|
||||
area = xed_progress_message_area_new (GTK_STOCK_REVERT_TO_SAVED, msg, TRUE);
|
||||
area = xed_progress_message_area_new ("document-revert-symbolic", msg, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -675,7 +675,7 @@ show_loading_message_area (XedTab *tab)
|
|||
msg = g_strdup_printf (_("Loading %s"), name_markup);
|
||||
}
|
||||
|
||||
area = xed_progress_message_area_new (GTK_STOCK_OPEN, msg, TRUE);
|
||||
area = xed_progress_message_area_new ("document-open-symbolic", msg, TRUE);
|
||||
}
|
||||
|
||||
g_signal_connect (area, "response",
|
||||
|
@ -758,7 +758,7 @@ show_saving_message_area (XedTab *tab)
|
|||
msg = g_strdup_printf (_("Saving %s"), from_markup);
|
||||
}
|
||||
|
||||
area = xed_progress_message_area_new (GTK_STOCK_SAVE, msg, FALSE);
|
||||
area = xed_progress_message_area_new ("document-save-symbolic", msg, FALSE);
|
||||
|
||||
gtk_widget_show (area);
|
||||
|
||||
|
@ -2316,11 +2316,11 @@ show_printing_message_area (XedTab *tab,
|
|||
|
||||
if (preview)
|
||||
{
|
||||
area = xed_progress_message_area_new (GTK_STOCK_PRINT_PREVIEW, "", TRUE);
|
||||
area = xed_progress_message_area_new ("document-print-preview-symbolic", "", TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
area = xed_progress_message_area_new (GTK_STOCK_PRINT, "", TRUE);
|
||||
area = xed_progress_message_area_new ("document-print-symbolic", "", TRUE);
|
||||
}
|
||||
|
||||
g_signal_connect (area, "response",
|
||||
|
|
Loading…
Reference in New Issue