libgimpwidgets: mostly port from stock IDs to icon names

Add some new API and deprecate old one.
This commit is contained in:
Michael Natterer
2014-05-07 21:27:57 +02:00
parent 233b86b32d
commit 79bd9c60de
22 changed files with 346 additions and 114 deletions

View File

@ -81,7 +81,7 @@ static QueryBox * create_query_box (const gchar *title,
GimpHelpFunc help_func,
const gchar *help_id,
GCallback response_callback,
const gchar *stock_id,
const gchar *icon_name,
const gchar *message,
const gchar *ok_button,
const gchar *cancel_button,
@ -121,7 +121,7 @@ create_query_box (const gchar *title,
GimpHelpFunc help_func,
const gchar *help_id,
GCallback response_callback,
const gchar *stock_id,
const gchar *icon_name,
const gchar *message,
const gchar *ok_button,
const gchar *cancel_button,
@ -178,7 +178,7 @@ create_query_box (const gchar *title,
g_signal_connect_closure (object, signal, closure, FALSE);
}
if (stock_id)
if (icon_name)
{
GtkWidget *content_area;
GtkWidget *image;
@ -190,7 +190,7 @@ create_query_box (const gchar *title,
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
@ -503,7 +503,7 @@ gimp_query_size_box (const gchar *title,
* @parent: The dialog's parent widget.
* @help_func: The help function to show this dialog's help page.
* @help_id: A string identifying this dialog's help page.
* @stock_id: A stock_id to specify an icon to appear on the left
* @icon_name: An icon name to specify an icon to appear on the left
* on the dialog's message.
* @message: A string which will be shown in the query box.
* @true_button: The string to be shown in the dialog's left button.
@ -524,7 +524,7 @@ gimp_query_boolean_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_id,
const gchar *stock_id,
const gchar *icon_name,
const gchar *message,
const gchar *true_button,
const gchar *false_button,
@ -537,7 +537,7 @@ gimp_query_boolean_box (const gchar *title,
query_box = create_query_box (title, parent, help_func, help_id,
G_CALLBACK (boolean_query_box_response),
stock_id,
icon_name,
message,
true_button, false_button,
object, signal,