Commit efd9a3e1 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added "wm_name", "wm_class", "display_name" and "monitor_number" to the

2003-11-07  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class",
	"display_name" and "monitor_number" to the GPConfig message.
	Increased protocol version number.

	* libgimp/gimp.[ch] (gimp_config): read them from the GPConfig
	message and remember them.
	Added public accessors for the new config values.

	* libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to
	gtk_init() and export the display/screen to use to the
	environment.

	* app/core/gimp.[ch]: added vtable entries to get the values
	from the GUI.

	* app/gui/gui-vtable.c: implement the vtable entries.

	* app/plug-in/plug-in-run.c: fill in the GPConfig values using
	the new Gimp vtable functions.

	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/gui/about-dialog.c
	* app/gui/channels-commands.c
	* app/gui/color-notebook.c
	* app/gui/convert-dialog.c
	* app/gui/file-dialog-utils.[ch]
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor-commands.c
	* app/gui/gradients-commands.c
	* app/gui/grid-dialog.c
	* app/gui/image-commands.c
	* app/gui/info-dialog.[ch]
	* app/gui/info-window.c
	* app/gui/layers-commands.c
	* app/gui/module-browser.c
	* app/gui/offset-dialog.c
	* app/gui/palette-import-dialog.c
	* app/gui/qmask-commands.c
	* app/gui/resize-dialog.c
	* app/gui/splash.c
	* app/gui/stroke-dialog.c
	* app/gui/templates-commands.c
	* app/gui/tips-dialog.c
	* app/gui/vectors-commands.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c
	* app/widgets/gimpdock.c
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimptexteditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpviewabledialog.[ch]
	* libgimpwidgets/gimpfileselection.c
	* libgimpwidgets/gimpquerybox.c
	* libgimpwidgets/gimpunitmenu.c
	* plug-ins/helpbrowser/dialog.c
	* plug-ins/ifscompose/ifscompose.c: replaced all calls to
	gtk_window_set_wmclass() by gtk_window_set_role() and all
	"const gchar *wmclass_name" parameters by "const gchar *role".
	Cleaned up the window role strings.
parent b2b2841e
2003-11-07 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class",
"display_name" and "monitor_number" to the GPConfig message.
Increased protocol version number.
* libgimp/gimp.[ch] (gimp_config): read them from the GPConfig
message and remember them.
Added public accessors for the new config values.
* libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to
gtk_init() and export the display/screen to use to the
environment.
* app/core/gimp.[ch]: added vtable entries to get the values
from the GUI.
* app/gui/gui-vtable.c: implement the vtable entries.
* app/plug-in/plug-in-run.c: fill in the GPConfig values using
the new Gimp vtable functions.
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell.c
* app/gui/about-dialog.c
* app/gui/channels-commands.c
* app/gui/color-notebook.c
* app/gui/convert-dialog.c
* app/gui/file-dialog-utils.[ch]
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradient-editor-commands.c
* app/gui/gradients-commands.c
* app/gui/grid-dialog.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/info-window.c
* app/gui/layers-commands.c
* app/gui/module-browser.c
* app/gui/offset-dialog.c
* app/gui/palette-import-dialog.c
* app/gui/qmask-commands.c
* app/gui/resize-dialog.c
* app/gui/splash.c
* app/gui/stroke-dialog.c
* app/gui/templates-commands.c
* app/gui/tips-dialog.c
* app/gui/vectors-commands.c
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c
* app/widgets/gimpdock.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimptexteditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimpviewabledialog.[ch]
* libgimpwidgets/gimpfileselection.c
* libgimpwidgets/gimpquerybox.c
* libgimpwidgets/gimpunitmenu.c
* plug-ins/helpbrowser/dialog.c
* plug-ins/ifscompose/ifscompose.c: replaced all calls to
gtk_window_set_wmclass() by gtk_window_set_role() and all
"const gchar *wmclass_name" parameters by "const gchar *role".
Cleaned up the window role strings.
2003-11-07 Michael Natterer <mitch@gimp.org>
* libgimp/gimpexport.c: beautified and cleaned up the export
......@@ -342,7 +342,7 @@ channels_new_channel_query (GimpImage *gimage,
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("New Channel"), "new_channel_options",
_("New Channel"), "gimp-channel-new",
GIMP_STOCK_CHANNEL,
_("New Channel Options"),
gimp_standard_help_func,
......@@ -503,7 +503,7 @@ channels_edit_channel_query (GimpChannel *channel)
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (channel),
_("Channel Attributes"), "edit_channel_attributes",
_("Channel Attributes"), "gimp-channel-edit",
GIMP_STOCK_EDIT,
_("Edit Channel Attributes"),
gimp_standard_help_func,
......
......@@ -524,7 +524,7 @@ gradient_editor_replicate_cmd_callback (GtkWidget *widget,
dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (GIMP_DATA_EDITOR (editor)->data),
title, "gradient_segment_replicate",
title, "gimp-gradient-segment-replicate",
GIMP_STOCK_TOOL_BLEND, desc,
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_REPLICATE,
......@@ -629,7 +629,7 @@ gradient_editor_split_uniformly_cmd_callback (GtkWidget *widget,
dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (GIMP_DATA_EDITOR (editor)->data),
title, "gradient_segment_split_uniformly",
title, "gimp-gradient-segment_split-uniformly",
GIMP_STOCK_TOOL_BLEND, desc,
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_SPLIT_UNIFORM,
......
......@@ -78,7 +78,7 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
g_free (title);
gtk_window_set_wmclass (GTK_WINDOW (filesel), "save_gradient", "Gimp");
gtk_window_set_role (GTK_WINDOW (filesel), "gimp-gradient-save-pov");
gtk_window_set_position (GTK_WINDOW (filesel), GTK_WIN_POS_MOUSE);
gtk_container_set_border_width (GTK_CONTAINER (filesel), 2);
......@@ -100,7 +100,7 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
g_signal_connect_object (filesel, "destroy",
G_CALLBACK (g_object_unref),
gradient,
gradient,
G_CONNECT_SWAPPED);
gimp_help_connect (GTK_WIDGET (filesel), gimp_standard_help_func,
......
......@@ -380,7 +380,7 @@ image_layers_merge_query (GimpImage *gimage,
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("Merge Layers"), "layers_merge_options",
_("Merge Layers"), "gimp-image-merge-layers",
GIMP_STOCK_MERGE_DOWN,
_("Layers Merge Options"),
gimp_standard_help_func,
......
......@@ -665,7 +665,7 @@ layers_new_layer_query (GimpImage *gimage,
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("New Layer"), "new_layer_options",
_("New Layer"), "gimp-layer-new",
GIMP_STOCK_LAYER,
_("Create a New Layer"),
gimp_standard_help_func,
......@@ -845,8 +845,7 @@ layers_edit_layer_query (GimpLayer *layer)
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (layer),
_("Layer Attributes"),
"edit_layer_attributes",
_("Layer Attributes"), "gimp-layer-edit",
GIMP_STOCK_EDIT,
_("Edit Layer Attributes"),
gimp_standard_help_func,
......@@ -956,7 +955,7 @@ layers_add_mask_query (GimpLayer *layer)
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (layer),
_("Add Layer Mask"), "add_mask_options",
_("Add Layer Mask"), "gimp-layer-add-mask",
GTK_STOCK_ADD,
_("Add a Mask to the Layer"),
gimp_standard_help_func,
......
......@@ -146,7 +146,7 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("Qmask Attributes"), "edit_qmask_attributes",
_("Qmask Attributes"), "gimp-qmask-edit",
GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"),
gimp_standard_help_func,
......
......@@ -146,7 +146,7 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("Qmask Attributes"), "edit_qmask_attributes",
_("Qmask Attributes"), "gimp-qmask-edit",
GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"),
gimp_standard_help_func,
......
......@@ -123,7 +123,7 @@ templates_new_template_dialog (Gimp *gimp,
GtkWidget *editor;
dialog = gimp_viewable_dialog_new (NULL,
_("New Template"), "new_template",
_("New Template"), "gimp-template-new",
GIMP_STOCK_TEMPLATE,
_("Create a New Template"),
gimp_standard_help_func,
......@@ -194,7 +194,7 @@ templates_edit_template_dialog (Gimp *gimp,
GtkWidget *editor;
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (template),
_("Edit Template"), "edit_template",
_("Edit Template"), "gimp-template-edit",
GIMP_STOCK_EDIT,
_("Edit Template"),
gimp_standard_help_func,
......
......@@ -32,6 +32,7 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-merge.h"
#include "core/gimptoolinfo.h"
#include "pdb/procedural_db.h"
......@@ -448,7 +449,7 @@ vectors_new_vectors_query (GimpImage *gimage,
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("New Path"), "new_path_options",
_("New Path"), "gimp-vectors-new",
GIMP_STOCK_TOOL_PATH,
_("New Path Options"),
gimp_standard_help_func,
......@@ -564,7 +565,7 @@ vectors_edit_vectors_query (GimpVectors *vectors)
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (vectors),
_("Path Attributes"), "edit_path_attributes",
_("Path Attributes"), "gimp-vectors-edit",
GIMP_STOCK_EDIT,
_("Edit Path Attributes"),
gimp_standard_help_func,
......@@ -666,7 +667,7 @@ vectors_import_query (GimpImage *gimage)
g_object_weak_ref (G_OBJECT (gimage),
(GWeakNotify) gtk_widget_destroy, filesel);
gtk_window_set_wmclass (GTK_WINDOW (filesel), "gimp-vectors-import", "Gimp");
gtk_window_set_role (GTK_WINDOW (filesel), "gimp-vectors-import");
gtk_window_set_position (GTK_WINDOW (filesel), GTK_WIN_POS_MOUSE);
gtk_container_set_border_width (GTK_CONTAINER (filesel), 2);
......@@ -728,7 +729,7 @@ vectors_export_query (GimpImage *gimage,
g_object_weak_ref (G_OBJECT (gimage),
(GWeakNotify) gtk_widget_destroy, filesel);
gtk_window_set_wmclass (GTK_WINDOW (filesel), "gimp-vectors-export", "Gimp");
gtk_window_set_role (GTK_WINDOW (filesel), "gimp-vectors-export");
gtk_window_set_position (GTK_WINDOW (filesel), GTK_WIN_POS_MOUSE);
gtk_container_set_border_width (GTK_CONTAINER (filesel), 2);
......
......@@ -1137,6 +1137,33 @@ gimp_pdb_dialogs_check (Gimp *gimp)
gimp->gui_pdb_dialogs_check_func (gimp);
}
const gchar *
gimp_get_program_class (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
if (gimp->gui_get_program_class_func)
return gimp->gui_get_program_class_func (gimp);
return NULL;
}
gchar *
gimp_get_display_name (Gimp *gimp,
gint gdisp_ID,
gint *monitor_number)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (monitor_number != NULL, NULL);
if (gimp->gui_get_display_name_func)
return gimp->gui_get_display_name_func (gimp, gdisp_ID, monitor_number);
*monitor_number = 0;
return NULL;
}
GimpImage *
gimp_create_image (Gimp *gimp,
gint width,
......
......@@ -57,6 +57,10 @@ typedef void (* GimpProgressUpdateFunc) (Gimp *gimp,
typedef void (* GimpProgressEndFunc) (Gimp *gimp,
GimpProgress *progress);
typedef void (* GimpPDBDialogsCheckFunc) (Gimp *gimp);
typedef const gchar * (* GimpGetProgramClassFunc) (Gimp *gimp);
typedef gchar * (* GimpGetDisplayNameFunc) (Gimp *gimp,
gint gdisp_ID,
gint *monitor_number);
#define GIMP_TYPE_GIMP (gimp_get_type ())
......@@ -100,6 +104,8 @@ struct _Gimp
GimpProgressUpdateFunc gui_progress_update_func;
GimpProgressEndFunc gui_progress_end_func;
GimpPDBDialogsCheckFunc gui_pdb_dialogs_check_func;
GimpGetProgramClassFunc gui_get_program_class_func;
GimpGetDisplayNameFunc gui_get_display_name_func;
gint busy;
guint busy_idle_id;
......@@ -257,6 +263,10 @@ void gimp_update_progress (Gimp *gimp,
void gimp_end_progress (Gimp *gimp,
GimpProgress *progress);
void gimp_pdb_dialogs_check (Gimp *gimp);
const gchar * gimp_get_program_class (Gimp *gimp);
gchar * gimp_get_display_name (Gimp *gimp,
gint gdisp_ID,
gint *monitor_number);
GimpImage * gimp_create_image (Gimp *gimp,
gint width,
......
......@@ -202,8 +202,8 @@ static gint cur_scroll_text = 0;
static gint cur_scroll_index = 0;
static gint shuffle_array[G_N_ELEMENTS (authors)];
static gchar *drop_text[] =
{
static gchar *drop_text[] =
{
"We are The GIMP." ,
"Prepare to be manipulated.",
"Resistance is futile."
......@@ -235,8 +235,7 @@ about_dialog_create (void)
about_dialog = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_type_hint (GTK_WINDOW (about_dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_wmclass (GTK_WINDOW (about_dialog),
"about_dialog", "Gimp");
gtk_window_set_role (GTK_WINDOW (about_dialog), "gimp-about");
gtk_window_set_title (GTK_WINDOW (about_dialog), _("About The GIMP"));
gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_resizable (GTK_WINDOW (about_dialog), FALSE);
......@@ -256,13 +255,13 @@ about_dialog_create (void)
g_signal_connect (about_dialog, "key_press_event",
G_CALLBACK (about_dialog_key),
NULL);
/* dnd stuff */
gtk_drag_dest_set (about_dialog,
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
NULL, 0,
GDK_ACTION_COPY);
GDK_ACTION_COPY);
gimp_dnd_viewable_dest_add (about_dialog,
GIMP_TYPE_TOOL_INFO,
about_dialog_tool_drop, NULL);
......@@ -323,7 +322,7 @@ about_dialog_create (void)
gtk_widget_show (aboutframe);
scroll_layout = gtk_widget_create_pango_layout (aboutframe, NULL);
g_object_weak_ref (G_OBJECT (aboutframe),
g_object_weak_ref (G_OBJECT (aboutframe),
(GWeakNotify) g_object_unref, scroll_layout);
max_width = 0;
......@@ -375,17 +374,17 @@ about_dialog_create (void)
{
GRand *gr = g_rand_new ();
for (i = 0; i < nscroll_texts; i++)
for (i = 0; i < nscroll_texts; i++)
{
shuffle_array[i] = i;
}
for (i = 0; i < nscroll_texts; i++)
for (i = 0; i < nscroll_texts; i++)
{
gint j;
j = g_rand_int_range (gr, 0, nscroll_texts);
if (i != j)
if (i != j)
{
gint t;
......@@ -395,8 +394,8 @@ about_dialog_create (void)
}
}
cur_scroll_text = g_rand_int_range (gr, 0, nscroll_texts);
pango_layout_set_text (scroll_layout,
cur_scroll_text = g_rand_int_range (gr, 0, nscroll_texts);
pango_layout_set_text (scroll_layout,
scroll_text[cur_scroll_text], -1);
g_rand_free (gr);
......@@ -512,7 +511,7 @@ about_dialog_logo_expose (GtkWidget *widget,
gdk_draw_drawable (widget->window,
widget->style->black_gc,
logo_pixmap,
logo_pixmap,
event->area.x, event->area.y,
event->area.x, event->area.y,
event->area.width, event->area.height);
......@@ -545,10 +544,10 @@ about_dialog_key (GtkWidget *widget,
gpointer data)
{
gint i;
if (hadja_state == 7)
return FALSE;
switch (event->keyval)
{
case GDK_h:
......@@ -587,22 +586,22 @@ about_dialog_key (GtkWidget *widget,
{
scroll_text = hadja_text;
nscroll_texts = G_N_ELEMENTS (hadja_text);
for (i = 0; i < nscroll_texts; i++)
{
shuffle_array[i] = i;
pango_layout_set_text (scroll_layout, scroll_text[i], -1);
pango_layout_get_pixel_size (scroll_layout,
pango_layout_get_pixel_size (scroll_layout,
&scroll_text_widths[i], NULL);
}
scroll_state = 0;
cur_scroll_index = 0;
cur_scroll_text = 0;
offset = 0;
pango_layout_set_text (scroll_layout, scroll_text[cur_scroll_text], -1);
}
return FALSE;
}
......@@ -674,7 +673,7 @@ about_dialog_tool_drop (GtkWidget *widget,
{
shuffle_array[i] = i;
pango_layout_set_text (scroll_layout, scroll_text[i], -1);
pango_layout_get_pixel_size (scroll_layout,
pango_layout_get_pixel_size (scroll_layout,
&scroll_text_widths[i], NULL);
}
......@@ -757,7 +756,7 @@ about_dialog_timer (gpointer data)
cur_scroll_index = 0;
cur_scroll_text = shuffle_array[cur_scroll_index];
pango_layout_set_text (scroll_layout,
pango_layout_set_text (scroll_layout,
scroll_text[cur_scroll_text], -1);
offset = 0;
}
......
......@@ -84,7 +84,7 @@ struct _ColorNotebook
static ColorNotebook *
color_notebook_new_internal (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *role,
const gchar *stock_id,
const gchar *desc,
GimpDialogFactory *dialog_factory,
......@@ -151,7 +151,7 @@ color_notebook_new (const gchar *title,
{
return color_notebook_new_internal (NULL,
title,
"color_selection",
"gimp-color-selection",
NULL,
NULL,
dialog_factory,
......@@ -176,7 +176,7 @@ color_notebook_viewable_new (GimpViewable *viewable,
{
return color_notebook_new_internal (viewable,
title,
"color_selection",
"gimp-color-selection",
stock_id,
desc,
dialog_factory,
......
......@@ -128,7 +128,7 @@ convert_to_indexed (GimpImage *gimage)
dialog->shell =
gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("Indexed Color Conversion"),
"indexed_color_conversion",
"gimp-image-convert-indexed",
GIMP_STOCK_CONVERT_INDEXED,
_("Convert Image to Indexed Colors"),
gimp_standard_help_func,
......
......@@ -47,7 +47,7 @@ file_dialog_new (Gimp *gimp,
GimpMenuFactory *menu_factory,
const gchar *menu_identifier,
const gchar *title,
const gchar *wmclass_name,
const gchar *role,
const gchar *help_id,
GCallback ok_callback)
{
......@@ -60,7 +60,7 @@ file_dialog_new (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
g_return_val_if_fail (menu_identifier != NULL, NULL);
g_return_val_if_fail (title != NULL, NULL);
g_return_val_if_fail (wmclass_name != NULL, NULL);
g_return_val_if_fail (role != NULL, NULL);
g_return_val_if_fail (help_id != NULL, NULL);
g_return_val_if_fail (ok_callback != NULL, NULL);
......@@ -71,7 +71,7 @@ file_dialog_new (Gimp *gimp,
g_object_set_data (G_OBJECT (filesel), "gimp", gimp);
gtk_window_set_position (GTK_WINDOW (filesel), GTK_WIN_POS_MOUSE);
gtk_window_set_wmclass (GTK_WINDOW (filesel), wmclass_name, "Gimp");
gtk_window_set_role (GTK_WINDOW (filesel), role);
gimp_help_connect (filesel, gimp_standard_help_func, help_id, NULL);
......
......@@ -26,7 +26,7 @@ GtkWidget * file_dialog_new (Gimp *gimp,
GimpMenuFactory *menu_factory,
const gchar *menu_identifier,
const gchar *title,
const gchar *wmclass_name,
const gchar *role,
const gchar *help_id,
GCallback ok_callback);
......
......@@ -181,7 +181,7 @@ file_open_dialog_create (Gimp *gimp,
global_dialog_factory,
"gimp-file-open-dialog",
menu_factory, "<Load>",
_("Open Image"), "open_image",
_("Open Image"), "gimp-file-open",
GIMP_HELP_FILE_OPEN,
G_CALLBACK (file_open_ok_callback));
......@@ -202,7 +202,7 @@ file_open_dialog_create (Gimp *gimp,
GtkWidget *progress;
GtkStyle *style;
gchar *str;
/* Catch file-list clicks so we can update the preview thumbnail */
g_signal_connect (tree_sel, "changed",
G_CALLBACK (file_open_selchanged_callback),
......@@ -220,7 +220,7 @@ file_open_dialog_create (Gimp *gimp,
&style->base[GTK_STATE_NORMAL]);
gtk_widget_modify_bg (ebox, GTK_STATE_INSENSITIVE,
&style->base[GTK_STATE_NORMAL]);
gtk_container_add (GTK_CONTAINER (open_options_frame), ebox);
gtk_widget_show (ebox);
......@@ -240,16 +240,16 @@ file_open_dialog_create (Gimp *gimp,
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (ebox), vbox);
gtk_widget_show (vbox);
button = gtk_button_new ();
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
label = gtk_label_new_with_mnemonic (_("_Preview"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_container_add (GTK_CONTAINER (button), label);
gtk_widget_show (label);
g_signal_connect (button, "button_press_event",
G_CALLBACK (gtk_true),
NULL);
......@@ -262,22 +262,22 @@ file_open_dialog_create (Gimp *gimp,
g_signal_connect (button, "leave_notify_event",
G_CALLBACK (gtk_true),
NULL);
vbox2 = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 2);
gtk_container_add (GTK_CONTAINER (vbox), vbox2);
gtk_widget_show (vbox2);
hbox = gtk_hbox_new (TRUE, 0);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
open_options_imagefile = gimp_imagefile_new (gimp, NULL);
open_options_preview =
gimp_preview_new (GIMP_VIEWABLE (open_options_imagefile),
gimp->config->thumbnail_size, 0, FALSE);
gtk_widget_ensure_style (open_options_preview);
style = gtk_widget_get_style (open_options_preview);
gtk_widget_modify_bg (open_options_preview, GTK_STATE_NORMAL,
......@@ -309,11 +309,11 @@ file_open_dialog_create (Gimp *gimp,
/* eek */
{
GtkRequisition requisition;
gtk_widget_size_request (label, &requisition);
gtk_widget_set_size_request (label, -1, requisition.height);
}
g_signal_connect (open_options_imagefile, "info_changed",
G_CALLBACK (file_open_imagefile_info_changed),
label);
......@@ -329,17 +329,17 @@ file_open_dialog_create (Gimp *gimp,
gtk_widget_set_sensitive (GTK_WIDGET (open_options_frame), FALSE);
/* The progress bar */
progress = gtk_progress_bar_new ();
gtk_box_pack_end (GTK_BOX (vbox2), progress, FALSE, FALSE, 0);
/* don't gtk_widget_show (progress); */
open_options_progress = GTK_PROGRESS_BAR (progress);
/* eek */
{
GtkRequisition requisition;
gtk_progress_bar_set_text (open_options_progress, "foo");
gtk_widget_size_request (progress, &requisition);
gtk_widget_set_size_request (open_options_title, requisition.width, -1);
......@@ -643,7 +643,7 @@ file_open_ok_callback (GtkWidget *widget,
file_open_dialog_open_image (open_dialog,
gimp,
uri,
entered_filename,
entered_filename,
load_file_proc);
g_free (uri);
......@@ -669,7 +669,7 @@ file_open_ok_callback (GtkWidget *widget,
}
g_strfreev (selections);
gtk_widget_set_sensitive (open_dialog, TRUE);
}
......@@ -686,7 +686,7 @@ file_open_dialog_open_image (GtkWidget *open_dialog,
gimage = file_open_with_proc_and_display (gimp,
uri,
entered_filename,
entered_filename,
load_proc,
&status,
&error);
......
......@@ -204,7 +204,7 @@ file_save_dialog_create (Gimp *gimp,
global_dialog_factory,
"gimp-file-save-dialog",
menu_factory, "<Save>",
_("Save Image"), "save_image",
_("Save Image"), "gimp-file-save",
GIMP_HELP_FILE_SAVE,
G_CALLBACK (file_save_ok_callback));
}
......
......@@ -77,7 +77,7 @@ grid_dialog_new (GimpImage *gimage)
grid_backup = gimp_config_duplicate (GIMP_CONFIG (grid));
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("Configure Grid"), "configure_grid",
_("Configure Grid"), "gimp-grid-configure",
GIMP_STOCK_GRID, _("Configure Image Grid"),
gimp_standard_help_func,
GIMP_HELP_IMAGE_GRID,
......
......@@ -98,7 +98,7 @@ file_new_dialog_new (Gimp *gimp)
dialog->dialog =
gimp_viewable_dialog_new (NULL,
_("New Image"), "new_image",
_("New Image"), "gimp-image-new",
GIMP_STOCK_IMAGE,
_("Create a New Image"),
gimp_standard_help_func,
......
......@@ -40,7 +40,7 @@
static InfoDialog * info_dialog_new_extended (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *role,
const gchar *stock_id,
const gchar *desc,
GimpHelpFunc help_func,
......@@ -62,13 +62,13 @@ static void info_dialog_update_field (InfoField *info_field);
InfoDialog *
info_dialog_new (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *role,
const gchar *stock_id,
const gchar *desc,
GimpHelpFunc help_func,
gpointer help_data)
{
return info_dialog_new_extended (viewable, title, wmclass_name,
return info_dialog_new_extended (viewable, title, role,
stock_id, desc,
help_func, help_data, FALSE);
}
......@@ -76,13 +76,13 @@ info_dialog_new (GimpViewable *viewable,
InfoDialog *
info_dialog_notebook_new (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,