themes/Default/images/Makefile.am

2002-01-09  Sven Neumann  <sven@gimp.org>

	* themes/Default/images/Makefile.am
	* themes/Default/images/gimp-dialog-error.png
	* themes/Default/images/gimp-dialog-info.png
	* themes/Default/images/gimp-dialog-question.png
	* themes/Default/images/gimp-dialog-warning.png: new stock icons to
	override the standard gtk-dialog icons.

	* themes/Default/images/gimp-dialog-icons.xcf.gz: XCF version of the
	new dialog icons.

	* themes/Default/gtkrc: override the standard gtk-dialog icons with
	our versions.

	* libgimpwidgets/gimpquerybox.[ch]: allow to pass a stock_id instead
	of the boolean eek.

	* app/widgets/gimpwidgets-utils.c: added an icon to the gimp_message
	dialog. We need to add an API to declare the severity of the message
	or allow to pass a stock_id. For now all messages habe the Info icon.

	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/gui.c
	* app/gui/image-commands.c
	* plug-ins/FractalExplorer/FractalExplorer.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c: pass a suitable(?) stock_id to
	gimp_query_boolean_box().
This commit is contained in:
Sven Neumann 2002-01-09 20:39:49 +00:00 committed by Sven Neumann
parent 23561dc0a0
commit 448f4b4db6
23 changed files with 110 additions and 37 deletions

View File

@ -1,3 +1,35 @@
2002-01-09 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/gimp-dialog-error.png
* themes/Default/images/gimp-dialog-info.png
* themes/Default/images/gimp-dialog-question.png
* themes/Default/images/gimp-dialog-warning.png: new stock icons to
override the standard gtk-dialog icons.
* themes/Default/images/gimp-dialog-icons.xcf.gz: XCF version of the
new dialog icons.
* themes/Default/gtkrc: override the standard gtk-dialog icons with
our versions.
* libgimpwidgets/gimpquerybox.[ch]: allow to pass a stock_id instead
of the boolean eek.
* app/widgets/gimpwidgets-utils.c: added an icon to the gimp_message
dialog. We need to add an API to declare the severity of the message
or allow to pass a stock_id. For now all messages habe the Info icon.
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gui.c
* app/gui/image-commands.c
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c: pass a suitable(?) stock_id to
gimp_query_boolean_box().
2002-01-08 Michael Natterer <mitch@gimp-org> 2002-01-08 Michael Natterer <mitch@gimp-org>
* plug-ins/common/tga.c * plug-ins/common/tga.c

View File

@ -252,7 +252,7 @@ file_revert_cmd_callback (GtkWidget *widget,
query_box = gimp_query_boolean_box (_("Revert Image"), query_box = gimp_query_boolean_box (_("Revert Image"),
gimp_standard_help_func, gimp_standard_help_func,
"file/revert.html", "file/revert.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
text, text,
GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_YES, GTK_STOCK_NO,
G_OBJECT (gdisp->gimage), G_OBJECT (gdisp->gimage),

View File

@ -259,7 +259,7 @@ image_scale_callback (GtkWidget *widget,
gimp_query_boolean_box (_("Layer Too Small"), gimp_query_boolean_box (_("Layer Too Small"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/scale_layer_warn.html", "dialogs/scale_layer_warn.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
_("The chosen image size will shrink\n" _("The chosen image size will shrink\n"
"some layers completely away.\n" "some layers completely away.\n"
"Is this what you want?"), "Is this what you want?"),

View File

@ -425,7 +425,7 @@ file_overwrite (const gchar *filename,
query_box = gimp_query_boolean_box (_("File Exists!"), query_box = gimp_query_boolean_box (_("File Exists!"),
gimp_standard_help_func, gimp_standard_help_func,
"save/file_exists.html", "save/file_exists.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
overwrite_text, overwrite_text,
GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_YES, GTK_STOCK_NO,
NULL, NULL, NULL, NULL,

View File

@ -594,7 +594,7 @@ file_new_confirm_dialog (NewImageInfo *info)
gimp_query_boolean_box (_("Confirm Image Size"), gimp_query_boolean_box (_("Confirm Image Size"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/file_new.html#confirm_size", "dialogs/file_new.html#confirm_size",
FALSE, GTK_STOCK_DIALOG_INFO,
text, text,
GTK_STOCK_OK, GTK_STOCK_CANCEL, GTK_STOCK_OK, GTK_STOCK_CANCEL,
NULL, NULL, NULL, NULL,

View File

@ -252,7 +252,7 @@ file_revert_cmd_callback (GtkWidget *widget,
query_box = gimp_query_boolean_box (_("Revert Image"), query_box = gimp_query_boolean_box (_("Revert Image"),
gimp_standard_help_func, gimp_standard_help_func,
"file/revert.html", "file/revert.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
text, text,
GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_YES, GTK_STOCK_NO,
G_OBJECT (gdisp->gimage), G_OBJECT (gdisp->gimage),

View File

@ -594,7 +594,7 @@ file_new_confirm_dialog (NewImageInfo *info)
gimp_query_boolean_box (_("Confirm Image Size"), gimp_query_boolean_box (_("Confirm Image Size"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/file_new.html#confirm_size", "dialogs/file_new.html#confirm_size",
FALSE, GTK_STOCK_DIALOG_INFO,
text, text,
GTK_STOCK_OK, GTK_STOCK_CANCEL, GTK_STOCK_OK, GTK_STOCK_CANCEL,
NULL, NULL, NULL, NULL,

View File

@ -425,7 +425,7 @@ file_overwrite (const gchar *filename,
query_box = gimp_query_boolean_box (_("File Exists!"), query_box = gimp_query_boolean_box (_("File Exists!"),
gimp_standard_help_func, gimp_standard_help_func,
"save/file_exists.html", "save/file_exists.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
overwrite_text, overwrite_text,
GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_YES, GTK_STOCK_NO,
NULL, NULL, NULL, NULL,

View File

@ -378,7 +378,7 @@ gui_really_quit_dialog (GCallback quit_func)
dialog = gimp_query_boolean_box (_("Quit The GIMP?"), dialog = gimp_query_boolean_box (_("Quit The GIMP?"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/really_quit.html", "dialogs/really_quit.html",
TRUE, GTK_STOCK_DIALOG_WARNING,
_("Some files are unsaved.\n" _("Some files are unsaved.\n"
"\nReally quit The GIMP?"), "\nReally quit The GIMP?"),
GTK_STOCK_QUIT, GTK_STOCK_CANCEL, GTK_STOCK_QUIT, GTK_STOCK_CANCEL,

View File

@ -259,7 +259,7 @@ image_scale_callback (GtkWidget *widget,
gimp_query_boolean_box (_("Layer Too Small"), gimp_query_boolean_box (_("Layer Too Small"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/scale_layer_warn.html", "dialogs/scale_layer_warn.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
_("The chosen image size will shrink\n" _("The chosen image size will shrink\n"
"some layers completely away.\n" "some layers completely away.\n"
"Is this what you want?"), "Is this what you want?"),

View File

@ -67,9 +67,11 @@ gimp_message_box (const gchar *message,
{ {
MessageBox *msg_box; MessageBox *msg_box;
GtkWidget *mbox; GtkWidget *mbox;
GtkWidget *vbox; GtkWidget *hbox;
GtkWidget *image;
GtkWidget *label; GtkWidget *label;
GList *list; GList *list;
const gchar *stock_id = GTK_STOCK_DIALOG_INFO;
if (!message) if (!message)
return; return;
@ -118,6 +120,7 @@ gimp_message_box (const gchar *message,
message = _("WARNING:\n" message = _("WARNING:\n"
"Too many open message dialogs.\n" "Too many open message dialogs.\n"
"Messages are redirected to stderr."); "Messages are redirected to stderr.");
stock_id = GTK_STOCK_DIALOG_WARNING;
} }
msg_box = g_new0 (MessageBox, 1); msg_box = g_new0 (MessageBox, 1);
@ -132,14 +135,17 @@ gimp_message_box (const gchar *message,
NULL); NULL);
vbox = gtk_vbox_new (FALSE, 0); hbox = gtk_hbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (mbox)->vbox), vbox); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (mbox)->vbox), hbox);
gtk_widget_show (vbox); gtk_widget_show (hbox);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
label = gtk_label_new (message); label = gtk_label_new (message);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
gtk_widget_show (label); gtk_widget_show (label);
msg_box->mbox = mbox; msg_box->mbox = mbox;

View File

@ -36,8 +36,6 @@
#include "libgimp/libgimp-intl.h" #include "libgimp/libgimp-intl.h"
#include "pixmaps/eek.xpm"
/* /*
* String, integer, double and size query boxes * String, integer, double and size query boxes
@ -415,8 +413,8 @@ gimp_query_size_box (const gchar *title,
* @title: The query box dialog's title. * @title: The query box dialog's title.
* @help_func: The help function to show this dialog's help page. * @help_func: The help function to show this dialog's help page.
* @help_data: A string pointing to this dialog's html help page. * @help_data: A string pointing to this dialog's html help page.
* @eek: #TRUE if you want the "Eek" wilber to appear left of * @stock_id: A stock_id to specify an icon to appear on the left
* the dialog's message. * on the dialog's message.
* @message: A string which will be shown in the query box. * @message: A string which will be shown in the query box.
* @true_button: The string to be shown in the dialog's left button. * @true_button: The string to be shown in the dialog's left button.
* @false_button: The string to be shown in the dialog's right button. * @false_button: The string to be shown in the dialog's right button.
@ -433,7 +431,7 @@ GtkWidget *
gimp_query_boolean_box (const gchar *title, gimp_query_boolean_box (const gchar *title,
GimpHelpFunc help_func, GimpHelpFunc help_func,
const gchar *help_data, const gchar *help_data,
gboolean eek, const gchar *stock_id,
const gchar *message, const gchar *message,
const gchar *true_button, const gchar *true_button,
const gchar *false_button, const gchar *false_button,
@ -444,13 +442,16 @@ gimp_query_boolean_box (const gchar *title,
{ {
QueryBox *query_box; QueryBox *query_box;
GtkWidget *hbox; GtkWidget *hbox;
GtkWidget *pixmap; GtkWidget *image = NULL;
GtkWidget *label; GtkWidget *label;
if (stock_id)
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
query_box = create_query_box (title, help_func, help_data, query_box = create_query_box (title, help_func, help_data,
G_CALLBACK (boolean_query_box_true_callback), G_CALLBACK (boolean_query_box_true_callback),
G_CALLBACK (boolean_query_box_false_callback), G_CALLBACK (boolean_query_box_false_callback),
eek ? NULL : message, image ? NULL : message,
true_button, false_button, true_button, false_button,
object, signal, object, signal,
G_CALLBACK (callback), data); G_CALLBACK (callback), data);
@ -458,7 +459,7 @@ gimp_query_boolean_box (const gchar *title,
if (! query_box) if (! query_box)
return NULL; return NULL;
if (! eek) if (! image)
return query_box->qbox; return query_box->qbox;
hbox = gtk_hbox_new (FALSE, 10); hbox = gtk_hbox_new (FALSE, 10);
@ -466,9 +467,8 @@ gimp_query_boolean_box (const gchar *title,
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (query_box->qbox)->vbox), hbox); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (query_box->qbox)->vbox), hbox);
gtk_widget_show (hbox); gtk_widget_show (hbox);
pixmap = gimp_pixmap_new (eek_xpm); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0); gtk_widget_show (image);
gtk_widget_show (pixmap);
label = gtk_label_new (message); label = gtk_label_new (message);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);

View File

@ -105,7 +105,7 @@ GtkWidget * gimp_query_size_box (const gchar *title,
GtkWidget * gimp_query_boolean_box (const gchar *title, GtkWidget * gimp_query_boolean_box (const gchar *title,
GimpHelpFunc help_func, GimpHelpFunc help_func,
const gchar *help_data, const gchar *help_data,
gboolean eek, const gchar *stock_id,
const gchar *message, const gchar *message,
const gchar *true_button, const gchar *true_button,
const gchar *false_button, const gchar *false_button,

View File

@ -742,7 +742,7 @@ delete_fractal_callback (GtkWidget *widget,
delete_dialog = gimp_query_boolean_box (_("Delete Fractal"), delete_dialog = gimp_query_boolean_box (_("Delete Fractal"),
gimp_standard_help_func, gimp_standard_help_func,
"filters/fractalexplorer.html", "filters/fractalexplorer.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
str, str,
GTK_STOCK_DELETE, GTK_STOCK_CANCEL, GTK_STOCK_DELETE, GTK_STOCK_CANCEL,
G_OBJECT (widget), "destroy", G_OBJECT (widget), "destroy",

View File

@ -4089,7 +4089,7 @@ gfig_ok_callback (GtkWidget *widget,
dialog = gimp_query_boolean_box (_("Warning"), dialog = gimp_query_boolean_box (_("Warning"),
gimp_standard_help_func, gimp_standard_help_func,
"filters/gfig.html", "filters/gfig.html",
FALSE, GTK_STOCK_DIALOG_WARNING,
message, message,
GTK_STOCK_OK, GTK_STOCK_CANCEL, GTK_STOCK_OK, GTK_STOCK_CANCEL,
NULL, NULL, NULL, NULL,

View File

@ -3450,7 +3450,7 @@ dlg_selector_delete_callback (GtkWidget *widget,
dialog = gimp_query_boolean_box (_("Delete GFlare"), dialog = gimp_query_boolean_box (_("Delete GFlare"),
gimp_standard_help_func, gimp_standard_help_func,
"filters/gflare.html", "filters/gflare.html",
FALSE, GTK_STOCK_DIALOG_QUESTION,
str, str,
GTK_STOCK_DELETE, GTK_STOCK_CANCEL, GTK_STOCK_DELETE, GTK_STOCK_CANCEL,
NULL, NULL, NULL, NULL,

View File

@ -15,6 +15,30 @@
# #
# include "imagerc" # include "imagerc"
# Do override some GTK stock icons however.
style "gimp-dialog-icons"
{
stock["gtk-dialog-error"] =
{
{ "images/gimp-dialog-error.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-info"] =
{
{ "images/gimp-dialog-info.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-question"] =
{
{ "images/gimp-dialog-question.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-warning"] =
{
{ "images/gimp-dialog-warning.png", *, *, "gtk-dialog" }
}
}
class "GtkImage" style "gimp-dialog-icons"
style "gimp-normal-font-style" style "gimp-normal-font-style"
{ {

View File

@ -4,6 +4,13 @@ SUBDIRS = tools
themedatadir = $(gimpdatadir)/themes/Default/images themedatadir = $(gimpdatadir)/themes/Default/images
DIALOG_IMAGES = @STRIP_BEGIN@ \
gimp-dialog-error.png \
gimp-dialog-info.png \
gimp-dialog-question.png \
gimp-dialog-warning.png \
@STRIP_END@
STOCK_IMAGES = @STRIP_BEGIN@ \ STOCK_IMAGES = @STRIP_BEGIN@ \
stock-button-anchor.png \ stock-button-anchor.png \
stock-button-delete.png \ stock-button-delete.png \
@ -41,6 +48,10 @@ WILBER_IMAGES = @STRIP_BEGIN@ \
stock-wilber-64x64.png \ stock-wilber-64x64.png \
@STRIP_END@ @STRIP_END@
themedata_DATA = $(STOCK_IMAGES) themedata_DATA = $(DIALOG_IMAGES)
EXTRA_DIST = $(themedata_DATA) $(WILBER_IMAGES) EXTRA_DIST = \
$(themedata_DATA) \
$(STOCK_IMAGES) \
$(WILBER_IMAGES) \
gimp-dialog-icons.xcf.gz

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB