gimp/libgimpwidgets/gimpicons.c

580 lines
26 KiB
C
Raw Normal View History

2001-08-04 22:10:58 +08:00
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpicons.c
* Copyright (C) 2001-2015 Michael Natterer <mitch@gimp.org>
2001-08-04 22:10:58 +08:00
*
* This library is free software: you can redistribute it and/or
2001-08-04 22:10:58 +08:00
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
2001-08-04 22:10:58 +08:00
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
2001-08-04 22:10:58 +08:00
*/
#include "config.h"
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "gimpicons.h"
2001-08-04 22:10:58 +08:00
#include "icons/Default/gimp-icon-pixbufs.c"
2001-08-04 22:10:58 +08:00
#include "libgimp/libgimp-intl.h"
/**
* SECTION: gimpstock
* @title: GimpStock
* @short_description: Prebuilt common menu/toolbar items and
* corresponding icons
*
* GIMP registers a set of menu/toolbar items and corresponding icons
* in addition to the standard GTK+ stock items. These can be used
* just like GTK+ stock items. GIMP also overrides a few of the GTK+
* icons (namely the ones in dialog size).
*
* Stock icons may have a RTL variant which gets used for
* right-to-left locales.
**/
2003-04-12 00:46:43 +08:00
#define LIBGIMP_DOMAIN GETTEXT_PACKAGE "-libgimp"
#define GIMP_TOILET_PAPER "gimp-toilet-paper"
2001-08-04 22:10:58 +08:00
static GtkIconFactory *gimp_stock_factory = NULL;
static const GtkStockItem gimp_stock_items[] =
2001-08-04 22:10:58 +08:00
{
{ GIMP_STOCK_ANCHOR, N_("Anchor"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CENTER, N_("C_enter"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DUPLICATE, N_("_Duplicate"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_EDIT, N_("_Edit"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LINKED, N_("Linked"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PASTE_AS_NEW, N_("Paste as New"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PASTE_INTO, N_("Paste Into"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_RESET, N_("_Reset"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_VISIBLE, N_("Visible"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_LINEAR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_BILINEAR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_RADIAL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_SQUARE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_CONICAL_SYMMETRIC, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_CONICAL_ASYMMETRIC, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_SHAPEBURST_ANGULAR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_SHAPEBURST_SPHERICAL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_SHAPEBURST_DIMPLED, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_SPIRAL_CLOCKWISE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRADIENT_SPIRAL_ANTICLOCKWISE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_EAST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_NORTH, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_NORTH_EAST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_NORTH_WEST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_SOUTH, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_SOUTH_EAST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_SOUTH_WEST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRAVITY_WEST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_HCENTER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_VCENTER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_HFILL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_VFILL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_HCHAIN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_HCHAIN_BROKEN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_VCHAIN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_VCHAIN_BROKEN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_REPLACE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_ADD, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_SUBTRACT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_INTERSECT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_STROKE, N_("_Stroke"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_TO_CHANNEL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_TO_PATH, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PATH_STROKE, N_("_Stroke"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CURVE_FREE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CURVE_SMOOTH, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_COLOR_PICKER_BLACK, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_COLOR_PICKER_GRAY, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_COLOR_PICKER_WHITE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_COLOR_TRIANGLE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_COLOR_PICK_FROM_SCREEN, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_CHAR_PICKER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LETTER_SPACING, N_("L_etter Spacing"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LINE_SPACING, N_("L_ine Spacing"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TEXT_DIR_LTR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TEXT_DIR_RTL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PRINT_RESOLUTION, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_CONVERT_RGB, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CONVERT_GRAYSCALE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CONVERT_INDEXED, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_INVERT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_MERGE_DOWN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LAYER_TO_IMAGESIZE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PLUGIN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_RESHOW_FILTER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_ROTATE_90, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_ROTATE_180, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_ROTATE_270, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_RESIZE, N_("Re_size"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SCALE, N_("_Scale"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_FLIP_HORIZONTAL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_FLIP_VERTICAL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_IMAGES, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LAYERS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNELS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PATHS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOLS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_OPTIONS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DEVICE_STATUS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_INPUT_DEVICE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CURSOR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SAMPLE_POINT, NULL, 0, 0, LIBGIMP_DOMAIN },
2010-08-12 05:32:44 +08:00
{ GIMP_STOCK_DYNAMICS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_PRESET, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_IMAGE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LAYER, NULL, 0, 0, LIBGIMP_DOMAIN },
More great icons from Jimmac: 2003-03-27 Michael Natterer <mitch@gimp.org> More great icons from Jimmac: * themes/Default/images/stock-channel-16.png * themes/Default/images/stock-channel-24.png * themes/Default/images/stock-channel-blue-16.png * themes/Default/images/stock-channel-blue-24.png * themes/Default/images/stock-channel-gray-16.png * themes/Default/images/stock-channel-gray-24.png * themes/Default/images/stock-channel-green-16.png * themes/Default/images/stock-channel-green-24.png * themes/Default/images/stock-channel-red-16.png * themes/Default/images/stock-channel-red-24.png: updated. * themes/Default/images/stock-channel-32.png * themes/Default/images/stock-channel-48.png * themes/Default/images/stock-channel-blue-32.png * themes/Default/images/stock-channel-blue-48.png * themes/Default/images/stock-channel-gray-32.png * themes/Default/images/stock-channel-gray-48.png * themes/Default/images/stock-channel-green-32.png * themes/Default/images/stock-channel-green-48.png * themes/Default/images/stock-channel-red-32.png * themes/Default/images/stock-channel-red-48.png * themes/Default/images/stock-grid-16.png * themes/Default/images/stock-image-32.png * themes/Default/images/stock-image-48.png * themes/Default/images/stock-layer-32.png * themes/Default/images/stock-layer-48.png * themes/Default/images/stock-list-16.png * themes/Default/images/stock-text-layer-16.png * themes/Default/images/stock-text-layer-24.png * themes/Default/images/stock-text-layer-32.png * themes/Default/images/stock-text-layer-48.png: new ones. * themes/Default/images/Makefile.am * libgimpwidgets/gimpstock.[ch]: added them to the stock system. * app/text/gimptextlayer.c: use GIMP_STOCK_TEXT_LAYER.
2003-03-27 20:29:54 +08:00
{ GIMP_STOCK_TEXT_LAYER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_FLOATING_SELECTION, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNEL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNEL_RED, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNEL_GREEN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNEL_BLUE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNEL_GRAY, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNEL_INDEXED, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CHANNEL_ALPHA, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LAYER_MASK, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PATH, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TEMPLATE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_COLORMAP, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_HISTOGRAM, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_HISTOGRAM_LINEAR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_HISTOGRAM_LOGARITHMIC, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_UNDO_HISTORY, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TRANSPARENCY, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_SELECTION_ALL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_NONE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_GROW, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_SHRINK, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SELECTION_BORDER, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_NAVIGATION, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_QUICK_MASK_OFF, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_QUICK_MASK_ON, NULL, 0, 0, LIBGIMP_DOMAIN },
libgimpwidgets/gimpcolordisplay.[ch] added "const gchar *stock_id" members 2006-10-01 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcontroller.[ch]: added "const gchar *stock_id" members to the class structs. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-controller-16.png * themes/Default/images/stock-controller-24.png * themes/Default/images/stock-controller-keyboard-16.png * themes/Default/images/stock-controller-keyboard-24.png * themes/Default/images/stock-controller-linux-input-16.png * themes/Default/images/stock-controller-linux-input-24.png * themes/Default/images/stock-controller-midi-16.png * themes/Default/images/stock-controller-midi-24.png * themes/Default/images/stock-controller-wheel-16.png * themes/Default/images/stock-controller-wheel-24.png * themes/Default/images/stock-display-filter-colorblind-16.png * themes/Default/images/stock-display-filter-colorblind-24.png * themes/Default/images/stock-display-filter-contrast-16.png * themes/Default/images/stock-display-filter-contrast-24.png * themes/Default/images/stock-display-filter-gamma-16.png * themes/Default/images/stock-display-filter-gamma-24.png * themes/Default/images/stock-display-filter-lcms-16.png * themes/Default/images/stock-display-filter-lcms-24.png * themes/Default/images/stock-display-filter-proof-16.png * themes/Default/images/stock-display-filter-proof-24.png: added icons for the various display filters and controllers. Made them as ugly as sin to trigger some replacement pain in the relevant people ;) * modules/cdisplay_colorblind.c * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/cdisplay_lcms.c * modules/cdisplay_proof.c * modules/controller_linux_input.c * modules/controller_midi.c * app/widgets/gimpcontrollerkeyboard.c * app/widgets/gimpcontrollerwheel.c: set icons. * app/widgets/gimpcolordisplayeditor.c * app/widgets/gimpcontrollerinfo.c * app/widgets/gimpcontrollerlist.c: show them in the display filter and controller GUIs.
2006-10-02 01:31:42 +08:00
{ GIMP_STOCK_CONTROLLER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CONTROLLER_KEYBOARD, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CONTROLLER_LINUX_INPUT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CONTROLLER_MIDI, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CONTROLLER_WHEEL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DISPLAY_FILTER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DISPLAY_FILTER_COLORBLIND, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DISPLAY_FILTER_CONTRAST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DISPLAY_FILTER_GAMMA, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DISPLAY_FILTER_LCMS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_DISPLAY_FILTER_PROOF, NULL, 0, 0, LIBGIMP_DOMAIN },
More great icons from Jimmac: 2003-03-27 Michael Natterer <mitch@gimp.org> More great icons from Jimmac: * themes/Default/images/stock-channel-16.png * themes/Default/images/stock-channel-24.png * themes/Default/images/stock-channel-blue-16.png * themes/Default/images/stock-channel-blue-24.png * themes/Default/images/stock-channel-gray-16.png * themes/Default/images/stock-channel-gray-24.png * themes/Default/images/stock-channel-green-16.png * themes/Default/images/stock-channel-green-24.png * themes/Default/images/stock-channel-red-16.png * themes/Default/images/stock-channel-red-24.png: updated. * themes/Default/images/stock-channel-32.png * themes/Default/images/stock-channel-48.png * themes/Default/images/stock-channel-blue-32.png * themes/Default/images/stock-channel-blue-48.png * themes/Default/images/stock-channel-gray-32.png * themes/Default/images/stock-channel-gray-48.png * themes/Default/images/stock-channel-green-32.png * themes/Default/images/stock-channel-green-48.png * themes/Default/images/stock-channel-red-32.png * themes/Default/images/stock-channel-red-48.png * themes/Default/images/stock-grid-16.png * themes/Default/images/stock-image-32.png * themes/Default/images/stock-image-48.png * themes/Default/images/stock-layer-32.png * themes/Default/images/stock-layer-48.png * themes/Default/images/stock-list-16.png * themes/Default/images/stock-text-layer-16.png * themes/Default/images/stock-text-layer-24.png * themes/Default/images/stock-text-layer-32.png * themes/Default/images/stock-text-layer-48.png: new ones. * themes/Default/images/Makefile.am * libgimpwidgets/gimpstock.[ch]: added them to the stock system. * app/text/gimptextlayer.c: use GIMP_STOCK_TEXT_LAYER.
2003-03-27 20:29:54 +08:00
{ GIMP_STOCK_LIST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GRID, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_PORTRAIT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_LANDSCAPE, NULL, 0, 0, LIBGIMP_DOMAIN },
2003-04-12 00:46:43 +08:00
{ GIMP_TOILET_PAPER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_WEB, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_VIDEO, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_GEGL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SHAPE_CIRCLE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SHAPE_DIAMOND, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_SHAPE_SQUARE, NULL, 0, 0, LIBGIMP_DOMAIN },
libgimpwidgets/gimpcolordisplay.[ch] added "const gchar *stock_id" members 2006-10-01 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcontroller.[ch]: added "const gchar *stock_id" members to the class structs. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-controller-16.png * themes/Default/images/stock-controller-24.png * themes/Default/images/stock-controller-keyboard-16.png * themes/Default/images/stock-controller-keyboard-24.png * themes/Default/images/stock-controller-linux-input-16.png * themes/Default/images/stock-controller-linux-input-24.png * themes/Default/images/stock-controller-midi-16.png * themes/Default/images/stock-controller-midi-24.png * themes/Default/images/stock-controller-wheel-16.png * themes/Default/images/stock-controller-wheel-24.png * themes/Default/images/stock-display-filter-colorblind-16.png * themes/Default/images/stock-display-filter-colorblind-24.png * themes/Default/images/stock-display-filter-contrast-16.png * themes/Default/images/stock-display-filter-contrast-24.png * themes/Default/images/stock-display-filter-gamma-16.png * themes/Default/images/stock-display-filter-gamma-24.png * themes/Default/images/stock-display-filter-lcms-16.png * themes/Default/images/stock-display-filter-lcms-24.png * themes/Default/images/stock-display-filter-proof-16.png * themes/Default/images/stock-display-filter-proof-24.png: added icons for the various display filters and controllers. Made them as ugly as sin to trigger some replacement pain in the relevant people ;) * modules/cdisplay_colorblind.c * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/cdisplay_lcms.c * modules/cdisplay_proof.c * modules/controller_linux_input.c * modules/controller_midi.c * app/widgets/gimpcontrollerkeyboard.c * app/widgets/gimpcontrollerwheel.c: set icons. * app/widgets/gimpcolordisplayeditor.c * app/widgets/gimpcontrollerinfo.c * app/widgets/gimpcontrollerlist.c: show them in the display filter and controller GUIs.
2006-10-02 01:31:42 +08:00
{ GIMP_STOCK_CAP_BUTT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CAP_ROUND, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CAP_SQUARE, NULL, 0, 0, LIBGIMP_DOMAIN },
libgimpwidgets/gimpcolordisplay.[ch] added "const gchar *stock_id" members 2006-10-01 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcontroller.[ch]: added "const gchar *stock_id" members to the class structs. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-controller-16.png * themes/Default/images/stock-controller-24.png * themes/Default/images/stock-controller-keyboard-16.png * themes/Default/images/stock-controller-keyboard-24.png * themes/Default/images/stock-controller-linux-input-16.png * themes/Default/images/stock-controller-linux-input-24.png * themes/Default/images/stock-controller-midi-16.png * themes/Default/images/stock-controller-midi-24.png * themes/Default/images/stock-controller-wheel-16.png * themes/Default/images/stock-controller-wheel-24.png * themes/Default/images/stock-display-filter-colorblind-16.png * themes/Default/images/stock-display-filter-colorblind-24.png * themes/Default/images/stock-display-filter-contrast-16.png * themes/Default/images/stock-display-filter-contrast-24.png * themes/Default/images/stock-display-filter-gamma-16.png * themes/Default/images/stock-display-filter-gamma-24.png * themes/Default/images/stock-display-filter-lcms-16.png * themes/Default/images/stock-display-filter-lcms-24.png * themes/Default/images/stock-display-filter-proof-16.png * themes/Default/images/stock-display-filter-proof-24.png: added icons for the various display filters and controllers. Made them as ugly as sin to trigger some replacement pain in the relevant people ;) * modules/cdisplay_colorblind.c * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/cdisplay_lcms.c * modules/cdisplay_proof.c * modules/controller_linux_input.c * modules/controller_midi.c * app/widgets/gimpcontrollerkeyboard.c * app/widgets/gimpcontrollerwheel.c: set icons. * app/widgets/gimpcolordisplayeditor.c * app/widgets/gimpcontrollerinfo.c * app/widgets/gimpcontrollerlist.c: show them in the display filter and controller GUIs.
2006-10-02 01:31:42 +08:00
{ GIMP_STOCK_JOIN_MITER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_JOIN_ROUND, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_JOIN_BEVEL, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_ERROR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_INFO, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_QUESTION, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_USER_MANUAL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_WARNING, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_WILBER, NULL, 0, 0, LIBGIMP_DOMAIN },
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
{ GIMP_STOCK_WILBER_EEK, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_FRAME, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TEXTURE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_AIRBRUSH, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_ALIGN, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_BLEND, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_BLUR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_BRIGHTNESS_CONTRAST, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_BUCKET_FILL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_BY_COLOR_SELECT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_CAGE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_CLONE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_COLOR_BALANCE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_COLOR_PICKER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_COLORIZE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_CROP, N_("Cr_op"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_CURVES, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_DESATURATE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_DODGE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_ELLIPSE_SELECT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_ERASER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_FLIP, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_FREE_SELECT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_FOREGROUND_SELECT, N_("_Select"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_FUZZY_SELECT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_HUE_SATURATION, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_HANDLE_TRANSFORM,N_("_Transform"),0, 0, LIBGIMP_DOMAIN },
Merged the "soc-2006-healing-brush" branch. That branch is now officially 2006-09-02 Michael Natterer <mitch@gimp.org> Merged the "soc-2006-healing-brush" branch. That branch is now officially closed and all further fixes and changes have to be applied to HEAD. Did some minor adjustments, mostly small indentation and spacing fixes. Derive the tool from the newly introduced GimpBrushTool which did not exist when the branch was created. Thanks a lot to Kevin Sookocheff for this nice contribution! * app/paint/paint-enums.[ch]: new enum GimpHealAlignMode. * app/paint/Makefile.am * app/paint/makefile.msc * app/paint/gimpheal.[ch] * app/paint/gimphealoptions.[ch]: the heal core and its options. * app/paint/gimp-paint.c: register the heal core. * app/tools/Makefile.am * app/tools/makefile.msc * app/tools/gimphealtool.[ch]: the heal tool. * app/tools/gimp-tools.c: register the heal tool. * app/tools/gimppaintoptions-gui.c: show the widgets that are used by heal. * app/widgets/gimphelp-ids.h: the heal help ID. * tools/pdbgen/stddefs.pdb * tools/pdbgen/pdb/paint_tools.pdb: the heal PDB wrappers. * app/widgets/widgets-enums.h * app/widgets/gimpcursor.c * cursors/Makefile.am * cursors/makefile.msc * cursors/tool-heal.png * cursors/xbm/tool-heal.xbm * cursors/xbm/tool-heal-mask.xbm: a new cursor for the heal tool. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/makefile.msc * themes/Default/images/tools/stock-tool-heal-16.png * themes/Default/images/tools/stock-tool-heal-22.png: new stock icons for the heal tool. * app/pdb/internal_procs.c * app/pdb/paint_tools_cmds.c * libgimp/gimppainttools_pdb.[ch]: regenerated.
2006-09-03 02:54:35 +08:00
{ GIMP_STOCK_TOOL_HEAL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_INK, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_ISCISSORS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_LEVELS, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_MEASURE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_MOVE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_MYPAINT_BRUSH, NULL, 0, 0, LIBGIMP_DOMAIN },
2013-07-31 06:45:19 +08:00
{ GIMP_STOCK_TOOL_N_POINT_DEFORMATION, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_PAINTBRUSH, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_PATH, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_PENCIL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_PERSPECTIVE, N_("_Transform"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_PERSPECTIVE_CLONE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_POSTERIZE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_RECT_SELECT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_ROTATE, N_("_Rotate"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SCALE, N_("_Scale"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SEAMLESS_CLONE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SHEAR, N_("_Shear"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SMUDGE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_TEXT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_THRESHOLD, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_UNIFIED_TRANSFORM, N_("_Transform"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_WARP, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_ZOOM, NULL, 0, 0, LIBGIMP_DOMAIN }
Makefile.am configure.in themes/.cvsignore themes/Makefile.am 2001-08-05 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * themes/.cvsignore * themes/Makefile.am * themes/Default/.cvsignore * themes/Default/Makefile.am * themes/Default/images/.cvsignore * themes/Default/images/*.png * themes/Default/images/tools/.cvsignore * themes/Default/images/tools/*.png: new place for all images which are registered with the stock system. The default images are all inlined but we will install the default theme later along with an appropriate gtkrc as a template for custom themes. Added PNGs of all tools icons. Thanks to syngin :) * pixmaps/.cvsignore * pixmaps/Makefile.am: reverted everything to the old state. This directory will go away soon. * libgimpwidgets/gimpstock.[ch]: changed accordingly. Register stock icons in GTK_ICON_SIZE_BUTTON for all tools. * app/core/gimptoolinfo.[ch] * app/tools/tool_manager.[ch]: GimpToolInfo wants a stock_id and a pre-rendered GdkPixbuf instead of ugly icon_data now. Added some workarounds until GimpPreview is a GtkImage and uses GdkPixbuf instead of TempBuf. * app/tools/Makefile.am * app/tools/icons.h: die, uglyness, die. * app/tools/[all tools].c: register with a stock_id, not a icon_data pointer. * app/gui/dialogs-constructors.c: Oops, GIMP badly crashed on changing the image for the past few days :) * app/gui/menus.c: create the tools' menu entries with stock icons. * app/gui/toolbox.c: use GtkImages instead of GimpPreviews for the toolbox buttons. Will need to change this back as soon as GimpPreview actually _is_ a GtkImage.
2001-08-06 00:07:02 +08:00
};
static const GtkStockItem gimp_compat_stock_items[] =
Makefile.am configure.in themes/.cvsignore themes/Makefile.am 2001-08-05 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * themes/.cvsignore * themes/Makefile.am * themes/Default/.cvsignore * themes/Default/Makefile.am * themes/Default/images/.cvsignore * themes/Default/images/*.png * themes/Default/images/tools/.cvsignore * themes/Default/images/tools/*.png: new place for all images which are registered with the stock system. The default images are all inlined but we will install the default theme later along with an appropriate gtkrc as a template for custom themes. Added PNGs of all tools icons. Thanks to syngin :) * pixmaps/.cvsignore * pixmaps/Makefile.am: reverted everything to the old state. This directory will go away soon. * libgimpwidgets/gimpstock.[ch]: changed accordingly. Register stock icons in GTK_ICON_SIZE_BUTTON for all tools. * app/core/gimptoolinfo.[ch] * app/tools/tool_manager.[ch]: GimpToolInfo wants a stock_id and a pre-rendered GdkPixbuf instead of ugly icon_data now. Added some workarounds until GimpPreview is a GtkImage and uses GdkPixbuf instead of TempBuf. * app/tools/Makefile.am * app/tools/icons.h: die, uglyness, die. * app/tools/[all tools].c: register with a stock_id, not a icon_data pointer. * app/gui/dialogs-constructors.c: Oops, GIMP badly crashed on changing the image for the past few days :) * app/gui/menus.c: create the tools' menu entries with stock icons. * app/gui/toolbox.c: use GtkImages instead of GimpPreviews for the toolbox buttons. Will need to change this back as soon as GimpPreview actually _is_ a GtkImage.
2001-08-06 00:07:02 +08:00
{
{ "gimp-indexed-palette", NULL, 0, 0, LIBGIMP_DOMAIN },
{ "gimp-qmask-off", NULL, 0, 0, LIBGIMP_DOMAIN },
{ "gimp-qmask-on", NULL, 0, 0, LIBGIMP_DOMAIN }
2001-08-04 22:10:58 +08:00
};
2001-11-10 00:54:56 +08:00
static void
register_stock_icon (GtkIconFactory *factory,
const gchar *stock_id,
const gchar *icon_name)
More great icons from Jimmac: 2003-03-27 Michael Natterer <mitch@gimp.org> More great icons from Jimmac: * themes/Default/images/stock-channel-16.png * themes/Default/images/stock-channel-24.png * themes/Default/images/stock-channel-blue-16.png * themes/Default/images/stock-channel-blue-24.png * themes/Default/images/stock-channel-gray-16.png * themes/Default/images/stock-channel-gray-24.png * themes/Default/images/stock-channel-green-16.png * themes/Default/images/stock-channel-green-24.png * themes/Default/images/stock-channel-red-16.png * themes/Default/images/stock-channel-red-24.png: updated. * themes/Default/images/stock-channel-32.png * themes/Default/images/stock-channel-48.png * themes/Default/images/stock-channel-blue-32.png * themes/Default/images/stock-channel-blue-48.png * themes/Default/images/stock-channel-gray-32.png * themes/Default/images/stock-channel-gray-48.png * themes/Default/images/stock-channel-green-32.png * themes/Default/images/stock-channel-green-48.png * themes/Default/images/stock-channel-red-32.png * themes/Default/images/stock-channel-red-48.png * themes/Default/images/stock-grid-16.png * themes/Default/images/stock-image-32.png * themes/Default/images/stock-image-48.png * themes/Default/images/stock-layer-32.png * themes/Default/images/stock-layer-48.png * themes/Default/images/stock-list-16.png * themes/Default/images/stock-text-layer-16.png * themes/Default/images/stock-text-layer-24.png * themes/Default/images/stock-text-layer-32.png * themes/Default/images/stock-text-layer-48.png: new ones. * themes/Default/images/Makefile.am * libgimpwidgets/gimpstock.[ch]: added them to the stock system. * app/text/gimptextlayer.c: use GIMP_STOCK_TEXT_LAYER.
2003-03-27 20:29:54 +08:00
{
GtkIconSet *set = gtk_icon_set_new ();
GtkIconSource *source = gtk_icon_source_new ();
More great icons from Jimmac: 2003-03-27 Michael Natterer <mitch@gimp.org> More great icons from Jimmac: * themes/Default/images/stock-channel-16.png * themes/Default/images/stock-channel-24.png * themes/Default/images/stock-channel-blue-16.png * themes/Default/images/stock-channel-blue-24.png * themes/Default/images/stock-channel-gray-16.png * themes/Default/images/stock-channel-gray-24.png * themes/Default/images/stock-channel-green-16.png * themes/Default/images/stock-channel-green-24.png * themes/Default/images/stock-channel-red-16.png * themes/Default/images/stock-channel-red-24.png: updated. * themes/Default/images/stock-channel-32.png * themes/Default/images/stock-channel-48.png * themes/Default/images/stock-channel-blue-32.png * themes/Default/images/stock-channel-blue-48.png * themes/Default/images/stock-channel-gray-32.png * themes/Default/images/stock-channel-gray-48.png * themes/Default/images/stock-channel-green-32.png * themes/Default/images/stock-channel-green-48.png * themes/Default/images/stock-channel-red-32.png * themes/Default/images/stock-channel-red-48.png * themes/Default/images/stock-grid-16.png * themes/Default/images/stock-image-32.png * themes/Default/images/stock-image-48.png * themes/Default/images/stock-layer-32.png * themes/Default/images/stock-layer-48.png * themes/Default/images/stock-list-16.png * themes/Default/images/stock-text-layer-16.png * themes/Default/images/stock-text-layer-24.png * themes/Default/images/stock-text-layer-32.png * themes/Default/images/stock-text-layer-48.png: new ones. * themes/Default/images/Makefile.am * libgimpwidgets/gimpstock.[ch]: added them to the stock system. * app/text/gimptextlayer.c: use GIMP_STOCK_TEXT_LAYER.
2003-03-27 20:29:54 +08:00
gtk_icon_source_set_direction_wildcarded (source, TRUE);
gtk_icon_source_set_size_wildcarded (source, TRUE);
gtk_icon_source_set_state_wildcarded (source, TRUE);
gtk_icon_source_set_icon_name (source, icon_name);
gtk_icon_set_add_source (set, source);
gtk_icon_source_free (source);
gtk_icon_factory_add (factory, stock_id, set);
gtk_icon_set_unref (set);
}
2001-11-10 00:54:56 +08:00
static void
register_bidi_stock_icon (GtkIconFactory *factory,
const gchar *stock_id,
const gchar *icon_name_ltr,
const gchar *icon_name_rtl)
{
GtkIconSet *set = gtk_icon_set_new ();
GtkIconSource *source = gtk_icon_source_new ();
gtk_icon_source_set_direction (source, GTK_TEXT_DIR_LTR);
gtk_icon_source_set_direction_wildcarded (source, FALSE);
gtk_icon_source_set_size_wildcarded (source, TRUE);
gtk_icon_source_set_state_wildcarded (source, TRUE);
gtk_icon_source_set_icon_name (source, icon_name_ltr);
gtk_icon_set_add_source (set, source);
gtk_icon_source_free (source);
source = gtk_icon_source_new ();
gtk_icon_source_set_direction (source, GTK_TEXT_DIR_RTL);
gtk_icon_source_set_direction_wildcarded (source, FALSE);
gtk_icon_source_set_size_wildcarded (source, TRUE);
gtk_icon_source_set_state_wildcarded (source, TRUE);
gtk_icon_source_set_icon_name (source, icon_name_rtl);
gtk_icon_set_add_source (set, source);
gtk_icon_source_free (source);
gtk_icon_factory_add (factory, stock_id, set);
gtk_icon_set_unref (set);
}
static GFile *icon_theme_path = NULL;
static GFile *default_icon_theme_path = NULL;
static void
gimp_icons_change_icon_theme (GFile *path)
{
if (! default_icon_theme_path)
default_icon_theme_path = gimp_data_directory_file ("icons", "Default",
NULL);
if (! g_file_equal (path, icon_theme_path))
{
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
if (g_file_equal (icon_theme_path, default_icon_theme_path))
{
/* if the current icon theme is the default theme, simply
* prepend the new theme's path
*/
gchar *path_str = g_file_get_path (path);
gtk_icon_theme_prepend_search_path (icon_theme, path_str);
g_free (path_str);
}
else
{
/* if the current theme is not the default theme, we need
* to deal with the search path's first element
*/
gchar **paths;
gint n_paths;
gtk_icon_theme_get_search_path (icon_theme, &paths, &n_paths);
if (g_file_equal (path, default_icon_theme_path))
{
/* when switching to the default theme, remove the
* first search path element, the default theme will
* still be in the search path as fallback
*/
gtk_icon_theme_set_search_path (icon_theme,
(const gchar **) paths + 1,
n_paths - 1);
}
else
{
/* when switching between two non-default themes, replace
* the first element of the search path with the new
* theme's path
*/
g_free (paths[0]);
paths[0] = g_file_get_path (path);
gtk_icon_theme_set_search_path (icon_theme,
(const gchar **) paths, n_paths);
}
g_strfreev (paths);
}
g_object_unref (icon_theme_path);
icon_theme_path = g_object_ref (path);
}
}
void
gimp_icons_set_icon_theme (GFile *path)
{
g_return_if_fail (path == NULL || G_IS_FILE (path));
if (path)
path = g_object_ref (path);
else
path = gimp_data_directory_file (gimp_data_directory (), "icons", "Default",
NULL);
if (! g_file_query_exists (path, NULL))
{
g_warning ("Icon theme path does not exist: %s",
gimp_file_get_utf8_name (path));
}
else
{
GFile *hicolor = g_file_get_child (path, "hicolor");
if (! g_file_query_exists (hicolor, NULL))
{
g_warning ("Icon theme path has no 'hicolor' subdirectory: %s",
gimp_file_get_utf8_name (path));
}
else
{
GFile *index = g_file_get_child (hicolor, "index.theme");
if (! g_file_query_exists (index, NULL))
{
g_warning ("Icon theme path has no 'hicolor/index.theme': %s",
gimp_file_get_utf8_name (path));
}
else
{
/* the path points to what looks like a valid icon theme */
if (icon_theme_path)
{
/* this is an icon theme change */
gimp_icons_change_icon_theme (path);
}
else
{
/* this is the first call upon initialization */
icon_theme_path = g_object_ref (path);
}
}
g_object_unref (index);
}
g_object_unref (hicolor);
}
g_object_unref (path);
}
/**
* gimp_stock_init:
*
* Initializes the GIMP stock icon factory.
*
* You don't need to call this function as gimp_ui_init() already does
* this for you.
*
* Deprecated: 2.10: USe gimp_icons_init() instead.
*/
2001-08-04 22:10:58 +08:00
void
gimp_stock_init (void)
{
gimp_icons_init ();
}
/**
* gimp_icons_init:
*
* Initializes the GIMP stock icon factory.
*
* You don't need to call this function as gimp_ui_init() already does
* this for you.
*/
void
gimp_icons_init (void)
2001-08-04 22:10:58 +08:00
{
static gboolean initialized = FALSE;
GdkPixbuf *pixbuf;
GError *error = NULL;
gchar *icons_dir;
gint i;
Makefile.am configure.in themes/.cvsignore themes/Makefile.am 2001-08-05 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * themes/.cvsignore * themes/Makefile.am * themes/Default/.cvsignore * themes/Default/Makefile.am * themes/Default/images/.cvsignore * themes/Default/images/*.png * themes/Default/images/tools/.cvsignore * themes/Default/images/tools/*.png: new place for all images which are registered with the stock system. The default images are all inlined but we will install the default theme later along with an appropriate gtkrc as a template for custom themes. Added PNGs of all tools icons. Thanks to syngin :) * pixmaps/.cvsignore * pixmaps/Makefile.am: reverted everything to the old state. This directory will go away soon. * libgimpwidgets/gimpstock.[ch]: changed accordingly. Register stock icons in GTK_ICON_SIZE_BUTTON for all tools. * app/core/gimptoolinfo.[ch] * app/tools/tool_manager.[ch]: GimpToolInfo wants a stock_id and a pre-rendered GdkPixbuf instead of ugly icon_data now. Added some workarounds until GimpPreview is a GtkImage and uses GdkPixbuf instead of TempBuf. * app/tools/Makefile.am * app/tools/icons.h: die, uglyness, die. * app/tools/[all tools].c: register with a stock_id, not a icon_data pointer. * app/gui/dialogs-constructors.c: Oops, GIMP badly crashed on changing the image for the past few days :) * app/gui/menus.c: create the tools' menu entries with stock icons. * app/gui/toolbox.c: use GtkImages instead of GimpPreviews for the toolbox buttons. Will need to change this back as soon as GimpPreview actually _is_ a GtkImage.
2001-08-06 00:07:02 +08:00
2001-08-04 22:10:58 +08:00
if (initialized)
return;
gimp_stock_factory = gtk_icon_factory_new ();
for (i = 0; i < G_N_ELEMENTS (gimp_stock_items); i++)
More great icons from Jimmac: 2003-03-27 Michael Natterer <mitch@gimp.org> More great icons from Jimmac: * themes/Default/images/stock-channel-16.png * themes/Default/images/stock-channel-24.png * themes/Default/images/stock-channel-blue-16.png * themes/Default/images/stock-channel-blue-24.png * themes/Default/images/stock-channel-gray-16.png * themes/Default/images/stock-channel-gray-24.png * themes/Default/images/stock-channel-green-16.png * themes/Default/images/stock-channel-green-24.png * themes/Default/images/stock-channel-red-16.png * themes/Default/images/stock-channel-red-24.png: updated. * themes/Default/images/stock-channel-32.png * themes/Default/images/stock-channel-48.png * themes/Default/images/stock-channel-blue-32.png * themes/Default/images/stock-channel-blue-48.png * themes/Default/images/stock-channel-gray-32.png * themes/Default/images/stock-channel-gray-48.png * themes/Default/images/stock-channel-green-32.png * themes/Default/images/stock-channel-green-48.png * themes/Default/images/stock-channel-red-32.png * themes/Default/images/stock-channel-red-48.png * themes/Default/images/stock-grid-16.png * themes/Default/images/stock-image-32.png * themes/Default/images/stock-image-48.png * themes/Default/images/stock-layer-32.png * themes/Default/images/stock-layer-48.png * themes/Default/images/stock-list-16.png * themes/Default/images/stock-text-layer-16.png * themes/Default/images/stock-text-layer-24.png * themes/Default/images/stock-text-layer-32.png * themes/Default/images/stock-text-layer-48.png: new ones. * themes/Default/images/Makefile.am * libgimpwidgets/gimpstock.[ch]: added them to the stock system. * app/text/gimptextlayer.c: use GIMP_STOCK_TEXT_LAYER.
2003-03-27 20:29:54 +08:00
{
register_stock_icon (gimp_stock_factory,
gimp_stock_items[i].stock_id,
gimp_stock_items[i].stock_id);
More great icons from Jimmac: 2003-03-27 Michael Natterer <mitch@gimp.org> More great icons from Jimmac: * themes/Default/images/stock-channel-16.png * themes/Default/images/stock-channel-24.png * themes/Default/images/stock-channel-blue-16.png * themes/Default/images/stock-channel-blue-24.png * themes/Default/images/stock-channel-gray-16.png * themes/Default/images/stock-channel-gray-24.png * themes/Default/images/stock-channel-green-16.png * themes/Default/images/stock-channel-green-24.png * themes/Default/images/stock-channel-red-16.png * themes/Default/images/stock-channel-red-24.png: updated. * themes/Default/images/stock-channel-32.png * themes/Default/images/stock-channel-48.png * themes/Default/images/stock-channel-blue-32.png * themes/Default/images/stock-channel-blue-48.png * themes/Default/images/stock-channel-gray-32.png * themes/Default/images/stock-channel-gray-48.png * themes/Default/images/stock-channel-green-32.png * themes/Default/images/stock-channel-green-48.png * themes/Default/images/stock-channel-red-32.png * themes/Default/images/stock-channel-red-48.png * themes/Default/images/stock-grid-16.png * themes/Default/images/stock-image-32.png * themes/Default/images/stock-image-48.png * themes/Default/images/stock-layer-32.png * themes/Default/images/stock-layer-48.png * themes/Default/images/stock-list-16.png * themes/Default/images/stock-text-layer-16.png * themes/Default/images/stock-text-layer-24.png * themes/Default/images/stock-text-layer-32.png * themes/Default/images/stock-text-layer-48.png: new ones. * themes/Default/images/Makefile.am * libgimpwidgets/gimpstock.[ch]: added them to the stock system. * app/text/gimptextlayer.c: use GIMP_STOCK_TEXT_LAYER.
2003-03-27 20:29:54 +08:00
}
register_bidi_stock_icon (gimp_stock_factory,
GIMP_STOCK_MENU_LEFT,
GIMP_STOCK_MENU_LEFT, GIMP_STOCK_MENU_RIGHT);
register_bidi_stock_icon (gimp_stock_factory,
GIMP_STOCK_MENU_RIGHT,
GIMP_STOCK_MENU_RIGHT, GIMP_STOCK_MENU_LEFT);
2001-11-10 00:54:56 +08:00
register_stock_icon (gimp_stock_factory,
"gimp-indexed-palette", GIMP_STOCK_COLORMAP);
register_stock_icon (gimp_stock_factory,
"gimp-qmask-off", GIMP_STOCK_QUICK_MASK_OFF);
register_stock_icon (gimp_stock_factory,
"gimp-qmask-on", GIMP_STOCK_QUICK_MASK_ON);
2001-08-04 22:10:58 +08:00
gtk_icon_factory_add_default (gimp_stock_factory);
gtk_stock_add_static (gimp_stock_items,
G_N_ELEMENTS (gimp_stock_items));
gtk_stock_add_static (gimp_compat_stock_items,
G_N_ELEMENTS (gimp_compat_stock_items));
2001-08-04 22:10:58 +08:00
/* always prepend the default icon theme, it's never removed from
* the path again and acts as fallback for missing icons in other
* themes.
*/
if (! default_icon_theme_path)
default_icon_theme_path = gimp_data_directory_file ("icons", "Default",
NULL);
icons_dir = g_file_get_path (default_icon_theme_path);
gtk_icon_theme_prepend_search_path (gtk_icon_theme_get_default (),
icons_dir);
g_free (icons_dir);
/* if an icon theme was chosen before init(), change to it */
if (icon_theme_path &&
! g_file_equal (icon_theme_path, default_icon_theme_path))
{
icons_dir = g_file_get_path (icon_theme_path);
gtk_icon_theme_prepend_search_path (gtk_icon_theme_get_default (),
icons_dir);
g_free (icons_dir);
}
pixbuf = gdk_pixbuf_new_from_resource ("/org/gimp/icons/64/gimp-wilber-eek.png",
&error);
if (pixbuf)
{
gtk_icon_theme_add_builtin_icon (GIMP_STOCK_WILBER_EEK, 64, pixbuf);
g_object_unref (pixbuf);
}
else
{
g_critical ("Failed to create icon image: %s", error->message);
g_clear_error (&error);
}
2001-08-04 22:10:58 +08:00
initialized = TRUE;
}