Commit f142aa4e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

don't set a window icon, the dialog should be transient anyway.

2005-09-07  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimperrordialog.[ch]: don't set a window icon, the
	dialog should be transient anyway.

	* app/dialogs/dialogs-constructors.c: changed accordingly.
parent 55d23211
2005-09-07 Sven Neumann <sven@gimp.org>
* app/widgets/gimperrordialog.[ch]: don't set a window icon, the
dialog should be transient anyway.
* app/dialogs/dialogs-constructors.c: changed accordingly.
2005-09-06 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): change
......
......@@ -163,7 +163,7 @@ dialogs_error_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
return gimp_error_dialog_new (_("GIMP Message"), GIMP_STOCK_WARNING);
return gimp_error_dialog_new (_("GIMP Message"));
}
GtkWidget *
......
......@@ -139,64 +139,16 @@ gimp_error_dialog_response (GtkDialog *dialog,
}
static void
gimp_error_dialog_set_icon (GtkWidget *dialog,
const gchar *stock_id)
{
GtkIconSet *icon_set;
gtk_widget_ensure_style (dialog);
icon_set = gtk_style_lookup_icon_set (dialog->style, stock_id);
if (icon_set)
{
GtkIconSize *sizes;
GList *icons = NULL;
gint i, n_sizes;
gtk_icon_set_get_sizes (icon_set, &sizes, &n_sizes);
for (i = 0; i < n_sizes; i++)
{
if (sizes[i] < GTK_ICON_SIZE_DIALOG) /* skip the large version */
icons = g_list_prepend (icons,
gtk_widget_render_icon (dialog,
stock_id, sizes[i],
NULL));
}
g_free (sizes);
if (icons)
{
gtk_window_set_icon_list (GTK_WINDOW (dialog), icons);
g_list_foreach (icons, (GFunc) g_object_unref, NULL);
g_list_free (icons);
}
}
}
/* public functions */
GtkWidget *
gimp_error_dialog_new (const gchar *title,
const gchar *stock_id)
gimp_error_dialog_new (const gchar *title)
{
GtkWidget *dialog;
g_return_val_if_fail (title != NULL, NULL);
dialog = g_object_new (GIMP_TYPE_ERROR_DIALOG,
"title", title,
NULL);
if (stock_id)
gimp_error_dialog_set_icon (dialog, stock_id);
return dialog;
return g_object_new (GIMP_TYPE_ERROR_DIALOG,
"title", title,
NULL);
}
void
......
......@@ -55,10 +55,9 @@ struct _GimpErrorDialogClass
GType gimp_error_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_error_dialog_new (const gchar *title,
const gchar *stock_id);
GtkWidget * gimp_error_dialog_new (const gchar *title);
void gimp_error_dialog_add (GimpErrorDialog *dialog,
const gchar *stock_id,
const gchar *stock_id,
const gchar *domain,
const gchar *message);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment