2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
#include "color-rotate-stock.h"
25
#include "images/color-rotate-stock-pixbufs.h"
27
#include "libgimp/stdplugins-intl.h"
30
static GtkIconFactory *color_rotate_icon_factory = NULL;
32
static GtkStockItem color_rotate_stock_items[] =
34
{ STOCK_COLOR_ROTATE_SWITCH_CLOCKWISE,
35
N_("Switch to Clockwise"), 0, 0, NULL },
36
{ STOCK_COLOR_ROTATE_SWITCH_COUNTERCLOCKWISE,
37
N_("Switch to C/Clockwise"), 0, 0, NULL },
38
{ STOCK_COLOR_ROTATE_CHANGE_ORDER,
39
N_("Change Order of Arrows"), 0, 0, NULL },
40
{ STOCK_COLOR_ROTATE_SELECT_ALL,
41
N_("Select All"), 0, 0, NULL }
46
add_stock_icon (const gchar *stock_id,
48
const guint8 *inline_data)
50
GtkIconSource *source;
54
source = gtk_icon_source_new ();
56
gtk_icon_source_set_size (source, size);
57
gtk_icon_source_set_size_wildcarded (source, FALSE);
59
pixbuf = gdk_pixbuf_new_from_inline (-1, inline_data, FALSE, NULL);
61
gtk_icon_source_set_pixbuf (source, pixbuf);
62
g_object_unref (pixbuf);
64
set = gtk_icon_set_new ();
66
gtk_icon_set_add_source (set, source);
67
gtk_icon_source_free (source);
69
gtk_icon_factory_add (color_rotate_icon_factory, stock_id, set);
71
gtk_icon_set_unref (set);
75
color_rotate_stock_init (void)
77
static gboolean initialized = FALSE;
82
color_rotate_icon_factory = gtk_icon_factory_new ();
84
add_stock_icon (STOCK_COLOR_ROTATE_SWITCH_CLOCKWISE,
85
GTK_ICON_SIZE_BUTTON, color_rotate_cw);
86
add_stock_icon (STOCK_COLOR_ROTATE_SWITCH_COUNTERCLOCKWISE,
87
GTK_ICON_SIZE_BUTTON, color_rotate_ccw);
88
add_stock_icon (STOCK_COLOR_ROTATE_CHANGE_ORDER,
89
GTK_ICON_SIZE_BUTTON, color_rotate_a_b);
90
add_stock_icon (STOCK_COLOR_ROTATE_SELECT_ALL,
91
GTK_ICON_SIZE_BUTTON, color_rotate_360);
93
gtk_icon_factory_add_default (color_rotate_icon_factory);
95
gtk_stock_add_static (color_rotate_stock_items,
96
G_N_ELEMENTS (color_rotate_stock_items));