mirror of https://github.com/GNOME/gimp.git
app: port most of app's GUI from stock IDs to icon names
There is still quite some stock ID rendering around, stay tuned...
This commit is contained in:
parent
b7e50079a6
commit
0d2d1c3752
|
@ -57,7 +57,7 @@ channel_options_dialog_new (GimpImage *image,
|
|||
const gchar *channel_name,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id,
|
||||
const gchar *color_label,
|
||||
|
@ -78,7 +78,7 @@ channel_options_dialog_new (GimpImage *image,
|
|||
g_return_val_if_fail (channel_color != NULL, NULL);
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
g_return_val_if_fail (role != NULL, NULL);
|
||||
g_return_val_if_fail (stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (desc != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
g_return_val_if_fail (color_label != NULL, NULL);
|
||||
|
@ -104,7 +104,7 @@ channel_options_dialog_new (GimpImage *image,
|
|||
|
||||
options->dialog =
|
||||
gimp_viewable_dialog_new (viewable, context,
|
||||
title, role, stock_id, desc,
|
||||
title, role, icon_name, desc,
|
||||
parent,
|
||||
gimp_standard_help_func, help_id,
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ ChannelOptionsDialog * channel_options_dialog_new (GimpImage *image,
|
|||
const gchar *channel_name,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id,
|
||||
const gchar *color_label,
|
||||
|
|
|
@ -132,8 +132,8 @@ convert_precision_dialog_new (GimpImage *image,
|
|||
button = gtk_dialog_add_button (GTK_DIALOG (dialog->dialog),
|
||||
_("C_onvert"), GTK_RESPONSE_OK);
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GIMP_STOCK_CONVERT_PRECISION,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name (GIMP_STOCK_CONVERT_PRECISION,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
|
|
|
@ -140,8 +140,8 @@ convert_type_dialog_new (GimpImage *image,
|
|||
button = gtk_dialog_add_button (GTK_DIALOG (dialog->dialog),
|
||||
_("C_onvert"), GTK_RESPONSE_OK);
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GIMP_STOCK_CONVERT_INDEXED,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name (GIMP_STOCK_CONVERT_INDEXED,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
|
|
|
@ -62,7 +62,7 @@ GimpContainer *global_recent_docks = NULL;
|
|||
{ id /* identifier */, \
|
||||
NULL /* name */, \
|
||||
NULL /* blurb */, \
|
||||
NULL /* stock_id */, \
|
||||
NULL /* icon_name */, \
|
||||
NULL /* help_id */, \
|
||||
NULL /* new_func */, \
|
||||
dialogs_restore_dialog /* restore_func */, \
|
||||
|
@ -79,7 +79,7 @@ GimpContainer *global_recent_docks = NULL;
|
|||
{ id /* identifier */, \
|
||||
NULL /* name */, \
|
||||
NULL /* blurb */, \
|
||||
NULL /* stock_id */, \
|
||||
NULL /* icon_name */, \
|
||||
NULL /* help_id */, \
|
||||
NULL /* new_func */, \
|
||||
dialogs_restore_window /* restore_func */, \
|
||||
|
@ -96,7 +96,7 @@ GimpContainer *global_recent_docks = NULL;
|
|||
{ id /* identifier */, \
|
||||
NULL /* name */, \
|
||||
NULL /* blurb */, \
|
||||
NULL /* stock_id */, \
|
||||
NULL /* icon_name */, \
|
||||
NULL /* help_id */, \
|
||||
new_func /* new_func */, \
|
||||
dialogs_restore_dialog /* restore_func */, \
|
||||
|
@ -109,11 +109,11 @@ GimpContainer *global_recent_docks = NULL;
|
|||
FALSE /* image_window */, \
|
||||
FALSE /* dockable */}
|
||||
|
||||
#define DOCKABLE(id, name, blurb, stock_id, help_id, new_func, view_size, singleton) \
|
||||
#define DOCKABLE(id, name, blurb, icon_name, help_id, new_func, view_size, singleton) \
|
||||
{ id /* identifier */, \
|
||||
name /* name */, \
|
||||
blurb /* blurb */, \
|
||||
stock_id /* stock_id */, \
|
||||
icon_name /* icon_name */, \
|
||||
help_id /* help_id */, \
|
||||
new_func /* new_func */, \
|
||||
NULL /* restore_func */, \
|
||||
|
@ -130,7 +130,7 @@ GimpContainer *global_recent_docks = NULL;
|
|||
{ id /* identifier */, \
|
||||
NULL /* name */, \
|
||||
NULL /* blurb */, \
|
||||
NULL /* stock_id */, \
|
||||
NULL /* icon_name */, \
|
||||
NULL /* help_id */, \
|
||||
new_func /* new_func */, \
|
||||
dialogs_restore_dialog /* restore_func */, \
|
||||
|
@ -147,7 +147,7 @@ GimpContainer *global_recent_docks = NULL;
|
|||
{ id /* identifier */, \
|
||||
NULL /* name */, \
|
||||
NULL /* blurb */, \
|
||||
NULL /* stock_id */, \
|
||||
NULL /* icon_name */, \
|
||||
NULL /* help_id */, \
|
||||
new_func /* new_func */, \
|
||||
dialogs_restore_dialog /* restore_func */, \
|
||||
|
@ -160,11 +160,11 @@ GimpContainer *global_recent_docks = NULL;
|
|||
FALSE /* image_window */, \
|
||||
FALSE /* dockable */}
|
||||
|
||||
#define LISTGRID(id, name, blurb, stock_id, help_id, view_size) \
|
||||
#define LISTGRID(id, name, blurb, icon_name, help_id, view_size) \
|
||||
{ "gimp-"#id"-list" /* identifier */, \
|
||||
name /* name */, \
|
||||
blurb /* blurb */, \
|
||||
stock_id /* stock_id */, \
|
||||
icon_name /* icon_name */, \
|
||||
help_id /* help_id */, \
|
||||
dialogs_##id##_list_view_new /* new_func */, \
|
||||
NULL /* restore_func */, \
|
||||
|
@ -179,7 +179,7 @@ GimpContainer *global_recent_docks = NULL;
|
|||
{ "gimp-"#id"-grid" /* identifier */, \
|
||||
name /* name */, \
|
||||
blurb /* blurb */, \
|
||||
stock_id /* stock_id */, \
|
||||
icon_name /* icon_name */, \
|
||||
help_id /* help_id */, \
|
||||
dialogs_##id##_grid_view_new /* new_func */, \
|
||||
NULL /* restore_func */, \
|
||||
|
@ -192,11 +192,11 @@ GimpContainer *global_recent_docks = NULL;
|
|||
FALSE /* image_window */, \
|
||||
TRUE /* dockable */}
|
||||
|
||||
#define LIST(id, new_func, name, blurb, stock_id, help_id, view_size) \
|
||||
#define LIST(id, new_func, name, blurb, icon_name, help_id, view_size) \
|
||||
{ "gimp-"#id"-list" /* identifier */, \
|
||||
name /* name */, \
|
||||
blurb /* blurb */, \
|
||||
stock_id /* stock_id */, \
|
||||
icon_name /* icon_name */, \
|
||||
help_id /* help_id */, \
|
||||
dialogs_##new_func##_list_view_new /* new_func */, \
|
||||
NULL /* restore_func */, \
|
||||
|
@ -513,7 +513,7 @@ dialogs_init (Gimp *gimp,
|
|||
entries[i].identifier,
|
||||
gettext (entries[i].name),
|
||||
gettext (entries[i].blurb),
|
||||
entries[i].stock_id,
|
||||
entries[i].icon_name,
|
||||
entries[i].help_id,
|
||||
entries[i].new_func,
|
||||
entries[i].restore_func,
|
||||
|
|
|
@ -59,7 +59,7 @@ layer_options_dialog_new (GimpImage *image,
|
|||
GimpFillType layer_fill_type,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ layer_options_dialog_new (GimpImage *image,
|
|||
|
||||
options->dialog =
|
||||
gimp_viewable_dialog_new (viewable, context,
|
||||
title, role, stock_id, desc,
|
||||
title, role, icon_name, desc,
|
||||
parent,
|
||||
gimp_standard_help_func, help_id,
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ LayerOptionsDialog * layer_options_dialog_new (GimpImage *image,
|
|||
GimpFillType layer_fill_type,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id);
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ module_dialog_new (Gimp *gimp)
|
|||
dialog->error_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), dialog->error_box, FALSE, FALSE, 0);
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_WARNING, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (GIMP_STOCK_WARNING, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_box_pack_start (GTK_BOX (dialog->error_box), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
|
|
@ -163,8 +163,8 @@ palette_import_dialog_new (GimpContext *context)
|
|||
button = gtk_dialog_add_button (GTK_DIALOG (dialog->dialog),
|
||||
_("_Import"), GTK_RESPONSE_OK);
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_CONVERT,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name (GTK_STOCK_CONVERT,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
|
|
|
@ -845,13 +845,13 @@ prefs_profile_combo_box_new (GObject *config,
|
|||
}
|
||||
|
||||
static GtkWidget *
|
||||
prefs_button_add (const gchar *stock_id,
|
||||
prefs_button_add (const gchar *icon_name,
|
||||
const gchar *label,
|
||||
GtkBox *box)
|
||||
{
|
||||
GtkWidget *button;
|
||||
|
||||
button = gimp_stock_button_new (stock_id, label);
|
||||
button = gimp_icon_button_new (icon_name, label);
|
||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -881,7 +881,7 @@ static GtkWidget *
|
|||
prefs_check_button_add_with_icon (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GtkBox *vbox,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
|
@ -897,7 +897,7 @@ prefs_check_button_add_with_icon (GObject *config,
|
|||
gtk_box_pack_start (vbox, hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_misc_set_padding (GTK_MISC (image), 2, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
|
@ -1633,7 +1633,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 1, 2);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
image = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
|
|
@ -336,8 +336,8 @@ quit_close_all_dialog_container_changed (GimpContainer *images,
|
|||
|
||||
gtk_widget_show (dialog->lost_label);
|
||||
|
||||
icon = gtk_image_new_from_stock (GTK_STOCK_DELETE,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
icon = gtk_image_new_from_icon_name (GTK_STOCK_DELETE,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
g_object_set (dialog->ok_button,
|
||||
"label", _("_Discard Changes"),
|
||||
"use-stock", FALSE,
|
||||
|
|
|
@ -60,7 +60,7 @@ GtkWidget *
|
|||
stroke_dialog_new (GimpItem *item,
|
||||
GimpContext *context,
|
||||
const gchar *title,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ stroke_dialog_new (GimpItem *item,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_ITEM (item), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
g_return_val_if_fail (parent == NULL || GTK_IS_WIDGET (parent), NULL);
|
||||
|
||||
|
@ -93,7 +93,7 @@ stroke_dialog_new (GimpItem *item,
|
|||
|
||||
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (item), context,
|
||||
title, "gimp-stroke-options",
|
||||
stock_id,
|
||||
icon_name,
|
||||
_("Choose Stroke Style"),
|
||||
parent,
|
||||
gimp_standard_help_func,
|
||||
|
@ -101,7 +101,7 @@ stroke_dialog_new (GimpItem *item,
|
|||
|
||||
GIMP_STOCK_RESET, RESPONSE_RESET,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
stock_id, GTK_RESPONSE_OK,
|
||||
icon_name, GTK_RESPONSE_OK,
|
||||
|
||||
NULL);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
GtkWidget * stroke_dialog_new (GimpItem *item,
|
||||
GimpContext *context,
|
||||
const gchar *title,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id,
|
||||
GtkWidget *parent);
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ template_options_dialog_new (GimpTemplate *template,
|
|||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ template_options_dialog_new (GimpTemplate *template,
|
|||
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
g_return_val_if_fail (role != NULL, NULL);
|
||||
g_return_val_if_fail (stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (desc != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
|
||||
|
@ -86,7 +86,7 @@ template_options_dialog_new (GimpTemplate *template,
|
|||
|
||||
options->dialog =
|
||||
gimp_viewable_dialog_new (viewable, context,
|
||||
title, role, stock_id, desc,
|
||||
title, role, icon_name, desc,
|
||||
parent,
|
||||
gimp_standard_help_func, help_id,
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ TemplateOptionsDialog * template_options_dialog_new (GimpTemplate *template,
|
|||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id);
|
||||
|
||||
|
|
|
@ -134,14 +134,14 @@ tips_dialog_create (Gimp *gimp)
|
|||
button = gtk_dialog_add_button (GTK_DIALOG (tips_dialog),
|
||||
_("_Previous Tip"), RESPONSE_PREVIOUS);
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_BACK,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name (GTK_STOCK_GO_BACK,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
|
||||
button = gtk_dialog_add_button (GTK_DIALOG (tips_dialog),
|
||||
_("_Next Tip"), RESPONSE_NEXT);
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name (GTK_STOCK_GO_FORWARD,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
|
||||
gtk_dialog_set_response_sensitive (GTK_DIALOG (tips_dialog),
|
||||
RESPONSE_NEXT, tips_count > 1);
|
||||
|
@ -170,7 +170,7 @@ tips_dialog_create (Gimp *gimp)
|
|||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_INFO, GTK_ICON_SIZE_DIALOG);
|
||||
image = gtk_image_new_from_icon_name (GIMP_STOCK_INFO, 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);
|
||||
|
|
|
@ -49,7 +49,7 @@ vectors_options_dialog_new (GimpImage *image,
|
|||
const gchar *vectors_name,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ vectors_options_dialog_new (GimpImage *image,
|
|||
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
g_return_val_if_fail (role != NULL, NULL);
|
||||
g_return_val_if_fail (stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (desc != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
|
||||
|
@ -81,7 +81,7 @@ vectors_options_dialog_new (GimpImage *image,
|
|||
|
||||
options->dialog =
|
||||
gimp_viewable_dialog_new (viewable, context,
|
||||
title, role, stock_id, desc,
|
||||
title, role, icon_name, desc,
|
||||
parent,
|
||||
gimp_standard_help_func,
|
||||
help_id,
|
||||
|
|
|
@ -38,7 +38,7 @@ VectorsOptionsDialog * vectors_options_dialog_new (GimpImage *image,
|
|||
const gchar *vectors_name,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
const gchar *help_id);
|
||||
|
||||
|
|
|
@ -591,11 +591,11 @@ gimp_display_shell_quick_mask_changed_handler (GimpImage *image,
|
|||
quick_mask_state);
|
||||
|
||||
if (quick_mask_state)
|
||||
gtk_image_set_from_stock (gtk_image, GIMP_STOCK_QUICK_MASK_ON,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_icon_name (gtk_image, GIMP_STOCK_QUICK_MASK_ON,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
else
|
||||
gtk_image_set_from_stock (gtk_image, GIMP_STOCK_QUICK_MASK_OFF,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_icon_name (gtk_image, GIMP_STOCK_QUICK_MASK_OFF,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
|
||||
g_signal_handlers_unblock_by_func (shell->quick_mask_button,
|
||||
gimp_display_shell_quick_mask_toggled,
|
||||
|
|
|
@ -521,8 +521,8 @@ gimp_display_shell_constructed (GObject *object)
|
|||
/* the menu popup button */
|
||||
shell->origin = gtk_event_box_new ();
|
||||
|
||||
gtk_image = gtk_image_new_from_stock (GIMP_STOCK_MENU_RIGHT,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image = gtk_image_new_from_icon_name (GIMP_STOCK_MENU_RIGHT,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (shell->origin), gtk_image);
|
||||
gtk_widget_show (gtk_image);
|
||||
|
||||
|
@ -636,8 +636,8 @@ gimp_display_shell_constructed (GObject *object)
|
|||
NULL);
|
||||
gtk_widget_set_can_focus (shell->zoom_button, FALSE);
|
||||
|
||||
gtk_image = gtk_image_new_from_stock (GIMP_STOCK_ZOOM_FOLLOW_WINDOW,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image = gtk_image_new_from_icon_name (GIMP_STOCK_ZOOM_FOLLOW_WINDOW,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (shell->zoom_button), gtk_image);
|
||||
gtk_widget_show (gtk_image);
|
||||
|
||||
|
@ -660,8 +660,8 @@ gimp_display_shell_constructed (GObject *object)
|
|||
NULL);
|
||||
gtk_widget_set_can_focus (shell->quick_mask_button, FALSE);
|
||||
|
||||
gtk_image = gtk_image_new_from_stock (GIMP_STOCK_QUICK_MASK_OFF,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image = gtk_image_new_from_icon_name (GIMP_STOCK_QUICK_MASK_OFF,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (shell->quick_mask_button), gtk_image);
|
||||
gtk_widget_show (gtk_image);
|
||||
|
||||
|
@ -684,8 +684,8 @@ gimp_display_shell_constructed (GObject *object)
|
|||
/* the navigation window button */
|
||||
shell->nav_ebox = gtk_event_box_new ();
|
||||
|
||||
gtk_image = gtk_image_new_from_stock (GIMP_STOCK_NAVIGATION,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image = gtk_image_new_from_icon_name (GIMP_STOCK_NAVIGATION,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (shell->nav_ebox), gtk_image);
|
||||
gtk_widget_show (gtk_image);
|
||||
|
||||
|
|
|
@ -2208,8 +2208,8 @@ gimp_image_window_create_tab_label (GimpImageWindow *window,
|
|||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_image = gtk_image_new_from_stock (GIMP_STOCK_CLOSE,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image = gtk_image_new_from_icon_name (GIMP_STOCK_CLOSE,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_image);
|
||||
gtk_widget_show (gtk_image);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef struct _GimpStatusbarMsg GimpStatusbarMsg;
|
|||
struct _GimpStatusbarMsg
|
||||
{
|
||||
guint context_id;
|
||||
gchar *stock_id;
|
||||
gchar *icon_name;
|
||||
gchar *text;
|
||||
};
|
||||
|
||||
|
@ -258,7 +258,7 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
|
|||
gtk_container_add (GTK_CONTAINER (statusbar->cancel_button), hbox2);
|
||||
gtk_widget_show (hbox2);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (GTK_STOCK_CANCEL, GTK_ICON_SIZE_MENU);
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), image, FALSE, FALSE, 2);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -524,7 +524,7 @@ gimp_statusbar_progress_message (GimpProgress *progress,
|
|||
{
|
||||
GimpStatusbar *statusbar = GIMP_STATUSBAR (progress);
|
||||
PangoLayout *layout;
|
||||
const gchar *stock_id;
|
||||
const gchar *icon_name;
|
||||
gboolean handle_msg = FALSE;
|
||||
|
||||
/* don't accept a message if we are already displaying a more severe one */
|
||||
|
@ -534,7 +534,7 @@ gimp_statusbar_progress_message (GimpProgress *progress,
|
|||
/* we can only handle short one-liners */
|
||||
layout = gtk_widget_create_pango_layout (statusbar->label, message);
|
||||
|
||||
stock_id = gimp_get_message_stock_id (severity);
|
||||
icon_name = gimp_get_message_icon_name (severity);
|
||||
|
||||
if (pango_layout_get_line_count (layout) == 1)
|
||||
{
|
||||
|
@ -547,11 +547,11 @@ gimp_statusbar_progress_message (GimpProgress *progress,
|
|||
|
||||
if (width < label_allocation.width)
|
||||
{
|
||||
if (stock_id)
|
||||
if (icon_name)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = gtk_widget_render_icon (statusbar->label, stock_id,
|
||||
pixbuf = gtk_widget_render_icon (statusbar->label, icon_name,
|
||||
GTK_ICON_SIZE_MENU, NULL);
|
||||
|
||||
width += ICON_SPACING + gdk_pixbuf_get_width (pixbuf);
|
||||
|
@ -570,7 +570,7 @@ gimp_statusbar_progress_message (GimpProgress *progress,
|
|||
g_object_unref (layout);
|
||||
|
||||
if (handle_msg)
|
||||
gimp_statusbar_push_temp (statusbar, severity, stock_id, "%s", message);
|
||||
gimp_statusbar_push_temp (statusbar, severity, icon_name, "%s", message);
|
||||
|
||||
return handle_msg;
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ gimp_statusbar_progress_canceled (GtkWidget *button,
|
|||
|
||||
static void
|
||||
gimp_statusbar_set_text (GimpStatusbar *statusbar,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *text)
|
||||
{
|
||||
if (statusbar->progress_active)
|
||||
|
@ -598,9 +598,9 @@ gimp_statusbar_set_text (GimpStatusbar *statusbar,
|
|||
if (statusbar->icon)
|
||||
g_object_unref (statusbar->icon);
|
||||
|
||||
if (stock_id)
|
||||
if (icon_name)
|
||||
statusbar->icon = gtk_widget_render_icon (statusbar->label,
|
||||
stock_id,
|
||||
icon_name,
|
||||
GTK_ICON_SIZE_MENU, NULL);
|
||||
else
|
||||
statusbar->icon = NULL;
|
||||
|
@ -662,7 +662,7 @@ gimp_statusbar_update (GimpStatusbar *statusbar)
|
|||
|
||||
if (msg && msg->text)
|
||||
{
|
||||
gimp_statusbar_set_text (statusbar, msg->stock_id, msg->text);
|
||||
gimp_statusbar_set_text (statusbar, msg->icon_name, msg->text);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -796,7 +796,7 @@ gimp_statusbar_restore_window_title (GimpStatusbar *statusbar)
|
|||
void
|
||||
gimp_statusbar_push (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
...)
|
||||
{
|
||||
|
@ -807,14 +807,14 @@ gimp_statusbar_push (GimpStatusbar *statusbar,
|
|||
g_return_if_fail (format != NULL);
|
||||
|
||||
va_start (args, format);
|
||||
gimp_statusbar_push_valist (statusbar, context, stock_id, format, args);
|
||||
gimp_statusbar_push_valist (statusbar, context, icon_name, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_statusbar_push_valist (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
va_list args)
|
||||
{
|
||||
|
@ -858,7 +858,7 @@ gimp_statusbar_push_valist (GimpStatusbar *statusbar,
|
|||
msg = g_slice_new (GimpStatusbarMsg);
|
||||
|
||||
msg->context_id = context_id;
|
||||
msg->stock_id = g_strdup (stock_id);
|
||||
msg->icon_name = g_strdup (icon_name);
|
||||
msg->text = message;
|
||||
|
||||
if (statusbar->temp_timeout_id)
|
||||
|
@ -872,7 +872,7 @@ gimp_statusbar_push_valist (GimpStatusbar *statusbar,
|
|||
void
|
||||
gimp_statusbar_push_coords (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GimpCursorPrecision precision,
|
||||
const gchar *title,
|
||||
gdouble x,
|
||||
|
@ -912,7 +912,7 @@ gimp_statusbar_push_coords (GimpStatusbar *statusbar,
|
|||
if (precision == GIMP_CURSOR_PRECISION_SUBPIXEL)
|
||||
{
|
||||
gimp_statusbar_push (statusbar, context,
|
||||
stock_id,
|
||||
icon_name,
|
||||
statusbar->cursor_format_str_f,
|
||||
title,
|
||||
x,
|
||||
|
@ -923,7 +923,7 @@ gimp_statusbar_push_coords (GimpStatusbar *statusbar,
|
|||
else
|
||||
{
|
||||
gimp_statusbar_push (statusbar, context,
|
||||
stock_id,
|
||||
icon_name,
|
||||
statusbar->cursor_format_str,
|
||||
title,
|
||||
(gint) RINT (x),
|
||||
|
@ -941,7 +941,7 @@ gimp_statusbar_push_coords (GimpStatusbar *statusbar,
|
|||
&xres, &yres);
|
||||
|
||||
gimp_statusbar_push (statusbar, context,
|
||||
stock_id,
|
||||
icon_name,
|
||||
statusbar->cursor_format_str,
|
||||
title,
|
||||
gimp_pixels_to_units (x, shell->unit, xres),
|
||||
|
@ -954,7 +954,7 @@ gimp_statusbar_push_coords (GimpStatusbar *statusbar,
|
|||
void
|
||||
gimp_statusbar_push_length (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *title,
|
||||
GimpOrientationType axis,
|
||||
gdouble value,
|
||||
|
@ -973,7 +973,7 @@ gimp_statusbar_push_length (GimpStatusbar *statusbar,
|
|||
if (shell->unit == GIMP_UNIT_PIXEL)
|
||||
{
|
||||
gimp_statusbar_push (statusbar, context,
|
||||
stock_id,
|
||||
icon_name,
|
||||
statusbar->length_format_str,
|
||||
title,
|
||||
(gint) RINT (value),
|
||||
|
@ -1004,7 +1004,7 @@ gimp_statusbar_push_length (GimpStatusbar *statusbar,
|
|||
}
|
||||
|
||||
gimp_statusbar_push (statusbar, context,
|
||||
stock_id,
|
||||
icon_name,
|
||||
statusbar->length_format_str,
|
||||
title,
|
||||
gimp_pixels_to_units (value, shell->unit, resolution),
|
||||
|
@ -1015,7 +1015,7 @@ gimp_statusbar_push_length (GimpStatusbar *statusbar,
|
|||
void
|
||||
gimp_statusbar_replace (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
...)
|
||||
{
|
||||
|
@ -1026,14 +1026,14 @@ gimp_statusbar_replace (GimpStatusbar *statusbar,
|
|||
g_return_if_fail (format != NULL);
|
||||
|
||||
va_start (args, format);
|
||||
gimp_statusbar_replace_valist (statusbar, context, stock_id, format, args);
|
||||
gimp_statusbar_replace_valist (statusbar, context, icon_name, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_statusbar_replace_valist (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
va_list args)
|
||||
{
|
||||
|
@ -1062,8 +1062,8 @@ gimp_statusbar_replace_valist (GimpStatusbar *statusbar,
|
|||
return;
|
||||
}
|
||||
|
||||
g_free (msg->stock_id);
|
||||
msg->stock_id = g_strdup (stock_id);
|
||||
g_free (msg->icon_name);
|
||||
msg->icon_name = g_strdup (icon_name);
|
||||
|
||||
g_free (msg->text);
|
||||
msg->text = message;
|
||||
|
@ -1078,7 +1078,7 @@ gimp_statusbar_replace_valist (GimpStatusbar *statusbar,
|
|||
msg = g_slice_new (GimpStatusbarMsg);
|
||||
|
||||
msg->context_id = context_id;
|
||||
msg->stock_id = g_strdup (stock_id);
|
||||
msg->icon_name = g_strdup (icon_name);
|
||||
msg->text = message;
|
||||
|
||||
if (statusbar->temp_timeout_id)
|
||||
|
@ -1145,21 +1145,21 @@ gimp_statusbar_pop (GimpStatusbar *statusbar,
|
|||
void
|
||||
gimp_statusbar_push_temp (GimpStatusbar *statusbar,
|
||||
GimpMessageSeverity severity,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
gimp_statusbar_push_temp_valist (statusbar, severity, stock_id, format, args);
|
||||
gimp_statusbar_push_temp_valist (statusbar, severity, icon_name, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_statusbar_push_temp_valist (GimpStatusbar *statusbar,
|
||||
GimpMessageSeverity severity,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
va_list args)
|
||||
{
|
||||
|
@ -1197,8 +1197,8 @@ gimp_statusbar_push_temp_valist (GimpStatusbar *statusbar,
|
|||
return;
|
||||
}
|
||||
|
||||
g_free (msg->stock_id);
|
||||
msg->stock_id = g_strdup (stock_id);
|
||||
g_free (msg->icon_name);
|
||||
msg->icon_name = g_strdup (icon_name);
|
||||
|
||||
g_free (msg->text);
|
||||
msg->text = message;
|
||||
|
@ -1211,7 +1211,7 @@ gimp_statusbar_push_temp_valist (GimpStatusbar *statusbar,
|
|||
msg = g_slice_new (GimpStatusbarMsg);
|
||||
|
||||
msg->context_id = statusbar->temp_context_id;
|
||||
msg->stock_id = g_strdup (stock_id);
|
||||
msg->icon_name = g_strdup (icon_name);
|
||||
msg->text = message;
|
||||
|
||||
statusbar->messages = g_slist_prepend (statusbar->messages, msg);
|
||||
|
@ -1522,7 +1522,7 @@ gimp_statusbar_temp_timeout (GimpStatusbar *statusbar)
|
|||
static void
|
||||
gimp_statusbar_msg_free (GimpStatusbarMsg *msg)
|
||||
{
|
||||
g_free (msg->stock_id);
|
||||
g_free (msg->icon_name);
|
||||
g_free (msg->text);
|
||||
|
||||
g_slice_free (GimpStatusbarMsg, msg);
|
||||
|
|
|
@ -89,17 +89,17 @@ void gimp_statusbar_restore_window_title (GimpStatusbar *statusbar
|
|||
|
||||
void gimp_statusbar_push (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (4, 5);
|
||||
void gimp_statusbar_push_valist (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
va_list args) G_GNUC_PRINTF (4, 0);
|
||||
void gimp_statusbar_push_coords (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GimpCursorPrecision precision,
|
||||
const gchar *title,
|
||||
gdouble x,
|
||||
|
@ -108,19 +108,19 @@ void gimp_statusbar_push_coords (GimpStatusbar *statusbar
|
|||
const gchar *help);
|
||||
void gimp_statusbar_push_length (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *title,
|
||||
GimpOrientationType axis,
|
||||
gdouble value,
|
||||
const gchar *help);
|
||||
void gimp_statusbar_replace (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (4, 5);
|
||||
void gimp_statusbar_replace_valist (GimpStatusbar *statusbar,
|
||||
const gchar *context,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
va_list args) G_GNUC_PRINTF (4, 0);
|
||||
const gchar * gimp_statusbar_peek (GimpStatusbar *statusbar,
|
||||
|
@ -130,12 +130,12 @@ void gimp_statusbar_pop (GimpStatusbar *statusbar
|
|||
|
||||
void gimp_statusbar_push_temp (GimpStatusbar *statusbar,
|
||||
GimpMessageSeverity severity,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (4, 5);
|
||||
void gimp_statusbar_push_temp_valist (GimpStatusbar *statusbar,
|
||||
GimpMessageSeverity severity,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *format,
|
||||
va_list args) G_GNUC_PRINTF (4, 0);
|
||||
void gimp_statusbar_pop_temp (GimpStatusbar *statusbar);
|
||||
|
|
|
@ -253,7 +253,7 @@ gui_message_error_dialog (Gimp *gimp,
|
|||
if (dialog)
|
||||
{
|
||||
gimp_error_dialog_add (GIMP_ERROR_DIALOG (dialog),
|
||||
gimp_get_message_stock_id (severity),
|
||||
gimp_get_message_icon_name (severity),
|
||||
domain, message);
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ gui_abort (const gchar *abort_message)
|
|||
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
||||
|
||||
box = g_object_new (GIMP_TYPE_MESSAGE_BOX,
|
||||
"stock-id", GIMP_STOCK_WILBER_EEK,
|
||||
"icon-name", GIMP_STOCK_WILBER_EEK,
|
||||
"border-width", 12,
|
||||
NULL);
|
||||
|
||||
|
@ -495,6 +495,11 @@ gui_restore_after_callback (Gimp *gimp,
|
|||
|
||||
gimp->message_handler = GIMP_MESSAGE_BOX;
|
||||
|
||||
g_object_set (G_OBJECT (gtk_settings_get_default ()),
|
||||
"gtk-button-images", TRUE,
|
||||
"gtk-menu-images", TRUE,
|
||||
NULL);
|
||||
|
||||
if (gui_config->restore_accels)
|
||||
menus_restore (gimp);
|
||||
|
||||
|
|
|
@ -189,51 +189,51 @@ gimp_align_options_button_new (GimpAlignOptions *options,
|
|||
{
|
||||
GtkWidget *button;
|
||||
GtkWidget *image;
|
||||
const gchar *stock_id = NULL;
|
||||
const gchar *icon_name = NULL;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case GIMP_ALIGN_LEFT:
|
||||
stock_id = GIMP_STOCK_GRAVITY_WEST;
|
||||
icon_name = GIMP_STOCK_GRAVITY_WEST;
|
||||
break;
|
||||
case GIMP_ALIGN_HCENTER:
|
||||
stock_id = GIMP_STOCK_HCENTER;
|
||||
icon_name = GIMP_STOCK_HCENTER;
|
||||
break;
|
||||
case GIMP_ALIGN_RIGHT:
|
||||
stock_id = GIMP_STOCK_GRAVITY_EAST;
|
||||
icon_name = GIMP_STOCK_GRAVITY_EAST;
|
||||
break;
|
||||
case GIMP_ALIGN_TOP:
|
||||
stock_id = GIMP_STOCK_GRAVITY_NORTH;
|
||||
icon_name = GIMP_STOCK_GRAVITY_NORTH;
|
||||
break;
|
||||
case GIMP_ALIGN_VCENTER:
|
||||
stock_id = GIMP_STOCK_VCENTER;
|
||||
icon_name = GIMP_STOCK_VCENTER;
|
||||
break;
|
||||
case GIMP_ALIGN_BOTTOM:
|
||||
stock_id = GIMP_STOCK_GRAVITY_SOUTH;
|
||||
icon_name = GIMP_STOCK_GRAVITY_SOUTH;
|
||||
break;
|
||||
case GIMP_ARRANGE_LEFT:
|
||||
stock_id = GIMP_STOCK_GRAVITY_WEST;
|
||||
icon_name = GIMP_STOCK_GRAVITY_WEST;
|
||||
break;
|
||||
case GIMP_ARRANGE_HCENTER:
|
||||
stock_id = GIMP_STOCK_HCENTER;
|
||||
icon_name = GIMP_STOCK_HCENTER;
|
||||
break;
|
||||
case GIMP_ARRANGE_RIGHT:
|
||||
stock_id = GIMP_STOCK_GRAVITY_EAST;
|
||||
icon_name = GIMP_STOCK_GRAVITY_EAST;
|
||||
break;
|
||||
case GIMP_ARRANGE_TOP:
|
||||
stock_id = GIMP_STOCK_GRAVITY_NORTH;
|
||||
icon_name = GIMP_STOCK_GRAVITY_NORTH;
|
||||
break;
|
||||
case GIMP_ARRANGE_VCENTER:
|
||||
stock_id = GIMP_STOCK_VCENTER;
|
||||
icon_name = GIMP_STOCK_VCENTER;
|
||||
break;
|
||||
case GIMP_ARRANGE_BOTTOM:
|
||||
stock_id = GIMP_STOCK_GRAVITY_SOUTH;
|
||||
icon_name = GIMP_STOCK_GRAVITY_SOUTH;
|
||||
break;
|
||||
case GIMP_ARRANGE_HFILL:
|
||||
stock_id = GIMP_STOCK_HFILL;
|
||||
icon_name = GIMP_STOCK_HFILL;
|
||||
break;
|
||||
case GIMP_ARRANGE_VFILL:
|
||||
stock_id = GIMP_STOCK_VFILL;
|
||||
icon_name = GIMP_STOCK_VFILL;
|
||||
break;
|
||||
default:
|
||||
g_return_val_if_reached (NULL);
|
||||
|
@ -244,7 +244,7 @@ gimp_align_options_button_new (GimpAlignOptions *options,
|
|||
gtk_widget_set_sensitive (button, FALSE);
|
||||
gtk_widget_show (button);
|
||||
|
||||
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_container_add (GTK_CONTAINER (button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
|
|
@ -267,8 +267,8 @@ gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
|
|||
|
||||
bc_tool->contrast_scale = scale;
|
||||
|
||||
button = gimp_stock_button_new (GIMP_STOCK_TOOL_LEVELS,
|
||||
_("Edit these Settings as Levels"));
|
||||
button = gimp_icon_button_new (GIMP_STOCK_TOOL_LEVELS,
|
||||
_("Edit these Settings as Levels"));
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
|
|
@ -279,10 +279,10 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scale);
|
||||
|
||||
button = gimp_stock_button_new (GIMP_STOCK_RESET, NULL);
|
||||
button = gimp_icon_button_new (GIMP_STOCK_RESET, NULL);
|
||||
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
|
||||
gtk_image_set_from_stock (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ enum
|
|||
{
|
||||
COLUMN_NAME,
|
||||
COLUMN_LABEL,
|
||||
COLUMN_STOCK_ID,
|
||||
COLUMN_ICON_NAME,
|
||||
N_COLUMNS
|
||||
};
|
||||
|
||||
|
@ -320,24 +320,24 @@ gimp_gegl_tool_dialog (GimpImageMapTool *image_map_tool)
|
|||
for (iter = opclasses; iter; iter = iter->next)
|
||||
{
|
||||
GeglOperationClass *opclass = GEGL_OPERATION_CLASS (iter->data);
|
||||
const gchar *stock_id;
|
||||
const gchar *icon_name;
|
||||
const gchar *label;
|
||||
|
||||
if (g_str_has_prefix (opclass->name, "gegl:"))
|
||||
{
|
||||
label = opclass->name + strlen ("gegl:");
|
||||
stock_id = GIMP_STOCK_GEGL;
|
||||
label = opclass->name + strlen ("gegl:");
|
||||
icon_name = GIMP_STOCK_GEGL;
|
||||
}
|
||||
else
|
||||
{
|
||||
label = opclass->name;
|
||||
stock_id = NULL;
|
||||
label = opclass->name;
|
||||
icon_name = NULL;
|
||||
}
|
||||
|
||||
gtk_list_store_insert_with_values (store, NULL, -1,
|
||||
COLUMN_NAME, opclass->name,
|
||||
COLUMN_LABEL, label,
|
||||
COLUMN_STOCK_ID, stock_id,
|
||||
COLUMN_NAME, opclass->name,
|
||||
COLUMN_LABEL, label,
|
||||
COLUMN_ICON_NAME, icon_name,
|
||||
-1);
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ gimp_gegl_tool_dialog (GimpImageMapTool *image_map_tool)
|
|||
cell = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, FALSE);
|
||||
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), cell,
|
||||
"stock-id", COLUMN_STOCK_ID);
|
||||
"icon-name", COLUMN_ICON_NAME);
|
||||
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE);
|
||||
|
|
|
@ -275,22 +275,22 @@ static GtkWidget *
|
|||
gimp_levels_tool_color_picker_new (GimpLevelsTool *tool,
|
||||
guint value)
|
||||
{
|
||||
const gchar *stock_id;
|
||||
const gchar *icon_name;
|
||||
const gchar *help;
|
||||
|
||||
switch (value & 0xF)
|
||||
{
|
||||
case PICK_LOW_INPUT:
|
||||
stock_id = GIMP_STOCK_COLOR_PICKER_BLACK;
|
||||
help = _("Pick black point");
|
||||
icon_name = GIMP_STOCK_COLOR_PICKER_BLACK;
|
||||
help = _("Pick black point");
|
||||
break;
|
||||
case PICK_GAMMA:
|
||||
stock_id = GIMP_STOCK_COLOR_PICKER_GRAY;
|
||||
help = _("Pick gray point");
|
||||
icon_name = GIMP_STOCK_COLOR_PICKER_GRAY;
|
||||
help = _("Pick gray point");
|
||||
break;
|
||||
case PICK_HIGH_INPUT:
|
||||
stock_id = GIMP_STOCK_COLOR_PICKER_WHITE;
|
||||
help = _("Pick white point");
|
||||
icon_name = GIMP_STOCK_COLOR_PICKER_WHITE;
|
||||
help = _("Pick white point");
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
|
@ -298,7 +298,7 @@ gimp_levels_tool_color_picker_new (GimpLevelsTool *tool,
|
|||
|
||||
return gimp_image_map_tool_add_color_picker (GIMP_IMAGE_MAP_TOOL (tool),
|
||||
GUINT_TO_POINTER (value),
|
||||
stock_id,
|
||||
icon_name,
|
||||
help);
|
||||
}
|
||||
|
||||
|
@ -586,8 +586,8 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
|
|||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gimp_stock_button_new (GIMP_STOCK_TOOL_CURVES,
|
||||
_("Edit these Settings as Curves"));
|
||||
button = gimp_icon_button_new (GIMP_STOCK_TOOL_CURVES,
|
||||
_("Edit these Settings as Curves"));
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
|
|
@ -141,10 +141,10 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scale);
|
||||
|
||||
button = gimp_stock_button_new (GIMP_STOCK_RESET, NULL);
|
||||
button = gimp_icon_button_new (GIMP_STOCK_RESET, NULL);
|
||||
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
|
||||
gtk_image_set_from_stock (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -165,10 +165,10 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scale);
|
||||
|
||||
button = gimp_stock_button_new (GIMP_STOCK_RESET, NULL);
|
||||
button = gimp_icon_button_new (GIMP_STOCK_RESET, NULL);
|
||||
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
|
||||
gtk_image_set_from_stock (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -189,10 +189,10 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scale);
|
||||
|
||||
button = gimp_stock_button_new (GIMP_STOCK_RESET, NULL);
|
||||
button = gimp_icon_button_new (GIMP_STOCK_RESET, NULL);
|
||||
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
|
||||
gtk_image_set_from_stock (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (button))),
|
||||
GIMP_STOCK_RESET, GTK_ICON_SIZE_MENU);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
|
|
@ -575,19 +575,19 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
|
|||
|
||||
spinbutton = gimp_prop_spin_button_new (config, "indent", 1.0, 10.0, 1);
|
||||
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 5);
|
||||
gimp_table_attach_stock (GTK_TABLE (table), row++,
|
||||
GTK_STOCK_INDENT, spinbutton, 1, TRUE);
|
||||
gimp_table_attach_icon (GTK_TABLE (table), row++,
|
||||
GTK_STOCK_INDENT, spinbutton, 1, TRUE);
|
||||
|
||||
spinbutton = gimp_prop_spin_button_new (config, "line-spacing", 1.0, 10.0, 1);
|
||||
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 5);
|
||||
gimp_table_attach_stock (GTK_TABLE (table), row++,
|
||||
GIMP_STOCK_LINE_SPACING, spinbutton, 1, TRUE);
|
||||
gimp_table_attach_icon (GTK_TABLE (table), row++,
|
||||
GIMP_STOCK_LINE_SPACING, spinbutton, 1, TRUE);
|
||||
|
||||
spinbutton = gimp_prop_spin_button_new (config,
|
||||
"letter-spacing", 1.0, 10.0, 1);
|
||||
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 5);
|
||||
gimp_table_attach_stock (GTK_TABLE (table), row++,
|
||||
GIMP_STOCK_LETTER_SPACING, spinbutton, 1, TRUE);
|
||||
gimp_table_attach_icon (GTK_TABLE (table), row++,
|
||||
GIMP_STOCK_LETTER_SPACING, spinbutton, 1, TRUE);
|
||||
|
||||
combo = gimp_prop_enum_combo_box_new (config, "box-mode", 0, 0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
|
||||
|
|
|
@ -242,7 +242,7 @@ GtkWidget *
|
|||
gimp_color_dialog_new (GimpViewable *viewable,
|
||||
GimpContext *context,
|
||||
const gchar *title,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
GtkWidget *parent,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
|
@ -273,7 +273,7 @@ gimp_color_dialog_new (GimpViewable *viewable,
|
|||
"role", role,
|
||||
"help-func", gimp_color_dialog_help_func,
|
||||
"help-id", GIMP_HELP_COLOR_DIALOG,
|
||||
"stock-id", stock_id,
|
||||
"icon_name", icon_name,
|
||||
"description", desc,
|
||||
"parent", parent,
|
||||
NULL);
|
||||
|
|
|
@ -61,7 +61,7 @@ GType gimp_color_dialog_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_color_dialog_new (GimpViewable *viewable,
|
||||
GimpContext *context,
|
||||
const gchar *title,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
GtkWidget *parent,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
|
|
|
@ -160,7 +160,7 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
|
|||
rend = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_tree_view_column_pack_start (column, rend, FALSE);
|
||||
gtk_tree_view_column_set_attributes (column, rend,
|
||||
"stock-id", SRC_COLUMN_ICON,
|
||||
"icon-name", SRC_COLUMN_ICON,
|
||||
NULL);
|
||||
|
||||
rend = gtk_cell_renderer_text_new ();
|
||||
|
@ -188,7 +188,8 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
|
|||
gtk_widget_set_sensitive (editor->add_button, FALSE);
|
||||
gtk_widget_show (editor->add_button);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (GTK_STOCK_GO_FORWARD,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_container_add (GTK_CONTAINER (editor->add_button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -201,7 +202,8 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
|
|||
gtk_widget_set_sensitive (editor->remove_button, FALSE);
|
||||
gtk_widget_show (editor->remove_button);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (GTK_STOCK_GO_BACK,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_container_add (GTK_CONTAINER (editor->remove_button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -266,7 +268,8 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
|
|||
NULL);
|
||||
gtk_tree_view_insert_column (GTK_TREE_VIEW (tv), column, 0);
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_VISIBLE, GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (GIMP_STOCK_VISIBLE,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_tree_view_column_set_widget (column, image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -277,7 +280,7 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
|
|||
rend = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_tree_view_column_pack_start (column, rend, FALSE);
|
||||
gtk_tree_view_column_set_attributes (column, rend,
|
||||
"stock-id", DEST_COLUMN_ICON,
|
||||
"icon-name", DEST_COLUMN_ICON,
|
||||
NULL);
|
||||
|
||||
rend = gtk_cell_renderer_text_new ();
|
||||
|
@ -414,18 +417,18 @@ gimp_color_display_editor_new (GimpColorDisplayStack *stack,
|
|||
GtkTreeIter iter;
|
||||
gboolean enabled;
|
||||
const gchar *name;
|
||||
const gchar *stock_id;
|
||||
const gchar *icon_name;
|
||||
|
||||
enabled = gimp_color_display_get_enabled (display);
|
||||
|
||||
name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->name;
|
||||
stock_id = GIMP_COLOR_DISPLAY_GET_CLASS (display)->stock_id;
|
||||
name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->name;
|
||||
icon_name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->stock_id;
|
||||
|
||||
gtk_list_store_append (editor->dest, &iter);
|
||||
|
||||
gtk_list_store_set (editor->dest, &iter,
|
||||
DEST_COLUMN_ENABLED, enabled,
|
||||
DEST_COLUMN_ICON, stock_id,
|
||||
DEST_COLUMN_ICON, icon_name,
|
||||
DEST_COLUMN_NAME, name,
|
||||
DEST_COLUMN_FILTER, display,
|
||||
-1);
|
||||
|
@ -617,18 +620,18 @@ gimp_color_display_editor_added (GimpColorDisplayStack *stack,
|
|||
GtkTreeIter iter;
|
||||
gboolean enabled;
|
||||
const gchar *name;
|
||||
const gchar *stock_id;
|
||||
const gchar *icon_name;
|
||||
|
||||
enabled = gimp_color_display_get_enabled (display);
|
||||
|
||||
name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->name;
|
||||
stock_id = GIMP_COLOR_DISPLAY_GET_CLASS (display)->stock_id;
|
||||
name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->name;
|
||||
icon_name = GIMP_COLOR_DISPLAY_GET_CLASS (display)->stock_id;
|
||||
|
||||
gtk_list_store_insert (editor->dest, &iter, position);
|
||||
|
||||
gtk_list_store_set (editor->dest, &iter,
|
||||
DEST_COLUMN_ENABLED, enabled,
|
||||
DEST_COLUMN_ICON, stock_id,
|
||||
DEST_COLUMN_ICON, icon_name,
|
||||
DEST_COLUMN_NAME, name,
|
||||
DEST_COLUMN_FILTER, display,
|
||||
-1);
|
||||
|
|
|
@ -90,9 +90,9 @@ gimp_combo_tag_entry_init (GimpComboTagEntry *entry)
|
|||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_POINTER_MOTION_MASK);
|
||||
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
GTK_STOCK_GO_DOWN);
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
GTK_STOCK_GO_DOWN);
|
||||
|
||||
g_signal_connect (entry, "icon-press",
|
||||
G_CALLBACK (gimp_combo_tag_entry_icon_press),
|
||||
|
|
|
@ -166,10 +166,10 @@ gimp_container_popup_finalize (GObject *object)
|
|||
popup->dialog_identifier = NULL;
|
||||
}
|
||||
|
||||
if (popup->dialog_stock_id)
|
||||
if (popup->dialog_icon_name)
|
||||
{
|
||||
g_free (popup->dialog_stock_id);
|
||||
popup->dialog_stock_id = NULL;
|
||||
g_free (popup->dialog_icon_name);
|
||||
popup->dialog_icon_name = NULL;
|
||||
}
|
||||
|
||||
if (popup->dialog_tooltip)
|
||||
|
@ -370,7 +370,7 @@ gimp_container_popup_new (GimpContainer *container,
|
|||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_tooltip)
|
||||
{
|
||||
GimpContainerPopup *popup;
|
||||
|
@ -390,7 +390,7 @@ gimp_container_popup_new (GimpContainer *container,
|
|||
if (dialog_factory)
|
||||
{
|
||||
g_return_val_if_fail (dialog_identifier != NULL, NULL);
|
||||
g_return_val_if_fail (dialog_stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (dialog_icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (dialog_tooltip != NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ gimp_container_popup_new (GimpContainer *container,
|
|||
{
|
||||
popup->dialog_factory = dialog_factory;
|
||||
popup->dialog_identifier = g_strdup (dialog_identifier);
|
||||
popup->dialog_stock_id = g_strdup (dialog_stock_id);
|
||||
popup->dialog_icon_name = g_strdup (dialog_icon_name);
|
||||
popup->dialog_tooltip = g_strdup (dialog_tooltip);
|
||||
}
|
||||
|
||||
|
@ -604,13 +604,13 @@ gimp_container_popup_create_view (GimpContainerPopup *popup)
|
|||
NULL,
|
||||
popup);
|
||||
|
||||
button = gimp_editor_add_stock_box (editor, GIMP_TYPE_VIEW_TYPE, "gimp",
|
||||
G_CALLBACK (gimp_container_popup_view_type_toggled),
|
||||
popup);
|
||||
button = gimp_editor_add_icon_box (editor, GIMP_TYPE_VIEW_TYPE, "gimp",
|
||||
G_CALLBACK (gimp_container_popup_view_type_toggled),
|
||||
popup);
|
||||
gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (button), popup->view_type);
|
||||
|
||||
if (popup->dialog_factory)
|
||||
gimp_editor_add_button (editor, popup->dialog_stock_id,
|
||||
gimp_editor_add_button (editor, popup->dialog_icon_name,
|
||||
popup->dialog_tooltip, NULL,
|
||||
G_CALLBACK (gimp_container_popup_dialog_clicked),
|
||||
NULL,
|
||||
|
|
|
@ -50,7 +50,7 @@ struct _GimpContainerPopup
|
|||
|
||||
GimpDialogFactory *dialog_factory;
|
||||
gchar *dialog_identifier;
|
||||
gchar *dialog_stock_id;
|
||||
gchar *dialog_icon_name;
|
||||
gchar *dialog_tooltip;
|
||||
};
|
||||
|
||||
|
@ -73,7 +73,7 @@ GtkWidget * gimp_container_popup_new (GimpContainer *container,
|
|||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_tooltip);
|
||||
void gimp_container_popup_show (GimpContainerPopup *popup,
|
||||
GtkWidget *widget);
|
||||
|
|
|
@ -792,17 +792,17 @@ gimp_container_tree_view_set_view_size (GimpContainerView *view)
|
|||
|
||||
for (list = tree_view->priv->toggle_cells; list; list = g_list_next (list))
|
||||
{
|
||||
gchar *stock_id;
|
||||
gchar *icon_name;
|
||||
GtkIconSize icon_size;
|
||||
|
||||
g_object_get (list->data, "stock-id", &stock_id, NULL);
|
||||
g_object_get (list->data, "icon-name", &icon_name, NULL);
|
||||
|
||||
if (stock_id)
|
||||
if (icon_name)
|
||||
{
|
||||
GtkStyle *style = gtk_widget_get_style (tree_widget);
|
||||
|
||||
icon_size = gimp_get_icon_size (tree_widget,
|
||||
stock_id,
|
||||
icon_name,
|
||||
GTK_ICON_SIZE_BUTTON,
|
||||
view_size -
|
||||
2 * style->xthickness,
|
||||
|
@ -811,7 +811,7 @@ gimp_container_tree_view_set_view_size (GimpContainerView *view)
|
|||
|
||||
g_object_set (list->data, "stock-size", icon_size, NULL);
|
||||
|
||||
g_free (stock_id);
|
||||
g_free (icon_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ gimp_controller_list_init (GimpControllerList *list)
|
|||
cell = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_tree_view_column_pack_start (column, cell, FALSE);
|
||||
gtk_tree_view_column_set_attributes (column, cell,
|
||||
"stock-id", COLUMN_ICON,
|
||||
"icon-name", COLUMN_ICON,
|
||||
NULL);
|
||||
|
||||
g_object_get (cell, "stock-size", &icon_size, NULL);
|
||||
|
@ -243,7 +243,8 @@ gimp_controller_list_init (GimpControllerList *list)
|
|||
gtk_widget_set_sensitive (list->add_button, FALSE);
|
||||
gtk_widget_show (list->add_button);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (GTK_STOCK_GO_FORWARD,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_container_add (GTK_CONTAINER (list->add_button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -259,7 +260,8 @@ gimp_controller_list_init (GimpControllerList *list)
|
|||
gtk_widget_set_sensitive (list->remove_button, FALSE);
|
||||
gtk_widget_show (list->remove_button);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (GTK_STOCK_GO_BACK,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_container_add (GTK_CONTAINER (list->remove_button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ gimp_dialog_factory_finalize (GObject *object)
|
|||
g_free (entry->identifier);
|
||||
g_free (entry->name);
|
||||
g_free (entry->blurb);
|
||||
g_free (entry->stock_id);
|
||||
g_free (entry->icon_name);
|
||||
g_free (entry->help_id);
|
||||
|
||||
g_slice_free (GimpDialogFactoryEntry, entry);
|
||||
|
@ -265,7 +265,7 @@ gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
|||
const gchar *identifier,
|
||||
const gchar *name,
|
||||
const gchar *blurb,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id,
|
||||
GimpDialogNewFunc new_func,
|
||||
GimpDialogRestoreFunc restore_func,
|
||||
|
@ -288,7 +288,7 @@ gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
|||
entry->identifier = g_strdup (identifier);
|
||||
entry->name = g_strdup (name);
|
||||
entry->blurb = g_strdup (blurb);
|
||||
entry->stock_id = g_strdup (stock_id);
|
||||
entry->icon_name = g_strdup (icon_name);
|
||||
entry->help_id = g_strdup (help_id);
|
||||
entry->new_func = new_func;
|
||||
entry->restore_func = restore_func;
|
||||
|
@ -1265,7 +1265,7 @@ gimp_dialog_factory_constructor (GimpDialogFactory *factory,
|
|||
GtkWidget *dockable = NULL;
|
||||
|
||||
dockable = gimp_dockable_new (entry->name, entry->blurb,
|
||||
entry->stock_id, entry->help_id);
|
||||
entry->icon_name, entry->help_id);
|
||||
gtk_container_add (GTK_CONTAINER (dockable), widget);
|
||||
gtk_widget_show (widget);
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ struct _GimpDialogFactoryEntry
|
|||
gchar *identifier;
|
||||
gchar *name;
|
||||
gchar *blurb;
|
||||
gchar *stock_id;
|
||||
gchar *icon_name;
|
||||
gchar *help_id;
|
||||
|
||||
GimpDialogNewFunc new_func;
|
||||
|
@ -118,7 +118,7 @@ void gimp_dialog_factory_register_entry (GimpDialogFactory
|
|||
const gchar *identifier,
|
||||
const gchar *name,
|
||||
const gchar *blurb,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id,
|
||||
GimpDialogNewFunc new_func,
|
||||
GimpDialogRestoreFunc restore_func,
|
||||
|
|
|
@ -61,7 +61,7 @@ struct _GimpDockablePrivate
|
|||
{
|
||||
gchar *name;
|
||||
gchar *blurb;
|
||||
gchar *stock_id;
|
||||
gchar *icon_name;
|
||||
gchar *help_id;
|
||||
GimpTabStyle tab_style;
|
||||
GimpTabStyle actual_tab_style;
|
||||
|
@ -225,10 +225,10 @@ gimp_dockable_dispose (GObject *object)
|
|||
dockable->p->name = NULL;
|
||||
}
|
||||
|
||||
if (dockable->p->stock_id)
|
||||
if (dockable->p->icon_name)
|
||||
{
|
||||
g_free (dockable->p->stock_id);
|
||||
dockable->p->stock_id = NULL;
|
||||
g_free (dockable->p->icon_name);
|
||||
dockable->p->icon_name = NULL;
|
||||
}
|
||||
|
||||
if (dockable->p->help_id)
|
||||
|
@ -537,20 +537,20 @@ gimp_dockable_new_tab_widget_internal (GimpDockable *dockable,
|
|||
GtkWidget *
|
||||
gimp_dockable_new (const gchar *name,
|
||||
const gchar *blurb,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id)
|
||||
{
|
||||
GimpDockable *dockable;
|
||||
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
g_return_val_if_fail (stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
|
||||
dockable = g_object_new (GIMP_TYPE_DOCKABLE, NULL);
|
||||
|
||||
dockable->p->name = g_strdup (name);
|
||||
dockable->p->stock_id = g_strdup (stock_id);
|
||||
dockable->p->help_id = g_strdup (help_id);
|
||||
dockable->p->name = g_strdup (name);
|
||||
dockable->p->icon_name = g_strdup (icon_name);
|
||||
dockable->p->help_id = g_strdup (help_id);
|
||||
|
||||
if (blurb)
|
||||
dockable->p->blurb = g_strdup (blurb);
|
||||
|
@ -630,26 +630,20 @@ gimp_dockable_get_help_id (GimpDockable *dockable)
|
|||
}
|
||||
|
||||
const gchar *
|
||||
gimp_dockable_get_stock_id (GimpDockable *dockable)
|
||||
gimp_dockable_get_icon_name (GimpDockable *dockable)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DOCKABLE (dockable), NULL);
|
||||
|
||||
return dockable->p->stock_id;
|
||||
return dockable->p->icon_name;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gimp_dockable_get_icon (GimpDockable *dockable,
|
||||
GtkIconSize size)
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (dockable));
|
||||
GtkIconTheme *theme = gtk_icon_theme_get_for_screen (screen);
|
||||
g_return_val_if_fail (GIMP_IS_DOCKABLE (dockable), NULL);
|
||||
|
||||
if (gtk_icon_theme_has_icon (theme, dockable->p->stock_id))
|
||||
{
|
||||
return gtk_image_new_from_icon_name (dockable->p->stock_id, size);
|
||||
}
|
||||
|
||||
return gtk_image_new_from_stock (dockable->p->stock_id, size);
|
||||
return gtk_image_new_from_icon_name (dockable->p->icon_name, size);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -60,7 +60,7 @@ GType gimp_dockable_get_type (void) G_GNUC_CONST;
|
|||
|
||||
GtkWidget * gimp_dockable_new (const gchar *name,
|
||||
const gchar *blurb,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id);
|
||||
void gimp_dockable_set_dockbook (GimpDockable *dockable,
|
||||
GimpDockbook *dockbook);
|
||||
|
@ -69,7 +69,7 @@ GimpTabStyle gimp_dockable_get_tab_style (GimpDockable *dockable);
|
|||
const gchar * gimp_dockable_get_name (GimpDockable *dockable);
|
||||
const gchar * gimp_dockable_get_blurb (GimpDockable *dockable);
|
||||
const gchar * gimp_dockable_get_help_id (GimpDockable *dockable);
|
||||
const gchar * gimp_dockable_get_stock_id (GimpDockable *dockable);
|
||||
const gchar * gimp_dockable_get_icon_name (GimpDockable *dockable);
|
||||
GtkWidget * gimp_dockable_get_icon (GimpDockable *dockable,
|
||||
GtkIconSize size);
|
||||
|
||||
|
@ -86,7 +86,6 @@ void gimp_dockable_set_locked (GimpDockable *dockable,
|
|||
gboolean lock);
|
||||
gboolean gimp_dockable_is_locked (GimpDockable *dockable);
|
||||
|
||||
|
||||
void gimp_dockable_set_tab_style (GimpDockable *dockable,
|
||||
GimpTabStyle tab_style);
|
||||
gboolean gimp_dockable_set_actual_tab_style (GimpDockable *dockable,
|
||||
|
|
|
@ -285,7 +285,9 @@ gimp_dockbook_init (GimpDockbook *dockbook)
|
|||
GTK_PACK_END);
|
||||
gtk_widget_show (dockbook->p->menu_button);
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_MENU_LEFT, GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (GIMP_STOCK_MENU_LEFT, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (image), 12);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), GIMP_STOCK_MENU_LEFT, GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (dockbook->p->menu_button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -535,23 +537,13 @@ gimp_dockbook_show_menu (GimpDockbook *dockbook)
|
|||
NULL);
|
||||
|
||||
g_object_set (parent_menu_action,
|
||||
"label", label,
|
||||
"stock-id", gimp_dockable_get_stock_id (dockable),
|
||||
"visible", TRUE,
|
||||
"label", label,
|
||||
"icon-name", gimp_dockable_get_icon_name (dockable),
|
||||
"visible", TRUE,
|
||||
NULL);
|
||||
|
||||
g_free (label);
|
||||
|
||||
if (gimp_dockable_get_stock_id (dockable))
|
||||
{
|
||||
if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default (),
|
||||
gimp_dockable_get_stock_id (dockable)))
|
||||
{
|
||||
gtk_action_set_icon_name (parent_menu_action,
|
||||
gimp_dockable_get_stock_id (dockable));
|
||||
}
|
||||
}
|
||||
|
||||
if (! GTK_IS_MENU (child_menu_widget))
|
||||
{
|
||||
g_warning ("%s: child_menu_widget (%p) is not a GtkMenu",
|
||||
|
|
|
@ -117,10 +117,10 @@ gimp_drawable_tree_view_class_init (GimpDrawableTreeViewClass *klass)
|
|||
|
||||
item_view_class->set_image = gimp_drawable_tree_view_set_image;
|
||||
|
||||
item_view_class->lock_content_stock_id = GIMP_STOCK_TOOL_PAINTBRUSH;
|
||||
item_view_class->lock_content_tooltip = _("Lock pixels");
|
||||
item_view_class->lock_position_stock_id = GIMP_STOCK_TOOL_MOVE;
|
||||
item_view_class->lock_position_tooltip = _("Lock position and size");
|
||||
item_view_class->lock_content_icon_name = GIMP_STOCK_TOOL_PAINTBRUSH;
|
||||
item_view_class->lock_content_tooltip = _("Lock pixels");
|
||||
item_view_class->lock_position_icon_name = GIMP_STOCK_TOOL_MOVE;
|
||||
item_view_class->lock_position_tooltip = _("Lock position and size");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -519,11 +519,11 @@ gimp_editor_add_button (GimpEditor *editor,
|
|||
}
|
||||
|
||||
GtkWidget *
|
||||
gimp_editor_add_stock_box (GimpEditor *editor,
|
||||
GType enum_type,
|
||||
const gchar *icon_prefix,
|
||||
GCallback callback,
|
||||
gpointer callback_data)
|
||||
gimp_editor_add_icon_box (GimpEditor *editor,
|
||||
GType enum_type,
|
||||
const gchar *icon_prefix,
|
||||
GCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *first_button;
|
||||
|
@ -783,16 +783,7 @@ gimp_editor_set_box_style (GimpEditor *editor,
|
|||
GtkIconSize old_size;
|
||||
const gchar *icon_name;
|
||||
|
||||
/* FIXME icon_name */
|
||||
if (gtk_image_get_storage_type (GTK_IMAGE (child)) == GTK_IMAGE_STOCK)
|
||||
{
|
||||
gtk_image_get_stock (GTK_IMAGE (child), &icon_name, &old_size);
|
||||
g_printerr ("EEEEK: %s used in GimpEditor\n", icon_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_image_get_icon_name (GTK_IMAGE (child), &icon_name, &old_size);
|
||||
}
|
||||
gtk_image_get_icon_name (GTK_IMAGE (child), &icon_name, &old_size);
|
||||
|
||||
if (button_icon_size != old_size)
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (child),
|
||||
|
|
|
@ -66,9 +66,9 @@ GtkWidget * gimp_editor_add_button (GimpEditor *editor,
|
|||
GCallback callback,
|
||||
GCallback extended_callback,
|
||||
gpointer callback_data);
|
||||
GtkWidget * gimp_editor_add_stock_box (GimpEditor *editor,
|
||||
GtkWidget * gimp_editor_add_icon_box (GimpEditor *editor,
|
||||
GType enum_type,
|
||||
const gchar *stock_prefix,
|
||||
const gchar *icon_prefix,
|
||||
GCallback callback,
|
||||
gpointer callback_data);
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ gimp_error_console_add (GimpErrorConsole *console,
|
|||
gtk_text_buffer_get_end_iter (console->text_buffer, &end);
|
||||
|
||||
pixbuf = gtk_widget_render_icon (console->text_view,
|
||||
gimp_get_message_stock_id (severity),
|
||||
gimp_get_message_icon_name (severity),
|
||||
GTK_ICON_SIZE_BUTTON, NULL);
|
||||
gtk_text_buffer_insert_pixbuf (console->text_buffer, &end, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
|
|
|
@ -123,7 +123,7 @@ gimp_error_dialog_new (const gchar *title)
|
|||
|
||||
void
|
||||
gimp_error_dialog_add (GimpErrorDialog *dialog,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *domain,
|
||||
const gchar *message)
|
||||
{
|
||||
|
@ -146,10 +146,10 @@ gimp_error_dialog_add (GimpErrorDialog *dialog,
|
|||
{
|
||||
g_printerr ("%s: %s\n\n", domain, message);
|
||||
|
||||
overflow = TRUE;
|
||||
stock_id = GIMP_STOCK_WILBER_EEK;
|
||||
domain = _("Too many error messages!");
|
||||
message = _("Messages are redirected to stderr.");
|
||||
overflow = TRUE;
|
||||
icon_name = GIMP_STOCK_WILBER_EEK;
|
||||
domain = _("Too many error messages!");
|
||||
message = _("Messages are redirected to stderr.");
|
||||
|
||||
if (dialog->last_domain && strcmp (dialog->last_domain, domain) == 0 &&
|
||||
dialog->last_message && strcmp (dialog->last_message, message) == 0)
|
||||
|
@ -159,7 +159,7 @@ gimp_error_dialog_add (GimpErrorDialog *dialog,
|
|||
}
|
||||
|
||||
box = g_object_new (GIMP_TYPE_MESSAGE_BOX,
|
||||
"stock-id", stock_id,
|
||||
"icon-name", icon_name,
|
||||
NULL);
|
||||
|
||||
dialog->num_messages++;
|
||||
|
|
|
@ -56,7 +56,7 @@ GType gimp_error_dialog_get_type (void) G_GNUC_CONST;
|
|||
|
||||
GtkWidget * gimp_error_dialog_new (const gchar *title);
|
||||
void gimp_error_dialog_add (GimpErrorDialog *dialog,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *domain,
|
||||
const gchar *message);
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ gimp_file_dialog_new (Gimp *gimp,
|
|||
GimpFileChooserAction action,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id)
|
||||
{
|
||||
GimpFileDialog *dialog = NULL;
|
||||
|
@ -318,7 +318,7 @@ gimp_file_dialog_new (Gimp *gimp,
|
|||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
g_return_val_if_fail (role != NULL, NULL);
|
||||
g_return_val_if_fail (stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
|
||||
switch (action)
|
||||
|
@ -367,7 +367,7 @@ gimp_file_dialog_new (Gimp *gimp,
|
|||
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
stock_id, GTK_RESPONSE_OK,
|
||||
icon_name, GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
|
|
|
@ -71,7 +71,7 @@ GtkWidget * gimp_file_dialog_new (Gimp *gimp,
|
|||
GimpFileChooserAction action,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *help_id);
|
||||
|
||||
void gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
|
||||
|
|
|
@ -626,8 +626,8 @@ gimp_help_query_user_manual_online (GimpIdleHelp *idle_help)
|
|||
button = gtk_dialog_add_button (GTK_DIALOG (dialog),
|
||||
_("_Read Online"), GTK_RESPONSE_ACCEPT);
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GIMP_STOCK_WEB,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name (GIMP_STOCK_WEB,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_ACCEPT,
|
||||
|
|
|
@ -273,11 +273,11 @@ gimp_item_tree_view_class_init (GimpItemTreeViewClass *klass)
|
|||
klass->duplicate_action = NULL;
|
||||
klass->delete_action = NULL;
|
||||
|
||||
klass->lock_content_stock_id = NULL;
|
||||
klass->lock_content_icon_name = NULL;
|
||||
klass->lock_content_tooltip = NULL;
|
||||
klass->lock_content_help_id = NULL;
|
||||
|
||||
klass->lock_position_stock_id = NULL;
|
||||
klass->lock_position_icon_name = NULL;
|
||||
klass->lock_position_tooltip = NULL;
|
||||
klass->lock_position_help_id = NULL;
|
||||
|
||||
|
@ -482,8 +482,8 @@ gimp_item_tree_view_constructed (GObject *object)
|
|||
"button-icon-size", &icon_size,
|
||||
NULL);
|
||||
|
||||
image = gtk_image_new_from_stock (item_view_class->lock_content_stock_id,
|
||||
icon_size);
|
||||
image = gtk_image_new_from_icon_name (item_view_class->lock_content_icon_name,
|
||||
icon_size);
|
||||
gtk_container_add (GTK_CONTAINER (item_view->priv->lock_content_toggle),
|
||||
image);
|
||||
gtk_widget_show (image);
|
||||
|
@ -504,8 +504,8 @@ gimp_item_tree_view_constructed (GObject *object)
|
|||
item_view_class->lock_position_tooltip,
|
||||
item_view_class->lock_position_help_id);
|
||||
|
||||
image = gtk_image_new_from_stock (item_view_class->lock_position_stock_id,
|
||||
icon_size);
|
||||
image = gtk_image_new_from_icon_name (item_view_class->lock_position_icon_name,
|
||||
icon_size);
|
||||
gtk_container_add (GTK_CONTAINER (item_view->priv->lock_position_toggle),
|
||||
image);
|
||||
gtk_widget_show (image);
|
||||
|
@ -581,13 +581,14 @@ gimp_item_tree_view_style_set (GtkWidget *widget,
|
|||
if (GTK_IS_IMAGE (image))
|
||||
{
|
||||
GtkIconSize old_size;
|
||||
gchar *stock_id;
|
||||
const gchar *icon_name;
|
||||
|
||||
gtk_image_get_stock (GTK_IMAGE (image), &stock_id, &old_size);
|
||||
gtk_image_get_icon_name (GTK_IMAGE (image),
|
||||
&icon_name, &old_size);
|
||||
|
||||
if (button_icon_size != old_size)
|
||||
gtk_image_set_from_stock (GTK_IMAGE (image),
|
||||
stock_id, button_icon_size);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (image),
|
||||
icon_name, button_icon_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,12 +92,12 @@ struct _GimpItemTreeViewClass
|
|||
const gchar *delete_action;
|
||||
|
||||
/* lock content button appearance */
|
||||
const gchar *lock_content_stock_id;
|
||||
const gchar *lock_content_icon_name;
|
||||
const gchar *lock_content_tooltip;
|
||||
const gchar *lock_content_help_id;
|
||||
|
||||
/* lock position (translation and transformation) button appearance */
|
||||
const gchar *lock_position_stock_id;
|
||||
const gchar *lock_position_icon_name;
|
||||
const gchar *lock_position_tooltip;
|
||||
const gchar *lock_position_help_id;
|
||||
};
|
||||
|
|
|
@ -315,7 +315,7 @@ gimp_layer_tree_view_init (GimpLayerTreeView *view)
|
|||
"button-icon-size", &icon_size,
|
||||
NULL);
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_TRANSPARENCY, icon_size);
|
||||
image = gtk_image_new_from_icon_name (GIMP_STOCK_TRANSPARENCY, icon_size);
|
||||
gtk_container_add (GTK_CONTAINER (view->priv->lock_alpha_toggle), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_STOCK_ID
|
||||
PROP_ICON_NAME
|
||||
};
|
||||
|
||||
|
||||
|
@ -98,8 +98,8 @@ gimp_message_box_class_init (GimpMessageBoxClass *klass)
|
|||
|
||||
container_class->forall = gimp_message_box_forall;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_STOCK_ID,
|
||||
g_param_spec_string ("stock-id", NULL, NULL,
|
||||
g_object_class_install_property (object_class, PROP_ICON_NAME,
|
||||
g_param_spec_string ("icon-name", NULL, NULL,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
@ -153,11 +153,11 @@ gimp_message_box_constructed (GObject *object)
|
|||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
if (box->stock_id)
|
||||
if (box->icon_name)
|
||||
{
|
||||
gtk_widget_push_composite_child ();
|
||||
box->image = gtk_image_new_from_stock (box->stock_id,
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
box->image = gtk_image_new_from_icon_name (box->icon_name,
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
gtk_widget_pop_composite_child ();
|
||||
|
||||
gtk_misc_set_alignment (GTK_MISC (box->image), 0.0, 0.0);
|
||||
|
@ -185,10 +185,10 @@ gimp_message_box_finalize (GObject *object)
|
|||
{
|
||||
GimpMessageBox *box = GIMP_MESSAGE_BOX (object);
|
||||
|
||||
if (box->stock_id)
|
||||
if (box->icon_name)
|
||||
{
|
||||
g_free (box->stock_id);
|
||||
box->stock_id = NULL;
|
||||
g_free (box->icon_name);
|
||||
box->icon_name = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
|
@ -204,8 +204,8 @@ gimp_message_box_set_property (GObject *object,
|
|||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_STOCK_ID:
|
||||
box->stock_id = g_value_dup_string (value);
|
||||
case PROP_ICON_NAME:
|
||||
box->icon_name = g_value_dup_string (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -223,8 +223,8 @@ gimp_message_box_get_property (GObject *object,
|
|||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_STOCK_ID:
|
||||
g_value_set_string (value, box->stock_id);
|
||||
case PROP_ICON_NAME:
|
||||
g_value_set_string (value, box->icon_name);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -381,10 +381,10 @@ gimp_message_box_set_label_markup (GimpMessageBox *box,
|
|||
/* public functions */
|
||||
|
||||
GtkWidget *
|
||||
gimp_message_box_new (const gchar *stock_id)
|
||||
gimp_message_box_new (const gchar *icon_name)
|
||||
{
|
||||
return g_object_new (GIMP_TYPE_MESSAGE_BOX,
|
||||
"stock-id", stock_id,
|
||||
"icon-name", icon_name,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ struct _GimpMessageBox
|
|||
{
|
||||
GtkBox parent_instance;
|
||||
|
||||
gchar *stock_id;
|
||||
gchar *icon_name;
|
||||
gint repeat;
|
||||
GtkWidget *label[3];
|
||||
GtkWidget *image;
|
||||
|
@ -52,7 +52,7 @@ struct _GimpMessageBoxClass
|
|||
|
||||
GType gimp_message_box_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gimp_message_box_new (const gchar *stock_id);
|
||||
GtkWidget * gimp_message_box_new (const gchar *icon_name);
|
||||
void gimp_message_box_set_primary_text (GimpMessageBox *box,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
|
|
|
@ -49,7 +49,7 @@ gimp_message_dialog_init (GimpMessageDialog *dialog)
|
|||
|
||||
GtkWidget *
|
||||
gimp_message_dialog_new (const gchar *title,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GtkWidget *parent,
|
||||
GtkDialogFlags flags,
|
||||
GimpHelpFunc help_func,
|
||||
|
@ -97,7 +97,7 @@ gimp_message_dialog_new (const gchar *title,
|
|||
va_end (args);
|
||||
|
||||
dialog->box = g_object_new (GIMP_TYPE_MESSAGE_BOX,
|
||||
"stock-id", stock_id,
|
||||
"icon-name", icon_name,
|
||||
NULL);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
|
|
|
@ -50,7 +50,7 @@ struct _GimpMessageDialogClass
|
|||
GType gimp_message_dialog_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gimp_message_dialog_new (const gchar *title,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GtkWidget *parent,
|
||||
GtkDialogFlags flags,
|
||||
GimpHelpFunc help_func,
|
||||
|
|
|
@ -267,12 +267,12 @@ gimp_overlay_dialog_new (GimpToolInfo *tool_info,
|
|||
...)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
/* const gchar *stock_id; */
|
||||
/* const gchar *icon_name; */
|
||||
va_list args;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_TOOL_INFO (tool_info), NULL);
|
||||
|
||||
/* stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info)); */
|
||||
/* icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info)); */
|
||||
|
||||
dialog = g_object_new (GIMP_TYPE_OVERLAY_DIALOG, NULL);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
typedef GtkWidget * (* GimpCreatePickerFunc) (gpointer creator,
|
||||
const gchar *property_name,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *tooltip);
|
||||
|
||||
GtkWidget * gimp_prop_table_new (GObject *config,
|
||||
|
|
|
@ -104,7 +104,7 @@ static void gimp_settings_box_deserialize (GimpSettingsBox *box);
|
|||
static void gimp_settings_box_serialize (GimpSettingsBox *box);
|
||||
static GtkWidget *
|
||||
gimp_settings_box_menu_item_add (GimpSettingsBox *box,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *label,
|
||||
GCallback callback);
|
||||
static gboolean
|
||||
|
@ -284,7 +284,7 @@ gimp_settings_box_constructed (GObject *object)
|
|||
gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -300,7 +300,7 @@ gimp_settings_box_constructed (GObject *object)
|
|||
gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
arrow = gtk_image_new_from_stock (GIMP_STOCK_MENU_LEFT, GTK_ICON_SIZE_MENU);
|
||||
arrow = gtk_image_new_from_icon_name (GIMP_STOCK_MENU_LEFT, GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (button), arrow);
|
||||
gtk_widget_show (arrow);
|
||||
|
||||
|
@ -525,7 +525,7 @@ gimp_settings_box_serialize (GimpSettingsBox *box)
|
|||
|
||||
static GtkWidget *
|
||||
gimp_settings_box_menu_item_add (GimpSettingsBox *box,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *label,
|
||||
GCallback callback)
|
||||
{
|
||||
|
@ -537,7 +537,7 @@ gimp_settings_box_menu_item_add (GimpSettingsBox *box,
|
|||
GtkWidget *image;
|
||||
|
||||
item = gtk_image_menu_item_new_with_mnemonic (label);
|
||||
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
|
||||
|
||||
g_signal_connect (item, "activate",
|
||||
|
|
|
@ -71,7 +71,7 @@ static void gimp_text_style_editor_get_property (GObject *
|
|||
|
||||
static GtkWidget * gimp_text_style_editor_create_toggle (GimpTextStyleEditor *editor,
|
||||
GtkTextTag *tag,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *tooltip);
|
||||
|
||||
static void gimp_text_style_editor_clear_tags (GtkButton *button,
|
||||
|
@ -239,7 +239,7 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor)
|
|||
G_CALLBACK (gimp_text_style_editor_clear_tags),
|
||||
editor);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_CLEAR, GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (GTK_STOCK_CLEAR, GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (editor->clear_button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -631,7 +631,7 @@ gimp_text_style_editor_list_tags (GimpTextStyleEditor *editor,
|
|||
static GtkWidget *
|
||||
gimp_text_style_editor_create_toggle (GimpTextStyleEditor *editor,
|
||||
GtkTextTag *tag,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *tooltip)
|
||||
{
|
||||
GtkWidget *toggle;
|
||||
|
@ -651,7 +651,7 @@ gimp_text_style_editor_create_toggle (GimpTextStyleEditor *editor,
|
|||
G_CALLBACK (gimp_text_style_editor_tag_toggled),
|
||||
editor);
|
||||
|
||||
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (toggle), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
|
|
@ -97,23 +97,23 @@ gimp_vectors_tree_view_class_init (GimpVectorsTreeViewClass *klass)
|
|||
iv_class->remove_item = (GimpRemoveItemFunc) gimp_image_remove_vectors;
|
||||
iv_class->new_item = gimp_vectors_tree_view_item_new;
|
||||
|
||||
iv_class->action_group = "vectors";
|
||||
iv_class->activate_action = "vectors-path-tool";
|
||||
iv_class->edit_action = "vectors-edit-attributes";
|
||||
iv_class->new_action = "vectors-new";
|
||||
iv_class->new_default_action = "vectors-new-last-values";
|
||||
iv_class->raise_action = "vectors-raise";
|
||||
iv_class->raise_top_action = "vectors-raise-to-top";
|
||||
iv_class->lower_action = "vectors-lower";
|
||||
iv_class->lower_bottom_action = "vectors-lower-to-bottom";
|
||||
iv_class->duplicate_action = "vectors-duplicate";
|
||||
iv_class->delete_action = "vectors-delete";
|
||||
iv_class->lock_content_stock_id = GIMP_STOCK_TOOL_PATH;
|
||||
iv_class->lock_content_tooltip = _("Lock path strokes");
|
||||
iv_class->lock_content_help_id = GIMP_HELP_PATH_LOCK_STROKES;
|
||||
iv_class->lock_position_stock_id = GIMP_STOCK_TOOL_MOVE;
|
||||
iv_class->lock_position_tooltip = _("Lock path position");
|
||||
iv_class->lock_position_help_id = GIMP_HELP_PATH_LOCK_POSITION;
|
||||
iv_class->action_group = "vectors";
|
||||
iv_class->activate_action = "vectors-path-tool";
|
||||
iv_class->edit_action = "vectors-edit-attributes";
|
||||
iv_class->new_action = "vectors-new";
|
||||
iv_class->new_default_action = "vectors-new-last-values";
|
||||
iv_class->raise_action = "vectors-raise";
|
||||
iv_class->raise_top_action = "vectors-raise-to-top";
|
||||
iv_class->lower_action = "vectors-lower";
|
||||
iv_class->lower_bottom_action = "vectors-lower-to-bottom";
|
||||
iv_class->duplicate_action = "vectors-duplicate";
|
||||
iv_class->delete_action = "vectors-delete";
|
||||
iv_class->lock_content_icon_name = GIMP_STOCK_TOOL_PATH;
|
||||
iv_class->lock_content_tooltip = _("Lock path strokes");
|
||||
iv_class->lock_content_help_id = GIMP_HELP_PATH_LOCK_STROKES;
|
||||
iv_class->lock_position_icon_name = GIMP_STOCK_TOOL_MOVE;
|
||||
iv_class->lock_position_tooltip = _("Lock path position");
|
||||
iv_class->lock_position_help_id = GIMP_HELP_PATH_LOCK_POSITION;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -54,7 +54,7 @@ static GtkWidget * gimp_viewable_box_new (GimpContainer *container,
|
|||
GimpViewType button_view_size,
|
||||
GimpViewSize view_size,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_tooltip,
|
||||
const gchar *editor_id);
|
||||
static GtkWidget * view_props_connect (GtkWidget *box,
|
||||
|
@ -308,8 +308,8 @@ gradient_box_new (GimpContainer *container,
|
|||
|
||||
gimp_help_set_help_data (toggle, _("Reverse"), NULL);
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_FLIP_HORIZONTAL,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name (GIMP_STOCK_FLIP_HORIZONTAL,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (toggle), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -516,7 +516,7 @@ gimp_viewable_box_new (GimpContainer *container,
|
|||
GimpViewType button_view_size,
|
||||
GimpViewSize view_size,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_tooltip,
|
||||
const gchar *editor_id)
|
||||
{
|
||||
|
@ -533,7 +533,7 @@ gimp_viewable_box_new (GimpContainer *container,
|
|||
view_type, button_view_size, view_size, 1,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
dialog_identifier,
|
||||
dialog_stock_id,
|
||||
dialog_icon_name,
|
||||
dialog_tooltip);
|
||||
|
||||
gimp_view_renderer_set_size_full (GIMP_VIEW (GIMP_VIEWABLE_BUTTON (button)->view)->renderer,
|
||||
|
@ -587,8 +587,8 @@ gimp_viewable_box_new (GimpContainer *container,
|
|||
gtk_box_pack_end (GTK_BOX (entry_hbox), edit_button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (edit_button);
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_EDIT,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (GIMP_STOCK_EDIT,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 1.0);
|
||||
gtk_container_add (GTK_CONTAINER (edit_button), image);
|
||||
gtk_widget_show (image);
|
||||
|
|
|
@ -122,10 +122,10 @@ gimp_viewable_button_finalize (GObject *object)
|
|||
button->dialog_identifier = NULL;
|
||||
}
|
||||
|
||||
if (button->dialog_stock_id)
|
||||
if (button->dialog_icon_name)
|
||||
{
|
||||
g_free (button->dialog_stock_id);
|
||||
button->dialog_stock_id = NULL;
|
||||
g_free (button->dialog_icon_name);
|
||||
button->dialog_icon_name = NULL;
|
||||
}
|
||||
|
||||
if (button->dialog_tooltip)
|
||||
|
@ -245,7 +245,7 @@ gimp_viewable_button_clicked (GtkButton *button)
|
|||
viewable_button->view_border_width,
|
||||
viewable_button->dialog_factory,
|
||||
viewable_button->dialog_identifier,
|
||||
viewable_button->dialog_stock_id,
|
||||
viewable_button->dialog_icon_name,
|
||||
viewable_button->dialog_tooltip);
|
||||
|
||||
g_signal_connect (popup, "cancel",
|
||||
|
@ -280,7 +280,7 @@ gimp_viewable_button_new (GimpContainer *container,
|
|||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_tooltip)
|
||||
{
|
||||
GimpViewableButton *button;
|
||||
|
@ -298,7 +298,7 @@ gimp_viewable_button_new (GimpContainer *container,
|
|||
if (dialog_factory)
|
||||
{
|
||||
g_return_val_if_fail (dialog_identifier != NULL, NULL);
|
||||
g_return_val_if_fail (dialog_stock_id != NULL, NULL);
|
||||
g_return_val_if_fail (dialog_icon_name != NULL, NULL);
|
||||
g_return_val_if_fail (dialog_tooltip != NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ gimp_viewable_button_new (GimpContainer *container,
|
|||
{
|
||||
button->dialog_factory = dialog_factory;
|
||||
button->dialog_identifier = g_strdup (dialog_identifier);
|
||||
button->dialog_stock_id = g_strdup (dialog_stock_id);
|
||||
button->dialog_icon_name = g_strdup (dialog_icon_name);
|
||||
button->dialog_tooltip = g_strdup (dialog_tooltip);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ struct _GimpViewableButton
|
|||
|
||||
GimpDialogFactory *dialog_factory;
|
||||
gchar *dialog_identifier;
|
||||
gchar *dialog_stock_id;
|
||||
gchar *dialog_icon_name;
|
||||
gchar *dialog_tooltip;
|
||||
|
||||
GtkWidget *view;
|
||||
|
@ -69,7 +69,7 @@ GtkWidget * gimp_viewable_button_new (GimpContainer *container,
|
|||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
const gchar *dialog_icon_name,
|
||||
const gchar *dialog_tooltip);
|
||||
|
||||
GimpViewType gimp_viewable_button_get_view_type (GimpViewableButton *button);
|
||||
|
|
|
@ -43,7 +43,7 @@ enum
|
|||
PROP_0,
|
||||
PROP_VIEWABLE,
|
||||
PROP_CONTEXT,
|
||||
PROP_STOCK_ID,
|
||||
PROP_ICON_NAME,
|
||||
PROP_DESC
|
||||
};
|
||||
|
||||
|
@ -87,8 +87,8 @@ gimp_viewable_dialog_class_init (GimpViewableDialogClass *klass)
|
|||
GIMP_TYPE_CONTEXT,
|
||||
GIMP_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_STOCK_ID,
|
||||
g_param_spec_string ("stock-id", NULL, NULL,
|
||||
g_object_class_install_property (object_class, PROP_ICON_NAME,
|
||||
g_param_spec_string ("icon-name", NULL, NULL,
|
||||
NULL,
|
||||
GIMP_PARAM_WRITABLE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
@ -183,10 +183,10 @@ gimp_viewable_dialog_set_property (GObject *object,
|
|||
g_value_get_object (value));
|
||||
break;
|
||||
|
||||
case PROP_STOCK_ID:
|
||||
gtk_image_set_from_stock (GTK_IMAGE (dialog->icon),
|
||||
g_value_get_string (value),
|
||||
GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
case PROP_ICON_NAME:
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (dialog->icon),
|
||||
g_value_get_string (value),
|
||||
GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
break;
|
||||
|
||||
case PROP_DESC:
|
||||
|
@ -231,7 +231,7 @@ gimp_viewable_dialog_new (GimpViewable *viewable,
|
|||
GimpContext *context,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
|
@ -257,7 +257,7 @@ gimp_viewable_dialog_new (GimpViewable *viewable,
|
|||
"role", role,
|
||||
"help-func", help_func,
|
||||
"help-id", help_id,
|
||||
"stock-id", stock_id,
|
||||
"icon-name", icon_name,
|
||||
"description", desc,
|
||||
"parent", parent,
|
||||
NULL);
|
||||
|
|
|
@ -58,7 +58,7 @@ GtkWidget * gimp_viewable_dialog_new (GimpViewable *viewable,
|
|||
GimpContext *context,
|
||||
const gchar *title,
|
||||
const gchar *role,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
const gchar *desc,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
|
|
|
@ -181,8 +181,8 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
|
|||
}
|
||||
|
||||
GtkWidget *
|
||||
gimp_stock_button_new (const gchar *stock_id,
|
||||
const gchar *label)
|
||||
gimp_icon_button_new (const gchar *icon_name,
|
||||
const gchar *label)
|
||||
{
|
||||
GtkWidget *button;
|
||||
GtkWidget *image;
|
||||
|
@ -198,7 +198,7 @@ gimp_stock_button_new (const gchar *stock_id,
|
|||
gtk_container_add (GTK_CONTAINER (button), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -209,7 +209,7 @@ gimp_stock_button_new (const gchar *stock_id,
|
|||
}
|
||||
else
|
||||
{
|
||||
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_container_add (GTK_CONTAINER (button), image);
|
||||
gtk_widget_show (image);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
GtkWidget * gimp_paint_mode_menu_new (gboolean with_behind_mode,
|
||||
gboolean with_replace_modes);
|
||||
|
||||
GtkWidget * gimp_stock_button_new (const gchar *stock_id,
|
||||
GtkWidget * gimp_icon_button_new (const gchar *icon_name,
|
||||
const gchar *label);
|
||||
|
||||
|
||||
|
|
|
@ -210,20 +210,20 @@ gimp_button_menu_position (GtkWidget *button,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_table_attach_stock (GtkTable *table,
|
||||
gint row,
|
||||
const gchar *stock_id,
|
||||
GtkWidget *widget,
|
||||
gint colspan,
|
||||
gboolean left_align)
|
||||
gimp_table_attach_icon (GtkTable *table,
|
||||
gint row,
|
||||
const gchar *icon_name,
|
||||
GtkWidget *widget,
|
||||
gint colspan,
|
||||
gboolean left_align)
|
||||
{
|
||||
GtkWidget *image;
|
||||
|
||||
g_return_if_fail (GTK_IS_TABLE (table));
|
||||
g_return_if_fail (stock_id != NULL);
|
||||
g_return_if_fail (icon_name != NULL);
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_misc_set_alignment (GTK_MISC (image), 1.0, 0.5);
|
||||
gtk_table_attach (table, image, 0, 1, row, row + 1,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
|
@ -366,7 +366,7 @@ gimp_enum_radio_frame_add (GtkFrame *frame,
|
|||
|
||||
GtkIconSize
|
||||
gimp_get_icon_size (GtkWidget *widget,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GtkIconSize max_size,
|
||||
gint width,
|
||||
gint height)
|
||||
|
@ -383,12 +383,12 @@ gimp_get_icon_size (GtkWidget *widget,
|
|||
GtkSettings *settings;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), icon_size);
|
||||
g_return_val_if_fail (stock_id != NULL, icon_size);
|
||||
g_return_val_if_fail (icon_name != NULL, icon_size);
|
||||
g_return_val_if_fail (width > 0, icon_size);
|
||||
g_return_val_if_fail (height > 0, icon_size);
|
||||
|
||||
icon_set = gtk_style_lookup_icon_set (gtk_widget_get_style (widget),
|
||||
stock_id);
|
||||
icon_name);
|
||||
|
||||
if (! icon_set)
|
||||
return GTK_ICON_SIZE_INVALID;
|
||||
|
@ -1052,7 +1052,7 @@ gimp_widget_set_accel_help (GtkWidget *widget,
|
|||
}
|
||||
|
||||
const gchar *
|
||||
gimp_get_message_stock_id (GimpMessageSeverity severity)
|
||||
gimp_get_message_icon_name (GimpMessageSeverity severity)
|
||||
{
|
||||
switch (severity)
|
||||
{
|
||||
|
|
|
@ -30,9 +30,9 @@ void gimp_button_menu_position (GtkWidget *button
|
|||
GtkPositionType position,
|
||||
gint *x,
|
||||
gint *y);
|
||||
void gimp_table_attach_stock (GtkTable *table,
|
||||
void gimp_table_attach_icon (GtkTable *table,
|
||||
gint row,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GtkWidget *widget,
|
||||
gint colspan,
|
||||
gboolean left_align);
|
||||
|
@ -45,7 +45,7 @@ void gimp_enum_radio_frame_add (GtkFrame *frame,
|
|||
gint enum_value,
|
||||
gboolean below);
|
||||
GtkIconSize gimp_get_icon_size (GtkWidget *widget,
|
||||
const gchar *stock_id,
|
||||
const gchar *icon_name,
|
||||
GtkIconSize max_size,
|
||||
gint width,
|
||||
gint height);
|
||||
|
@ -83,7 +83,7 @@ void gimp_toggle_button_set_visible (GtkToggleButton *toggle
|
|||
GtkWidget *widget);
|
||||
void gimp_widget_set_accel_help (GtkWidget *widget,
|
||||
GtkAction *action);
|
||||
const gchar * gimp_get_message_stock_id (GimpMessageSeverity severity);
|
||||
const gchar * gimp_get_message_icon_name (GimpMessageSeverity severity);
|
||||
void gimp_pango_layout_set_scale (PangoLayout *layout,
|
||||
double scale);
|
||||
void gimp_pango_layout_set_weight (PangoLayout *layout,
|
||||
|
|
Loading…
Reference in New Issue