build pixmaps/ before libgimpwidgets/.

2001-08-04  Michael Natterer  <mitch@gimp.org>

	* Makefile.am: build pixmaps/ before libgimpwidgets/.

	* pixmaps/.cvsignore
	* pixmaps/Makefile.am: build gimp-stock-pixbufs.h using
	gdk-pixbuf-csource from some of our XPMs.

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimpstock.[ch]: new files featuring
	gimp_stock_init(). Register a default GtkIconFactory and a set of
	stock buttons.

	* app/gui/gui.[ch]: new function gui_libs_init(). Call
	gimp_stock_init() from it.

	* app/app_procs.c: call new function gui_libs_init().

	* libgimp/gimpui.c: call gimp_stock_init().

	* app/devices.c: removed action_area hacks as we can configure it
	via style properties now.

	* app/gui/menus.c: use <StockItem> for some menu entries.
	Looks nifty :-)

	* app/widgets/gimpcontainereditor.[ch]: take a "stock_id"
	parameter in gimp_container_editor_add_button(), not a EEKy
	pxm_data pointer.

	* app/widgets/gimpbufferview.c
	* app/widgets/gimpdatafactoryview.c: changed accordingly.

	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpdrawablelistview.c: removed ugly tooltips
	formating hacks since gtk2 does it right now.

	* app/widgets/gimpdockbook.c: re-enabled a line that was commented
	out for some reason...?

	* app/errorconsole.c
	* app/gui/file-new-dialog.c
	* app/gui/tool-options-dialog.c
	* plug-ins/common/uniteditor.c: use the new GIMP_STOCK_FOO id's.

	* libgimpwidgets/gimpquerybox.c: fixed auto-hiding by connection
	to a passed object's signal.
This commit is contained in:
Michael Natterer 2001-08-04 14:10:58 +00:00 committed by Michael Natterer
parent a44ec6b377
commit e4ed0990af
38 changed files with 654 additions and 346 deletions

View File

@ -1,3 +1,52 @@
2001-08-04 Michael Natterer <mitch@gimp.org>
* Makefile.am: build pixmaps/ before libgimpwidgets/.
* pixmaps/.cvsignore
* pixmaps/Makefile.am: build gimp-stock-pixbufs.h using
gdk-pixbuf-csource from some of our XPMs.
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgets.h
* libgimpwidgets/gimpstock.[ch]: new files featuring
gimp_stock_init(). Register a default GtkIconFactory and a set of
stock buttons.
* app/gui/gui.[ch]: new function gui_libs_init(). Call
gimp_stock_init() from it.
* app/app_procs.c: call new function gui_libs_init().
* libgimp/gimpui.c: call gimp_stock_init().
* app/devices.c: removed action_area hacks as we can configure it
via style properties now.
* app/gui/menus.c: use <StockItem> for some menu entries.
Looks nifty :-)
* app/widgets/gimpcontainereditor.[ch]: take a "stock_id"
parameter in gimp_container_editor_add_button(), not a EEKy
pxm_data pointer.
* app/widgets/gimpbufferview.c
* app/widgets/gimpdatafactoryview.c: changed accordingly.
* app/widgets/gimpchannellistview.c
* app/widgets/gimpdrawablelistview.c: removed ugly tooltips
formating hacks since gtk2 does it right now.
* app/widgets/gimpdockbook.c: re-enabled a line that was commented
out for some reason...?
* app/errorconsole.c
* app/gui/file-new-dialog.c
* app/gui/tool-options-dialog.c
* plug-ins/common/uniteditor.c: use the new GIMP_STOCK_FOO id's.
* libgimpwidgets/gimpquerybox.c: fixed auto-hiding by connection
to a passed object's signal.
2001-08-03 Michael Natterer <mitch@gimp.org>
* gtkrc: set style properties for dockables.

View File

@ -4,6 +4,7 @@ SUBDIRS = \
tools \
intl \
regexrepl \
pixmaps \
libgimpbase \
libgimpcolor \
libgimpmath \
@ -18,7 +19,6 @@ SUBDIRS = \
$(GIMP_PERL_PO) \
po-script-fu \
cursors \
pixmaps \
data \
tips \
docs \

View File

@ -128,26 +128,7 @@ app_init (gint gimp_argc,
if (! no_interface)
{
const gchar *gtkrc;
gchar *filename;
/* parse the systemwide gtkrc */
gtkrc = gimp_gtkrc ();
if (be_verbose)
g_print (_("parsing \"%s\"\n"), gtkrc);
gtk_rc_parse (gtkrc);
/* parse the user gtkrc */
filename = gimp_personal_rc_file ("gtkrc");
if (be_verbose)
g_print (_("parsing \"%s\"\n"), filename);
gtk_rc_parse (filename);
g_free (filename);
gui_libs_init (&gimp_argc, &gimp_argv);
}
/* The user_install dialog may have parsed unitrc and gimprc, so
@ -187,10 +168,6 @@ app_init (gint gimp_argc,
app_init_update_status (_("Procedural Database"), NULL, -1);
internal_procs_init (the_gimp);
#ifdef DISPLAY_FILTERS
color_display_init ();
#endif /* DISPLAY_FILTERS */
/* Initialize the xcf file format routines
*/
xcf_init (the_gimp);
@ -215,6 +192,10 @@ app_init (gint gimp_argc,
if (! no_splash)
splash_destroy ();
#ifdef DISPLAY_FILTERS
color_display_init ();
#endif /* DISPLAY_FILTERS */
gui_init (the_gimp);
/* FIXME: This needs to go in preferences */

View File

@ -195,37 +195,16 @@ GtkWidget *
input_dialog_create (void)
{
static GtkWidget *inputd = NULL;
GtkWidget *hbbox;
if (inputd)
return inputd;
inputd = gtk_input_dialog_new ();
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->save_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->save_button,
GTK_CAN_DEFAULT);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->close_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->close_button,
GTK_CAN_DEFAULT);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (inputd)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_grab_default (GTK_INPUT_DIALOG (inputd)->close_button);
gtk_widget_show(hbbox);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->save_button),
"clicked",
G_CALLBACK (devices_write_rc),
NULL);
NULL);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->close_button),
"clicked",
G_CALLBACK (devices_close_callback),

View File

@ -350,7 +350,7 @@ file_new_dialog_create (GimpImage *gimage)
GTK_STOCK_OK, file_new_ok_callback,
info, NULL, NULL, TRUE, FALSE,
_("Reset"), file_new_reset_callback,
GIMP_STOCK_RESET, file_new_reset_callback,
info, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CANCEL, file_new_cancel_callback,
info, NULL, NULL, FALSE, TRUE,

View File

@ -292,7 +292,7 @@ error_console_create (void)
GTK_WIN_POS_NONE,
TRUE, TRUE, FALSE,
_("Clear"), error_console_clear_callback,
GTK_STOCK_CLEAR, error_console_clear_callback,
text_buffer, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CLOSE, error_console_close_callback,
text_buffer, NULL, NULL, TRUE, TRUE,

View File

@ -195,37 +195,16 @@ GtkWidget *
input_dialog_create (void)
{
static GtkWidget *inputd = NULL;
GtkWidget *hbbox;
if (inputd)
return inputd;
inputd = gtk_input_dialog_new ();
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->save_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->save_button,
GTK_CAN_DEFAULT);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->close_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->close_button,
GTK_CAN_DEFAULT);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (inputd)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_grab_default (GTK_INPUT_DIALOG (inputd)->close_button);
gtk_widget_show(hbbox);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->save_button),
"clicked",
G_CALLBACK (devices_write_rc),
NULL);
NULL);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->close_button),
"clicked",
G_CALLBACK (devices_close_callback),

View File

@ -350,7 +350,7 @@ file_new_dialog_create (GimpImage *gimage)
GTK_STOCK_OK, file_new_ok_callback,
info, NULL, NULL, TRUE, FALSE,
_("Reset"), file_new_reset_callback,
GIMP_STOCK_RESET, file_new_reset_callback,
info, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CANCEL, file_new_cancel_callback,
info, NULL, NULL, FALSE, TRUE,

View File

@ -122,6 +122,34 @@ static GQuark image_update_handler_id = 0;
/* public functions */
void
gui_libs_init (gint *argc,
gchar ***argv)
{
const gchar *gtkrc;
gchar *filename;
gimp_stock_init ();
/* parse the systemwide gtkrc */
gtkrc = gimp_gtkrc ();
if (be_verbose)
g_print (_("parsing \"%s\"\n"), gtkrc);
gtk_rc_parse (gtkrc);
/* parse the user gtkrc */
filename = gimp_personal_rc_file ("gtkrc");
if (be_verbose)
g_print (_("parsing \"%s\"\n"), filename);
gtk_rc_parse (filename);
g_free (filename);
}
void
gui_init (Gimp *gimp)
{

View File

@ -20,12 +20,15 @@
#define __GUI_H__
void gui_init (Gimp *gimp);
void gui_restore (Gimp *gimp);
void gui_post_init (Gimp *gimp);
void gui_libs_init (gint *argc,
gchar ***argv);
void gui_shutdown (Gimp *gimp);
void gui_exit (Gimp *gimp);
void gui_init (Gimp *gimp);
void gui_restore (Gimp *gimp);
void gui_post_init (Gimp *gimp);
void gui_shutdown (Gimp *gimp);
void gui_exit (Gimp *gimp);
void gui_really_quit_dialog (void);

View File

@ -195,37 +195,16 @@ GtkWidget *
input_dialog_create (void)
{
static GtkWidget *inputd = NULL;
GtkWidget *hbbox;
if (inputd)
return inputd;
inputd = gtk_input_dialog_new ();
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->save_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->save_button,
GTK_CAN_DEFAULT);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->close_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->close_button,
GTK_CAN_DEFAULT);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (inputd)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_grab_default (GTK_INPUT_DIALOG (inputd)->close_button);
gtk_widget_show(hbbox);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->save_button),
"clicked",
G_CALLBACK (devices_write_rc),
NULL);
NULL);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->close_button),
"clicked",
G_CALLBACK (devices_close_callback),

View File

@ -126,11 +126,13 @@ static GimpItemFactoryEntry toolbox_entries[] =
BRANCH (N_("/_File")),
{ { N_("/File/New..."), "<control>N",
file_new_cmd_callback, 0 },
file_new_cmd_callback, 0,
"<StockItem>", GTK_STOCK_NEW },
NULL,
"file/dialogs/file_new.html", NULL },
{ { N_("/File/Open..."), "<control>O",
file_open_cmd_callback, 0 },
file_open_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN },
NULL,
"file/dialogs/file_open.html", NULL },
@ -143,7 +145,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
SEPARATOR ("/File/---"),
{ { N_("/File/Preferences..."), NULL,
dialogs_create_toplevel_cmd_callback, 0 },
dialogs_create_toplevel_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PREFERENCES },
"gimp:preferences-dialog",
"file/dialogs/preferences/preferences.html", NULL },
@ -250,7 +253,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
SEPARATOR ("/File/---MRU"),
{ { N_("/File/Quit"), "<control>Q",
file_quit_cmd_callback, 0 },
file_quit_cmd_callback, 0,
"<StockItem>", GTK_STOCK_QUIT },
NULL,
"file/quit.html", NULL },
@ -270,7 +274,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
BRANCH (N_("/_Help")),
{ { N_("/Help/Help..."), "F1",
help_help_cmd_callback, 0 },
help_help_cmd_callback, 0,
"<StockItem>", GTK_STOCK_HELP },
NULL,
"help/dialogs/help.html", NULL },
{ { N_("/Help/Context Help..."), "<shift>F1",
@ -316,38 +321,46 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/File */
{ { N_("/File/New..."), "<control>N",
file_new_cmd_callback, 1 },
file_new_cmd_callback, 1,
"<StockItem>", GTK_STOCK_NEW },
NULL,
"file/dialogs/file_new.html", NULL },
{ { N_("/File/Open..."), "<control>O",
file_open_cmd_callback, 0 },
file_open_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN },
NULL,
"file/dialogs/file_open.html", NULL },
{ { N_("/File/Save"), "<control>S",
file_save_cmd_callback, 0 },
file_save_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Save as..."), NULL,
file_save_as_cmd_callback, 0 },
file_save_as_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE_AS },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Save a Copy as..."), NULL,
file_save_a_copy_as_cmd_callback, 0 },
file_save_a_copy_as_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE_AS },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Revert..."), NULL,
file_revert_cmd_callback, 0 },
file_revert_cmd_callback, 0,
"<StockItem>", GTK_STOCK_REVERT_TO_SAVED },
NULL,
"file/revert.html", NULL },
SEPARATOR ("/File/---"),
{ { N_( "/File/Close"), "<control>W",
file_close_cmd_callback, 0 },
file_close_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CLOSE },
NULL,
"file/close.html", NULL },
{ { N_("/File/Quit"), "<control>Q",
file_quit_cmd_callback, 0 },
file_quit_cmd_callback, 0,
"<StockItem>", GTK_STOCK_QUIT },
NULL,
"file/quit.html", NULL },
@ -356,56 +369,67 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Edit */
{ { N_("/Edit/Undo"), "<control>Z",
edit_undo_cmd_callback, 0 },
edit_undo_cmd_callback, 0,
"<StockItem>", GTK_STOCK_UNDO },
NULL,
"edit/undo.html", NULL },
{ { N_("/Edit/Redo"), "<control>R",
edit_redo_cmd_callback, 0 },
edit_redo_cmd_callback, 0,
"<StockItem>", GTK_STOCK_REDO },
NULL,
"edit/redo.html", NULL },
SEPARATOR ("/Edit/---"),
{ { N_("/Edit/Cut"), "<control>X",
edit_cut_cmd_callback, 0 },
edit_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
NULL,
"edit/cut.html", NULL },
{ { N_("/Edit/Copy"), "<control>C",
edit_copy_cmd_callback, 0 },
edit_copy_cmd_callback, 0,
"<StockItem>", GTK_STOCK_COPY },
NULL,
"edit/copy.html", NULL },
{ { N_("/Edit/Paste"), "<control>V",
edit_paste_cmd_callback, 0 },
edit_paste_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste.html", NULL },
{ { N_("/Edit/Paste Into"), NULL,
edit_paste_into_cmd_callback, 0 },
edit_paste_into_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste_into.html", NULL },
{ { N_("/Edit/Paste as New"), NULL,
edit_paste_as_new_cmd_callback, 0 },
edit_paste_as_new_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste_as_new.html", NULL },
/* <Image>/Edit/Buffer */
{ { N_("/Edit/Buffer/Cut Named..."), "<control><shift>X",
edit_named_cut_cmd_callback, 0 },
edit_named_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
NULL,
"edit/dialogs/cut_named.html", NULL },
{ { N_("/Edit/Buffer/Copy Named..."), "<control><shift>C",
edit_named_copy_cmd_callback, 0 },
edit_named_copy_cmd_callback, 0,
"<StockItem>", GTK_STOCK_COPY },
NULL,
"edit/dialogs/copy_named.html", NULL },
{ { N_("/Edit/Buffer/Paste Named..."), "<control><shift>V",
edit_named_paste_cmd_callback, 0 },
edit_named_paste_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/dialogs/paste_named.html", NULL },
SEPARATOR ("/Edit/---"),
{ { N_("/Edit/Clear"), "<control>K",
edit_clear_cmd_callback, 0 },
edit_clear_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CLEAR },
NULL,
"edit/clear.html", NULL },
{ { N_("/Edit/Fill with FG Color"), "<control>comma",
@ -474,10 +498,14 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/View */
{ { N_("/View/Zoom In"), "equal", view_zoomin_cmd_callback, 0 },
{ { N_("/View/Zoom In"), "equal",
view_zoomin_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_IN },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom Out"), "minus", view_zoomout_cmd_callback, 0 },
{ { N_("/View/Zoom Out"), "minus",
view_zoomout_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_OUT },
NULL,
"view/zoom.html", NULL },
@ -495,7 +523,9 @@ static GimpItemFactoryEntry image_entries[] =
{ { N_("/View/Zoom/2:1"), NULL, view_zoom_cmd_callback, 201 },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom/1:1"), "1", view_zoom_cmd_callback, 101 },
{ { N_("/View/Zoom/1:1"), "1",
view_zoom_cmd_callback, 101,
"<StockItem>", GTK_STOCK_ZOOM_100 },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom/1:2"), NULL, view_zoom_cmd_callback, 102 },
@ -564,15 +594,18 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Image/Mode */
{ { N_("/Image/Mode/RGB"), "<alt>R",
image_convert_rgb_cmd_callback, 0 },
image_convert_rgb_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/convert_to_rgb.html", NULL },
{ { N_("/Image/Mode/Grayscale"), "<alt>G",
image_convert_grayscale_cmd_callback, 0 },
image_convert_grayscale_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/convert_to_grayscale.html", NULL },
{ { N_("/Image/Mode/Indexed..."), "<alt>I",
image_convert_indexed_cmd_callback, 0 },
image_convert_indexed_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/dialogs/convert_to_indexed.html", NULL },
@ -660,19 +693,23 @@ static GimpItemFactoryEntry image_entries[] =
NULL,
"layers/stack/stack.html#next_layer", NULL },
{ { N_("/Layers/Stack/Raise Layer"), "<shift>Prior",
layers_raise_cmd_callback, 0 },
layers_raise_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RAISE },
NULL,
"layers/stack/stack.html#raise_layer", NULL },
{ { N_("/Layers/Stack/Lower Layer"), "<shift>Next",
layers_lower_cmd_callback, 0 },
layers_lower_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LOWER },
NULL,
"layers/stack/stack.html#lower_layer", NULL },
{ { N_("/Layers/Stack/Layer to Top"), "<control>Prior",
layers_raise_to_top_cmd_callback, 0 },
layers_raise_to_top_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RAISE },
NULL,
"layers/stack/stack.html#layer_to_top", NULL },
{ { N_("/Layers/Stack/Layer to Bottom"), "<control>Next",
layers_lower_to_bottom_cmd_callback, 0 },
layers_lower_to_bottom_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LOWER },
NULL,
"layers/stack/stack.html#layer_to_bottom", NULL },
@ -813,11 +850,13 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Filters */
{ { N_("/Filters/Repeat Last"), "<alt>F",
filters_repeat_cmd_callback, (guint) FALSE },
filters_repeat_cmd_callback, (guint) FALSE,
"<StockItem>", GTK_STOCK_EXECUTE },
NULL,
"filters/repeat_last.html", NULL },
{ { N_("/Filters/Re-Show Last"), "<alt><shift>F",
filters_repeat_cmd_callback, (guint) TRUE },
filters_repeat_cmd_callback, (guint) TRUE,
"<StockItem>", GTK_STOCK_EXECUTE },
NULL,
"filters/reshow_last.html", NULL },
@ -2081,7 +2120,8 @@ menus_init_mru (void)
last_opened_entries[i].entry.callback = file_last_opened_cmd_callback;
last_opened_entries[i].entry.callback_action = i;
last_opened_entries[i].entry.item_type = NULL;
last_opened_entries[i].entry.item_type = "<StockItem>";
last_opened_entries[i].entry.extra_data = GTK_STOCK_OPEN;
last_opened_entries[i].quark_string = NULL;
last_opened_entries[i].help_page = "file/last_opened.html";
last_opened_entries[i].description = NULL;

View File

@ -101,7 +101,7 @@ tool_options_dialog_create (void)
GTK_WIN_POS_NONE,
FALSE, TRUE, TRUE,
_("Reset"), tool_options_dialog_reset_callback,
GIMP_STOCK_RESET, tool_options_dialog_reset_callback,
NULL, NULL, &options_reset_button, FALSE, FALSE,
GTK_STOCK_CLOSE, tool_options_dialog_close_callback,

View File

@ -126,11 +126,13 @@ static GimpItemFactoryEntry toolbox_entries[] =
BRANCH (N_("/_File")),
{ { N_("/File/New..."), "<control>N",
file_new_cmd_callback, 0 },
file_new_cmd_callback, 0,
"<StockItem>", GTK_STOCK_NEW },
NULL,
"file/dialogs/file_new.html", NULL },
{ { N_("/File/Open..."), "<control>O",
file_open_cmd_callback, 0 },
file_open_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN },
NULL,
"file/dialogs/file_open.html", NULL },
@ -143,7 +145,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
SEPARATOR ("/File/---"),
{ { N_("/File/Preferences..."), NULL,
dialogs_create_toplevel_cmd_callback, 0 },
dialogs_create_toplevel_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PREFERENCES },
"gimp:preferences-dialog",
"file/dialogs/preferences/preferences.html", NULL },
@ -250,7 +253,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
SEPARATOR ("/File/---MRU"),
{ { N_("/File/Quit"), "<control>Q",
file_quit_cmd_callback, 0 },
file_quit_cmd_callback, 0,
"<StockItem>", GTK_STOCK_QUIT },
NULL,
"file/quit.html", NULL },
@ -270,7 +274,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
BRANCH (N_("/_Help")),
{ { N_("/Help/Help..."), "F1",
help_help_cmd_callback, 0 },
help_help_cmd_callback, 0,
"<StockItem>", GTK_STOCK_HELP },
NULL,
"help/dialogs/help.html", NULL },
{ { N_("/Help/Context Help..."), "<shift>F1",
@ -316,38 +321,46 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/File */
{ { N_("/File/New..."), "<control>N",
file_new_cmd_callback, 1 },
file_new_cmd_callback, 1,
"<StockItem>", GTK_STOCK_NEW },
NULL,
"file/dialogs/file_new.html", NULL },
{ { N_("/File/Open..."), "<control>O",
file_open_cmd_callback, 0 },
file_open_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN },
NULL,
"file/dialogs/file_open.html", NULL },
{ { N_("/File/Save"), "<control>S",
file_save_cmd_callback, 0 },
file_save_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Save as..."), NULL,
file_save_as_cmd_callback, 0 },
file_save_as_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE_AS },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Save a Copy as..."), NULL,
file_save_a_copy_as_cmd_callback, 0 },
file_save_a_copy_as_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE_AS },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Revert..."), NULL,
file_revert_cmd_callback, 0 },
file_revert_cmd_callback, 0,
"<StockItem>", GTK_STOCK_REVERT_TO_SAVED },
NULL,
"file/revert.html", NULL },
SEPARATOR ("/File/---"),
{ { N_( "/File/Close"), "<control>W",
file_close_cmd_callback, 0 },
file_close_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CLOSE },
NULL,
"file/close.html", NULL },
{ { N_("/File/Quit"), "<control>Q",
file_quit_cmd_callback, 0 },
file_quit_cmd_callback, 0,
"<StockItem>", GTK_STOCK_QUIT },
NULL,
"file/quit.html", NULL },
@ -356,56 +369,67 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Edit */
{ { N_("/Edit/Undo"), "<control>Z",
edit_undo_cmd_callback, 0 },
edit_undo_cmd_callback, 0,
"<StockItem>", GTK_STOCK_UNDO },
NULL,
"edit/undo.html", NULL },
{ { N_("/Edit/Redo"), "<control>R",
edit_redo_cmd_callback, 0 },
edit_redo_cmd_callback, 0,
"<StockItem>", GTK_STOCK_REDO },
NULL,
"edit/redo.html", NULL },
SEPARATOR ("/Edit/---"),
{ { N_("/Edit/Cut"), "<control>X",
edit_cut_cmd_callback, 0 },
edit_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
NULL,
"edit/cut.html", NULL },
{ { N_("/Edit/Copy"), "<control>C",
edit_copy_cmd_callback, 0 },
edit_copy_cmd_callback, 0,
"<StockItem>", GTK_STOCK_COPY },
NULL,
"edit/copy.html", NULL },
{ { N_("/Edit/Paste"), "<control>V",
edit_paste_cmd_callback, 0 },
edit_paste_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste.html", NULL },
{ { N_("/Edit/Paste Into"), NULL,
edit_paste_into_cmd_callback, 0 },
edit_paste_into_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste_into.html", NULL },
{ { N_("/Edit/Paste as New"), NULL,
edit_paste_as_new_cmd_callback, 0 },
edit_paste_as_new_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste_as_new.html", NULL },
/* <Image>/Edit/Buffer */
{ { N_("/Edit/Buffer/Cut Named..."), "<control><shift>X",
edit_named_cut_cmd_callback, 0 },
edit_named_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
NULL,
"edit/dialogs/cut_named.html", NULL },
{ { N_("/Edit/Buffer/Copy Named..."), "<control><shift>C",
edit_named_copy_cmd_callback, 0 },
edit_named_copy_cmd_callback, 0,
"<StockItem>", GTK_STOCK_COPY },
NULL,
"edit/dialogs/copy_named.html", NULL },
{ { N_("/Edit/Buffer/Paste Named..."), "<control><shift>V",
edit_named_paste_cmd_callback, 0 },
edit_named_paste_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/dialogs/paste_named.html", NULL },
SEPARATOR ("/Edit/---"),
{ { N_("/Edit/Clear"), "<control>K",
edit_clear_cmd_callback, 0 },
edit_clear_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CLEAR },
NULL,
"edit/clear.html", NULL },
{ { N_("/Edit/Fill with FG Color"), "<control>comma",
@ -474,10 +498,14 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/View */
{ { N_("/View/Zoom In"), "equal", view_zoomin_cmd_callback, 0 },
{ { N_("/View/Zoom In"), "equal",
view_zoomin_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_IN },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom Out"), "minus", view_zoomout_cmd_callback, 0 },
{ { N_("/View/Zoom Out"), "minus",
view_zoomout_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_OUT },
NULL,
"view/zoom.html", NULL },
@ -495,7 +523,9 @@ static GimpItemFactoryEntry image_entries[] =
{ { N_("/View/Zoom/2:1"), NULL, view_zoom_cmd_callback, 201 },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom/1:1"), "1", view_zoom_cmd_callback, 101 },
{ { N_("/View/Zoom/1:1"), "1",
view_zoom_cmd_callback, 101,
"<StockItem>", GTK_STOCK_ZOOM_100 },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom/1:2"), NULL, view_zoom_cmd_callback, 102 },
@ -564,15 +594,18 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Image/Mode */
{ { N_("/Image/Mode/RGB"), "<alt>R",
image_convert_rgb_cmd_callback, 0 },
image_convert_rgb_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/convert_to_rgb.html", NULL },
{ { N_("/Image/Mode/Grayscale"), "<alt>G",
image_convert_grayscale_cmd_callback, 0 },
image_convert_grayscale_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/convert_to_grayscale.html", NULL },
{ { N_("/Image/Mode/Indexed..."), "<alt>I",
image_convert_indexed_cmd_callback, 0 },
image_convert_indexed_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/dialogs/convert_to_indexed.html", NULL },
@ -660,19 +693,23 @@ static GimpItemFactoryEntry image_entries[] =
NULL,
"layers/stack/stack.html#next_layer", NULL },
{ { N_("/Layers/Stack/Raise Layer"), "<shift>Prior",
layers_raise_cmd_callback, 0 },
layers_raise_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RAISE },
NULL,
"layers/stack/stack.html#raise_layer", NULL },
{ { N_("/Layers/Stack/Lower Layer"), "<shift>Next",
layers_lower_cmd_callback, 0 },
layers_lower_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LOWER },
NULL,
"layers/stack/stack.html#lower_layer", NULL },
{ { N_("/Layers/Stack/Layer to Top"), "<control>Prior",
layers_raise_to_top_cmd_callback, 0 },
layers_raise_to_top_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RAISE },
NULL,
"layers/stack/stack.html#layer_to_top", NULL },
{ { N_("/Layers/Stack/Layer to Bottom"), "<control>Next",
layers_lower_to_bottom_cmd_callback, 0 },
layers_lower_to_bottom_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LOWER },
NULL,
"layers/stack/stack.html#layer_to_bottom", NULL },
@ -813,11 +850,13 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Filters */
{ { N_("/Filters/Repeat Last"), "<alt>F",
filters_repeat_cmd_callback, (guint) FALSE },
filters_repeat_cmd_callback, (guint) FALSE,
"<StockItem>", GTK_STOCK_EXECUTE },
NULL,
"filters/repeat_last.html", NULL },
{ { N_("/Filters/Re-Show Last"), "<alt><shift>F",
filters_repeat_cmd_callback, (guint) TRUE },
filters_repeat_cmd_callback, (guint) TRUE,
"<StockItem>", GTK_STOCK_EXECUTE },
NULL,
"filters/reshow_last.html", NULL },
@ -2081,7 +2120,8 @@ menus_init_mru (void)
last_opened_entries[i].entry.callback = file_last_opened_cmd_callback;
last_opened_entries[i].entry.callback_action = i;
last_opened_entries[i].entry.item_type = NULL;
last_opened_entries[i].entry.item_type = "<StockItem>";
last_opened_entries[i].entry.extra_data = GTK_STOCK_OPEN;
last_opened_entries[i].quark_string = NULL;
last_opened_entries[i].help_page = "file/last_opened.html";
last_opened_entries[i].description = NULL;

View File

@ -41,11 +41,6 @@
#include "libgimp/gimpintl.h"
#include "pixmaps/paste.xpm"
#include "pixmaps/paste-into.xpm"
#include "pixmaps/paste-as-new.xpm"
#include "pixmaps/delete.xpm"
static void gimp_buffer_view_class_init (GimpBufferViewClass *klass);
static void gimp_buffer_view_init (GimpBufferView *view);
@ -120,25 +115,25 @@ gimp_buffer_view_init (GimpBufferView *view)
view->paste_button =
gimp_container_editor_add_button (editor,
paste_xpm,
GIMP_STOCK_PASTE,
_("Paste"), NULL,
G_CALLBACK (gimp_buffer_view_paste_clicked));
view->paste_into_button =
gimp_container_editor_add_button (editor,
paste_into_xpm,
GIMP_STOCK_PASTE_INTO,
_("Paste Into"), NULL,
G_CALLBACK (gimp_buffer_view_paste_into_clicked));
view->paste_as_new_button =
gimp_container_editor_add_button (editor,
paste_as_new_xpm,
GIMP_STOCK_PASTE_AS_NEW,
_("Paste as New"), NULL,
G_CALLBACK (gimp_buffer_view_paste_as_new_clicked));
view->delete_button =
gimp_container_editor_add_button (editor,
delete_xpm,
GIMP_STOCK_DELETE,
_("Delete"), NULL,
G_CALLBACK (gimp_buffer_view_delete_clicked));

View File

@ -176,9 +176,9 @@ gimp_channel_list_view_init (GimpChannelListView *view)
gtk_widget_show (view->toselection_button);
gimp_help_set_help_data (view->toselection_button,
_("Channel to Selection \n"
"<Shift> Add "
"<Ctrl> Subtract "
_("Channel to Selection\n"
"<Shift> Add\n"
"<Ctrl> Subtract\n"
"<Shift><Ctrl> Intersect"), NULL);
g_signal_connect (G_OBJECT (view->toselection_button), "clicked",

View File

@ -176,9 +176,9 @@ gimp_channel_list_view_init (GimpChannelListView *view)
gtk_widget_show (view->toselection_button);
gimp_help_set_help_data (view->toselection_button,
_("Channel to Selection \n"
"<Shift> Add "
"<Ctrl> Subtract "
_("Channel to Selection\n"
"<Shift> Add\n"
"<Ctrl> Subtract\n"
"<Shift><Ctrl> Intersect"), NULL);
g_signal_connect (G_OBJECT (view->toselection_button), "clicked",

View File

@ -250,16 +250,16 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
GtkWidget *
gimp_container_editor_add_button (GimpContainerEditor *editor,
gchar **xpm_data,
const gchar *stock_id,
const gchar *tooltip,
const gchar *help_data,
GCallback callback)
{
GtkWidget *pixmap;
GtkWidget *button;
GtkWidget *image;
g_return_val_if_fail (GIMP_IS_CONTAINER_EDITOR (editor), NULL);
g_return_val_if_fail (xpm_data != NULL, NULL);
g_return_val_if_fail (stock_id != NULL, NULL);
button = gtk_button_new ();
gtk_box_pack_start (GTK_BOX (editor->button_box), button,
@ -274,9 +274,9 @@ gimp_container_editor_add_button (GimpContainerEditor *editor,
callback,
editor);
pixmap = gimp_pixmap_new (xpm_data);
gtk_container_add (GTK_CONTAINER (button), pixmap);
gtk_widget_show (pixmap);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_show (image);
return button;
}

View File

@ -84,7 +84,7 @@ gboolean gimp_container_editor_construct (GimpContainerEditor *editor,
GimpContainerContextFunc context_func);
GtkWidget * gimp_container_editor_add_button (GimpContainerEditor *editor,
gchar **xpm_data,
const gchar *stock_id,
const gchar *tooltip,
const gchar *help_data,
GCallback callback);

View File

@ -46,12 +46,6 @@
#include "libgimp/gimpintl.h"
#include "pixmaps/delete.xpm"
#include "pixmaps/duplicate.xpm"
#include "pixmaps/new.xpm"
#include "pixmaps/edit.xpm"
#include "pixmaps/refresh.xpm"
static void gimp_data_factory_view_class_init (GimpDataFactoryViewClass *klass);
static void gimp_data_factory_view_init (GimpDataFactoryView *view);
@ -128,31 +122,31 @@ gimp_data_factory_view_init (GimpDataFactoryView *view)
view->new_button =
gimp_container_editor_add_button (editor,
new_xpm,
GIMP_STOCK_NEW,
_("New"), NULL,
G_CALLBACK (gimp_data_factory_view_new_clicked));
view->duplicate_button =
gimp_container_editor_add_button (editor,
duplicate_xpm,
GIMP_STOCK_DUPLICATE,
_("Duplicate"), NULL,
G_CALLBACK (gimp_data_factory_view_duplicate_clicked));
view->edit_button =
gimp_container_editor_add_button (editor,
edit_xpm,
GIMP_STOCK_EDIT,
_("Edit"), NULL,
G_CALLBACK (gimp_data_factory_view_edit_clicked));
view->delete_button =
gimp_container_editor_add_button (editor,
delete_xpm,
GIMP_STOCK_DELETE,
_("Delete"), NULL,
G_CALLBACK (gimp_data_factory_view_delete_clicked));
view->refresh_button =
gimp_container_editor_add_button (editor,
refresh_xpm,
GIMP_STOCK_REFRESH,
_("Refresh"), NULL,
G_CALLBACK (gimp_data_factory_view_refresh_clicked));
@ -406,20 +400,17 @@ gimp_data_factory_view_delete_clicked (GtkWidget *widget,
"\"%s\" from the list and from disk?"),
GIMP_OBJECT (data)->name);
dialog =
gimp_query_boolean_box (_("Delete Data Object"),
gimp_standard_help_func, NULL,
FALSE,
str,
_("Delete"), GTK_STOCK_CANCEL,
G_OBJECT (data),
"destroy",
gimp_data_factory_view_delete_callback,
delete_data);
dialog = gimp_query_boolean_box (_("Delete Data Object"),
gimp_standard_help_func, NULL,
FALSE,
str,
GIMP_STOCK_DELETE, GTK_STOCK_CANCEL,
G_OBJECT (data),
"destroy",
gimp_data_factory_view_delete_callback,
delete_data);
g_signal_connect_swapped (G_OBJECT (dialog), "destroy",
G_CALLBACK (g_free),
delete_data);
g_object_weak_ref (G_OBJECT (dialog), g_free, delete_data);
g_free (str);

View File

@ -195,37 +195,16 @@ GtkWidget *
input_dialog_create (void)
{
static GtkWidget *inputd = NULL;
GtkWidget *hbbox;
if (inputd)
return inputd;
inputd = gtk_input_dialog_new ();
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->save_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->save_button,
GTK_CAN_DEFAULT);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->close_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->close_button,
GTK_CAN_DEFAULT);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (inputd)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_grab_default (GTK_INPUT_DIALOG (inputd)->close_button);
gtk_widget_show(hbbox);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->save_button),
"clicked",
G_CALLBACK (devices_write_rc),
NULL);
NULL);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->close_button),
"clicked",
G_CALLBACK (devices_close_callback),

View File

@ -195,37 +195,16 @@ GtkWidget *
input_dialog_create (void)
{
static GtkWidget *inputd = NULL;
GtkWidget *hbbox;
if (inputd)
return inputd;
inputd = gtk_input_dialog_new ();
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->save_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->save_button,
GTK_CAN_DEFAULT);
gtk_widget_reparent (GTK_INPUT_DIALOG (inputd)->close_button, hbbox);
GTK_WIDGET_SET_FLAGS (GTK_INPUT_DIALOG (inputd)->close_button,
GTK_CAN_DEFAULT);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (inputd)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_grab_default (GTK_INPUT_DIALOG (inputd)->close_button);
gtk_widget_show(hbbox);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->save_button),
"clicked",
G_CALLBACK (devices_write_rc),
NULL);
NULL);
g_signal_connect (G_OBJECT (GTK_INPUT_DIALOG (inputd)->close_button),
"clicked",
G_CALLBACK (devices_close_callback),

View File

@ -129,7 +129,7 @@ gimp_dockbook_init (GimpDockbook *dockbook)
gtk_notebook_set_tab_border (GTK_NOTEBOOK (dockbook), 0);
gtk_notebook_popup_enable (GTK_NOTEBOOK (dockbook));
//gtk_notebook_set_scrollable (GTK_NOTEBOOK (dockbook), TRUE);
gtk_notebook_set_scrollable (GTK_NOTEBOOK (dockbook), TRUE);
gtk_drag_dest_set (GTK_WIDGET (dockbook),
GTK_DEST_DEFAULT_ALL,

View File

@ -241,7 +241,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->raise_button);
gimp_help_set_help_data (view->raise_button, _("Raise \n"
gimp_help_set_help_data (view->raise_button, _("Raise\n"
"<Shift> To Top"), NULL);
g_signal_connect (G_OBJECT (view->raise_button), "clicked",
@ -262,7 +262,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->lower_button);
gimp_help_set_help_data (view->lower_button, _("Lower \n"
gimp_help_set_help_data (view->lower_button, _("Lower\n"
"<Shift> To Bottom"), NULL);
g_signal_connect (G_OBJECT (view->lower_button), "clicked",

View File

@ -241,7 +241,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->raise_button);
gimp_help_set_help_data (view->raise_button, _("Raise \n"
gimp_help_set_help_data (view->raise_button, _("Raise\n"
"<Shift> To Top"), NULL);
g_signal_connect (G_OBJECT (view->raise_button), "clicked",
@ -262,7 +262,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->lower_button);
gimp_help_set_help_data (view->lower_button, _("Lower \n"
gimp_help_set_help_data (view->lower_button, _("Lower\n"
"<Shift> To Bottom"), NULL);
g_signal_connect (G_OBJECT (view->lower_button), "clicked",

View File

@ -126,11 +126,13 @@ static GimpItemFactoryEntry toolbox_entries[] =
BRANCH (N_("/_File")),
{ { N_("/File/New..."), "<control>N",
file_new_cmd_callback, 0 },
file_new_cmd_callback, 0,
"<StockItem>", GTK_STOCK_NEW },
NULL,
"file/dialogs/file_new.html", NULL },
{ { N_("/File/Open..."), "<control>O",
file_open_cmd_callback, 0 },
file_open_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN },
NULL,
"file/dialogs/file_open.html", NULL },
@ -143,7 +145,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
SEPARATOR ("/File/---"),
{ { N_("/File/Preferences..."), NULL,
dialogs_create_toplevel_cmd_callback, 0 },
dialogs_create_toplevel_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PREFERENCES },
"gimp:preferences-dialog",
"file/dialogs/preferences/preferences.html", NULL },
@ -250,7 +253,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
SEPARATOR ("/File/---MRU"),
{ { N_("/File/Quit"), "<control>Q",
file_quit_cmd_callback, 0 },
file_quit_cmd_callback, 0,
"<StockItem>", GTK_STOCK_QUIT },
NULL,
"file/quit.html", NULL },
@ -270,7 +274,8 @@ static GimpItemFactoryEntry toolbox_entries[] =
BRANCH (N_("/_Help")),
{ { N_("/Help/Help..."), "F1",
help_help_cmd_callback, 0 },
help_help_cmd_callback, 0,
"<StockItem>", GTK_STOCK_HELP },
NULL,
"help/dialogs/help.html", NULL },
{ { N_("/Help/Context Help..."), "<shift>F1",
@ -316,38 +321,46 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/File */
{ { N_("/File/New..."), "<control>N",
file_new_cmd_callback, 1 },
file_new_cmd_callback, 1,
"<StockItem>", GTK_STOCK_NEW },
NULL,
"file/dialogs/file_new.html", NULL },
{ { N_("/File/Open..."), "<control>O",
file_open_cmd_callback, 0 },
file_open_cmd_callback, 0,
"<StockItem>", GTK_STOCK_OPEN },
NULL,
"file/dialogs/file_open.html", NULL },
{ { N_("/File/Save"), "<control>S",
file_save_cmd_callback, 0 },
file_save_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Save as..."), NULL,
file_save_as_cmd_callback, 0 },
file_save_as_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE_AS },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Save a Copy as..."), NULL,
file_save_a_copy_as_cmd_callback, 0 },
file_save_a_copy_as_cmd_callback, 0,
"<StockItem>", GTK_STOCK_SAVE_AS },
NULL,
"file/dialogs/file_save.html", NULL },
{ { N_("/File/Revert..."), NULL,
file_revert_cmd_callback, 0 },
file_revert_cmd_callback, 0,
"<StockItem>", GTK_STOCK_REVERT_TO_SAVED },
NULL,
"file/revert.html", NULL },
SEPARATOR ("/File/---"),
{ { N_( "/File/Close"), "<control>W",
file_close_cmd_callback, 0 },
file_close_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CLOSE },
NULL,
"file/close.html", NULL },
{ { N_("/File/Quit"), "<control>Q",
file_quit_cmd_callback, 0 },
file_quit_cmd_callback, 0,
"<StockItem>", GTK_STOCK_QUIT },
NULL,
"file/quit.html", NULL },
@ -356,56 +369,67 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Edit */
{ { N_("/Edit/Undo"), "<control>Z",
edit_undo_cmd_callback, 0 },
edit_undo_cmd_callback, 0,
"<StockItem>", GTK_STOCK_UNDO },
NULL,
"edit/undo.html", NULL },
{ { N_("/Edit/Redo"), "<control>R",
edit_redo_cmd_callback, 0 },
edit_redo_cmd_callback, 0,
"<StockItem>", GTK_STOCK_REDO },
NULL,
"edit/redo.html", NULL },
SEPARATOR ("/Edit/---"),
{ { N_("/Edit/Cut"), "<control>X",
edit_cut_cmd_callback, 0 },
edit_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
NULL,
"edit/cut.html", NULL },
{ { N_("/Edit/Copy"), "<control>C",
edit_copy_cmd_callback, 0 },
edit_copy_cmd_callback, 0,
"<StockItem>", GTK_STOCK_COPY },
NULL,
"edit/copy.html", NULL },
{ { N_("/Edit/Paste"), "<control>V",
edit_paste_cmd_callback, 0 },
edit_paste_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste.html", NULL },
{ { N_("/Edit/Paste Into"), NULL,
edit_paste_into_cmd_callback, 0 },
edit_paste_into_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste_into.html", NULL },
{ { N_("/Edit/Paste as New"), NULL,
edit_paste_as_new_cmd_callback, 0 },
edit_paste_as_new_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/paste_as_new.html", NULL },
/* <Image>/Edit/Buffer */
{ { N_("/Edit/Buffer/Cut Named..."), "<control><shift>X",
edit_named_cut_cmd_callback, 0 },
edit_named_cut_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CUT },
NULL,
"edit/dialogs/cut_named.html", NULL },
{ { N_("/Edit/Buffer/Copy Named..."), "<control><shift>C",
edit_named_copy_cmd_callback, 0 },
edit_named_copy_cmd_callback, 0,
"<StockItem>", GTK_STOCK_COPY },
NULL,
"edit/dialogs/copy_named.html", NULL },
{ { N_("/Edit/Buffer/Paste Named..."), "<control><shift>V",
edit_named_paste_cmd_callback, 0 },
edit_named_paste_cmd_callback, 0,
"<StockItem>", GTK_STOCK_PASTE },
NULL,
"edit/dialogs/paste_named.html", NULL },
SEPARATOR ("/Edit/---"),
{ { N_("/Edit/Clear"), "<control>K",
edit_clear_cmd_callback, 0 },
edit_clear_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CLEAR },
NULL,
"edit/clear.html", NULL },
{ { N_("/Edit/Fill with FG Color"), "<control>comma",
@ -474,10 +498,14 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/View */
{ { N_("/View/Zoom In"), "equal", view_zoomin_cmd_callback, 0 },
{ { N_("/View/Zoom In"), "equal",
view_zoomin_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_IN },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom Out"), "minus", view_zoomout_cmd_callback, 0 },
{ { N_("/View/Zoom Out"), "minus",
view_zoomout_cmd_callback, 0,
"<StockItem>", GTK_STOCK_ZOOM_OUT },
NULL,
"view/zoom.html", NULL },
@ -495,7 +523,9 @@ static GimpItemFactoryEntry image_entries[] =
{ { N_("/View/Zoom/2:1"), NULL, view_zoom_cmd_callback, 201 },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom/1:1"), "1", view_zoom_cmd_callback, 101 },
{ { N_("/View/Zoom/1:1"), "1",
view_zoom_cmd_callback, 101,
"<StockItem>", GTK_STOCK_ZOOM_100 },
NULL,
"view/zoom.html", NULL },
{ { N_("/View/Zoom/1:2"), NULL, view_zoom_cmd_callback, 102 },
@ -564,15 +594,18 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Image/Mode */
{ { N_("/Image/Mode/RGB"), "<alt>R",
image_convert_rgb_cmd_callback, 0 },
image_convert_rgb_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/convert_to_rgb.html", NULL },
{ { N_("/Image/Mode/Grayscale"), "<alt>G",
image_convert_grayscale_cmd_callback, 0 },
image_convert_grayscale_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/convert_to_grayscale.html", NULL },
{ { N_("/Image/Mode/Indexed..."), "<alt>I",
image_convert_indexed_cmd_callback, 0 },
image_convert_indexed_cmd_callback, 0,
"<StockItem>", GTK_STOCK_CONVERT },
NULL,
"image/mode/dialogs/convert_to_indexed.html", NULL },
@ -660,19 +693,23 @@ static GimpItemFactoryEntry image_entries[] =
NULL,
"layers/stack/stack.html#next_layer", NULL },
{ { N_("/Layers/Stack/Raise Layer"), "<shift>Prior",
layers_raise_cmd_callback, 0 },
layers_raise_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RAISE },
NULL,
"layers/stack/stack.html#raise_layer", NULL },
{ { N_("/Layers/Stack/Lower Layer"), "<shift>Next",
layers_lower_cmd_callback, 0 },
layers_lower_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LOWER },
NULL,
"layers/stack/stack.html#lower_layer", NULL },
{ { N_("/Layers/Stack/Layer to Top"), "<control>Prior",
layers_raise_to_top_cmd_callback, 0 },
layers_raise_to_top_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_RAISE },
NULL,
"layers/stack/stack.html#layer_to_top", NULL },
{ { N_("/Layers/Stack/Layer to Bottom"), "<control>Next",
layers_lower_to_bottom_cmd_callback, 0 },
layers_lower_to_bottom_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_LOWER },
NULL,
"layers/stack/stack.html#layer_to_bottom", NULL },
@ -813,11 +850,13 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Filters */
{ { N_("/Filters/Repeat Last"), "<alt>F",
filters_repeat_cmd_callback, (guint) FALSE },
filters_repeat_cmd_callback, (guint) FALSE,
"<StockItem>", GTK_STOCK_EXECUTE },
NULL,
"filters/repeat_last.html", NULL },
{ { N_("/Filters/Re-Show Last"), "<alt><shift>F",
filters_repeat_cmd_callback, (guint) TRUE },
filters_repeat_cmd_callback, (guint) TRUE,
"<StockItem>", GTK_STOCK_EXECUTE },
NULL,
"filters/reshow_last.html", NULL },
@ -2081,7 +2120,8 @@ menus_init_mru (void)
last_opened_entries[i].entry.callback = file_last_opened_cmd_callback;
last_opened_entries[i].entry.callback_action = i;
last_opened_entries[i].entry.item_type = NULL;
last_opened_entries[i].entry.item_type = "<StockItem>";
last_opened_entries[i].entry.extra_data = GTK_STOCK_OPEN;
last_opened_entries[i].quark_string = NULL;
last_opened_entries[i].help_page = "file/last_opened.html";
last_opened_entries[i].description = NULL;

View File

@ -241,7 +241,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->raise_button);
gimp_help_set_help_data (view->raise_button, _("Raise \n"
gimp_help_set_help_data (view->raise_button, _("Raise\n"
"<Shift> To Top"), NULL);
g_signal_connect (G_OBJECT (view->raise_button), "clicked",
@ -262,7 +262,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->lower_button);
gimp_help_set_help_data (view->lower_button, _("Lower \n"
gimp_help_set_help_data (view->lower_button, _("Lower\n"
"<Shift> To Bottom"), NULL);
g_signal_connect (G_OBJECT (view->lower_button), "clicked",

View File

@ -241,7 +241,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->raise_button);
gimp_help_set_help_data (view->raise_button, _("Raise \n"
gimp_help_set_help_data (view->raise_button, _("Raise\n"
"<Shift> To Top"), NULL);
g_signal_connect (G_OBJECT (view->raise_button), "clicked",
@ -262,7 +262,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
TRUE, TRUE, 0);
gtk_widget_show (view->lower_button);
gimp_help_set_help_data (view->lower_button, _("Lower \n"
gimp_help_set_help_data (view->lower_button, _("Lower\n"
"<Shift> To Bottom"), NULL);
g_signal_connect (G_OBJECT (view->lower_button), "clicked",

View File

@ -101,7 +101,7 @@ tool_options_dialog_create (void)
GTK_WIN_POS_NONE,
FALSE, TRUE, TRUE,
_("Reset"), tool_options_dialog_reset_callback,
GIMP_STOCK_RESET, tool_options_dialog_reset_callback,
NULL, NULL, &options_reset_button, FALSE, FALSE,
GTK_STOCK_CLOSE, tool_options_dialog_close_callback,

View File

@ -20,6 +20,8 @@
#include "gimp.h"
#include "gimpui.h"
#include "libgimpwidgets/gimpwidgets.h"
/**
* gimp_ui_init:
* @prog_name: The name of the plug-in which will be passed as argv[0] to
@ -79,5 +81,7 @@ gimp_ui_init (const gchar *prog_name,
if (preview)
gtk_preview_set_gamma (gimp_gamma ());
gimp_stock_init ();
initialized = TRUE;
}

View File

@ -54,6 +54,8 @@ libgimpwidgets_1_3_la_SOURCES = @STRIP_BEGIN@ \
gimpquerybox.h \
gimpsizeentry.c \
gimpsizeentry.h \
gimpstock.c \
gimpstock.h \
gimpunitmenu.c \
gimpunitmenu.h \
@STRIP_END@
@ -73,6 +75,7 @@ libgimpwidgetsinclude_HEADERS = @STRIP_BEGIN@ \
gimppixmap.h \
gimpquerybox.h \
gimpsizeentry.h \
gimpstock.h \
gimpunitmenu.h \
@STRIP_END@

View File

@ -107,8 +107,6 @@ create_query_box (const gchar *title,
gpointer callback_data)
{
QueryBox *query_box;
GtkWidget *qbox;
GtkWidget *vbox = NULL;
GtkWidget *label;
/* make sure the object / signal passed are valid
@ -118,19 +116,19 @@ create_query_box (const gchar *title,
query_box = g_new (QueryBox, 1);
qbox = gimp_dialog_new (title, "query_box",
help_func, help_data,
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
query_box->qbox = gimp_dialog_new (title, "query_box",
help_func, help_data,
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
ok_button, ok_callback,
query_box, NULL, NULL, TRUE, FALSE,
cancel_button, cancel_callback,
query_box, NULL, NULL, FALSE, TRUE,
ok_button, ok_callback,
query_box, NULL, NULL, TRUE, FALSE,
cancel_button, cancel_callback,
query_box, NULL, NULL, FALSE, TRUE,
NULL);
NULL);
g_signal_connect (G_OBJECT (qbox), "destroy",
g_signal_connect (G_OBJECT (query_box->qbox), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&query_box->qbox);
@ -153,18 +151,17 @@ create_query_box (const gchar *title,
if (message)
{
vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (qbox)->vbox), vbox);
gtk_widget_show (vbox);
query_box->vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (query_box->vbox), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (query_box->qbox)->vbox),
query_box->vbox);
gtk_widget_show (query_box->vbox);
label = gtk_label_new (message);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (query_box->vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
}
query_box->qbox = qbox;
query_box->vbox = vbox;
query_box->entry = NULL;
query_box->object = object;
query_box->callback = callback;

151
libgimpwidgets/gimpstock.c Normal file
View File

@ -0,0 +1,151 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpstock.c
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* 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, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include <gtk/gtkiconfactory.h>
#include "gimpstock.h"
#include "pixmaps/gimp-stock-pixbufs.h"
#include "libgimp/libgimp-intl.h"
static GtkIconFactory *gimp_stock_factory = NULL;
static GtkIconSet *
sized_icon_set_from_inline (const guchar *inline_data,
GtkIconSize size)
{
GtkIconSource *source;
GtkIconSet *set;
GdkPixbuf *pixbuf;
source = gtk_icon_source_new ();
gtk_icon_source_set_size (source, size);
gtk_icon_source_set_size_wildcarded (source, FALSE);
pixbuf = gdk_pixbuf_new_from_stream (-1, inline_data, FALSE, NULL);
g_assert (pixbuf);
gtk_icon_source_set_pixbuf (source, pixbuf);
gdk_pixbuf_unref (pixbuf);
set = gtk_icon_set_new ();
gtk_icon_set_add_source (set, source);
gtk_icon_source_free (source);
return set;
}
static void
add_sized (GtkIconFactory *factory,
const guchar *inline_data,
GtkIconSize size,
const gchar *stock_id)
{
GtkIconSet *set;
set = sized_icon_set_from_inline (inline_data, size);
gtk_icon_factory_add (factory, stock_id, set);
gtk_icon_set_unref (set);
}
static GtkStockItem gimp_stock_items[] =
{
{ GIMP_STOCK_ANCHOR, N_("Anchor"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_DELETE, N_("_Delete"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_DUPLICATE, N_("Duplicate"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_EDIT, N_("Edit"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_LOWER, N_("Lower"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_NEW, N_("New"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_PASTE, N_("Paste"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_PASTE_AS_NEW, N_("Paste as New"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_PASTE_INTO, N_("Paste Into"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_RAISE, N_("Raise"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_REFRESH, N_("Refresh"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_RESET, N_("_Reset"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_TO_PATH, N_("Selection To Path"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_TO_SELECTION, N_("To Sleection"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_ZOOM_IN, N_("Zoom In"), 0, 0, "gimp-libgimp" },
{ GIMP_STOCK_ZOOM_OUT, N_("Zoom Out"), 0, 0, "gimp-libgimp" }
};
void
gimp_stock_init (void)
{
static gboolean initialized = FALSE;
if (initialized)
return;
gimp_stock_factory = gtk_icon_factory_new ();
add_sized (gimp_stock_factory, stock_anchor_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_ANCHOR);
add_sized (gimp_stock_factory, stock_delete_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_DELETE);
add_sized (gimp_stock_factory, stock_duplicate_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_DUPLICATE);
add_sized (gimp_stock_factory, stock_edit_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_EDIT);
add_sized (gimp_stock_factory, stock_lower_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_LOWER);
add_sized (gimp_stock_factory, stock_new_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_NEW);
add_sized (gimp_stock_factory, stock_paste_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_PASTE);
add_sized (gimp_stock_factory, stock_paste_as_new_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_PASTE_AS_NEW);
add_sized (gimp_stock_factory, stock_paste_into_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_PASTE_INTO);
add_sized (gimp_stock_factory, stock_raise_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_RAISE);
add_sized (gimp_stock_factory, stock_refresh_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_REFRESH);
add_sized (gimp_stock_factory, stock_refresh_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_RESET);
add_sized (gimp_stock_factory, stock_to_path_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_TO_PATH);
add_sized (gimp_stock_factory, stock_to_selection_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_TO_SELECTION);
add_sized (gimp_stock_factory, stock_zoom_in_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_ZOOM_IN);
add_sized (gimp_stock_factory, stock_zoom_out_button,
GTK_ICON_SIZE_BUTTON, GIMP_STOCK_ZOOM_OUT);
gtk_icon_factory_add_default (gimp_stock_factory);
gtk_stock_add_static (gimp_stock_items, G_N_ELEMENTS (gimp_stock_items));
initialized = TRUE;
}

View File

@ -0,0 +1,58 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpstock.h
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* 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
* Lesser 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, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_STOCK_H__
#define __GIMP_STOCK_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
#define GIMP_STOCK_ANCHOR "gimp-anchor"
#define GIMP_STOCK_DELETE "gimp-delete"
#define GIMP_STOCK_DUPLICATE "gimp-duplicate"
#define GIMP_STOCK_EDIT "gimp-edit"
#define GIMP_STOCK_LOWER "gimp-lower"
#define GIMP_STOCK_NEW "gimp-new"
#define GIMP_STOCK_PASTE "gimp-paste"
#define GIMP_STOCK_PASTE_AS_NEW "gimp-paste-as-new"
#define GIMP_STOCK_PASTE_INTO "gimp-paste-into"
#define GIMP_STOCK_RAISE "gimp-raise"
#define GIMP_STOCK_REFRESH "gimp-refresh"
#define GIMP_STOCK_RESET "gimp-reset"
#define GIMP_STOCK_TO_PATH "gimp-to-path"
#define GIMP_STOCK_TO_SELECTION "gimp-to-selection"
#define GIMP_STOCK_ZOOM_IN "gimp-zoom-in"
#define GIMP_STOCK_ZOOM_OUT "gimp-zoom-out"
void gimp_stock_init (void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_STOCK_H__ */

View File

@ -38,6 +38,7 @@
#include <libgimpwidgets/gimppixmap.h>
#include <libgimpwidgets/gimpquerybox.h>
#include <libgimpwidgets/gimpsizeentry.h>
#include <libgimpwidgets/gimpstock.h>
#include <libgimpwidgets/gimpunitmenu.h>

View File

@ -1,3 +1,5 @@
Makefile
Makefile.in
.xvpics
.thumbnails
gimp-stock-pixbufs.h

View File

@ -1,12 +1,44 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = \
STOCK_IMAGES = @STRIP_BEGIN@ \
anchor.xpm \
chain.xpm \
default.xpm \
delete.xpm \
duplicate.xpm \
edit.xpm \
lower.xpm \
new.xpm \
paste.xpm \
paste-as-new.xpm \
paste-into.xpm \
raise.xpm \
refresh.xpm \
topath.xpm \
toselection.xpm \
zoom_in.xpm \
zoom_out.xpm \
@STRIP_END@
STOCK_VARIABLES = @STRIP_BEGIN@ \
stock_anchor_button $(srcdir)/anchor.xpm \
stock_delete_button $(srcdir)/delete.xpm \
stock_duplicate_button $(srcdir)/duplicate.xpm \
stock_edit_button $(srcdir)/edit.xpm \
stock_lower_button $(srcdir)/lower.xpm \
stock_new_button $(srcdir)/new.xpm \
stock_paste_button $(srcdir)/paste.xpm \
stock_paste_as_new_button $(srcdir)/paste-as-new.xpm \
stock_paste_into_button $(srcdir)/paste-into.xpm \
stock_raise_button $(srcdir)/raise.xpm \
stock_refresh_button $(srcdir)/refresh.xpm \
stock_to_path_button $(srcdir)/topath.xpm \
stock_to_selection_button $(srcdir)/toselection.xpm \
stock_zoom_in_button $(srcdir)/zoom_in.xpm \
stock_zoom_out_button $(srcdir)/zoom_out.xpm \
@STRIP_END@
EXTRA_IMAGES = @STRIP_BEGIN@ \
chain.xpm \
default.xpm \
eek.xpm \
eye.xpm \
first.xpm \
@ -14,15 +46,9 @@ EXTRA_DIST = \
last.xpm \
linked.xpm \
locked.xbm \
lower.xpm \
navbutton.xpm \
next.xpm \
new.xpm \
no.xpm \
paste.xpm \
paste-as-new.xpm \
paste-into.xpm \
raise.xpm \
path.xbm \
penadd.xpm \
pendel.xpm \
@ -34,17 +60,21 @@ EXTRA_DIST = \
qmasksel.xpm \
qmasknosel.xpm \
question.xpm \
refresh.xpm \
swap.xpm \
topath.xpm \
toselection.xpm \
update.xpm \
wilber.xpm \
wilber2.xpm \
wilber3.xpm \
yes.xpm \
zoom_in.xpm \
zoom_out.xpm
yes.xpm \
@STRIP_END@
EXTRA_DIST = $(STOCK_IMAGES) $(EXTRA_IMAGES)
noinst_DATA = gimp-stock-pixbufs.h
CLEANFILES += $(noinst_DATA)
gimp-stock-pixbufs.h: $(STOCK_IMAGES)
gdk-pixbuf-csource --raw --build-list $(STOCK_VARIABLES) >$(srcdir)/gimp-stock-pixbufs.h
.PHONY: files

View File

@ -525,7 +525,7 @@ unit_editor_dialog (void)
GTK_WIN_POS_MOUSE,
FALSE, TRUE, TRUE,
_("Refresh"), refresh_callback,
GIMP_STOCK_REFRESH, refresh_callback,
NULL, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CLOSE, gtk_widget_destroy,
NULL, 1, NULL, TRUE, TRUE,