default the fill_type to GIMP_BACKGROUND_FILL (as in gimp_initialize()).

2003-03-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-new.c (gimp_image_new_values_new): default
	the fill_type to GIMP_BACKGROUND_FILL (as in gimp_initialize()).

	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c: made more dialogs transient for their
	parent window.

	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpimageeditor.c
	* app/widgets/gimpundoeditor.c: simplified a little bit.
This commit is contained in:
Sven Neumann 2003-03-20 14:34:16 +00:00 committed by Sven Neumann
parent 166078e101
commit af06615498
12 changed files with 45 additions and 27 deletions

View File

@ -1,3 +1,16 @@
2003-03-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-new.c (gimp_image_new_values_new): default
the fill_type to GIMP_BACKGROUND_FILL (as in gimp_initialize()).
* app/gui/file-commands.c
* app/gui/file-new-dialog.c: made more dialogs transient for their
parent window.
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpimageeditor.c
* app/widgets/gimpundoeditor.c: simplified a little bit.
2003-03-20 Sven Neumann <sven@gimp.org> 2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as * libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as

2
NEWS
View File

@ -16,7 +16,7 @@ Overview of Changes in GIMP 1.3.13
- Added a full-screen mode for the image window [Sven, Mitch] - Added a full-screen mode for the image window [Sven, Mitch]
- Added a simple config file writer to GimpConfig [Sven] - Added a simple config file writer to GimpConfig [Sven]
- Moved gimp-perl into it's own CVS module [Yosh] - Moved gimp-perl into it's own CVS module [Yosh]
- Started to migrate core dialogs from GtkList to GtkTreeView [Mitch] - Migrated all core dialogs from GtkList to GtkTreeView [Mitch]
- Refactored the GimpDisplayShell update/draw code [Mitch, Sven] - Refactored the GimpDisplayShell update/draw code [Mitch, Sven]
- Rewrote the Undo History as a GimpDockable [Mitch] - Rewrote the Undo History as a GimpDockable [Mitch]
- Lots of bug fixes - Lots of bug fixes

View File

@ -296,8 +296,8 @@ file_revert_cmd_callback (GtkWidget *widget,
text = g_strdup_printf (_("Revert '%s' to\n" text = g_strdup_printf (_("Revert '%s' to\n"
"'%s'?\n\n" "'%s'?\n\n"
"(You will lose all your changes,\n" "You will lose all your changes, "
"including all undo information)"), "including all undo information."),
basename, uri); basename, uri);
g_free (basename); g_free (basename);
@ -318,6 +318,9 @@ file_revert_cmd_callback (GtkWidget *widget,
g_object_set_data (G_OBJECT (gdisp->gimage), REVERT_DATA_KEY, g_object_set_data (G_OBJECT (gdisp->gimage), REVERT_DATA_KEY,
query_box); query_box);
gtk_window_set_transient_for (GTK_WINDOW (query_box),
GTK_WINDOW (gdisp->shell));
gtk_widget_show (query_box); gtk_widget_show (query_box);
} }
} }

View File

@ -60,6 +60,8 @@ gimp_image_new_values_new (Gimp *gimp,
if (values->type == GIMP_INDEXED) if (values->type == GIMP_INDEXED)
values->type = GIMP_RGB; /* no indexed images */ values->type = GIMP_RGB; /* no indexed images */
values->fill_type = GIMP_BACKGROUND_FILL;
} }
else else
{ {

View File

@ -345,9 +345,9 @@ file_save_overwrite (GtkWidget *save_dialog,
gtk_window_set_transient_for (GTK_WINDOW (query_box), gtk_window_set_transient_for (GTK_WINDOW (query_box),
GTK_WINDOW (save_dialog)); GTK_WINDOW (save_dialog));
gtk_widget_show (query_box);
gtk_widget_set_sensitive (save_dialog, FALSE); gtk_widget_set_sensitive (save_dialog, FALSE);
gtk_widget_show (query_box);
} }
static void static void

View File

@ -539,8 +539,6 @@ file_new_confirm_dialog (NewImageInfo *info)
gchar *max_size; gchar *max_size;
gchar *text; gchar *text;
gtk_widget_set_sensitive (info->dialog, FALSE);
size = gimp_image_new_get_memsize_string (info->size); size = gimp_image_new_get_memsize_string (info->size);
max_size = gimp_image_new_get_memsize_string (GIMP_GUI_CONFIG (info->gimp->config)->max_new_image_size); max_size = gimp_image_new_get_memsize_string (GIMP_GUI_CONFIG (info->gimp->config)->max_new_image_size);
@ -572,6 +570,11 @@ file_new_confirm_dialog (NewImageInfo *info)
g_free (max_size); g_free (max_size);
g_free (size); g_free (size);
gtk_window_set_transient_for (GTK_WINDOW (info->confirm_dialog),
GTK_WINDOW (info->dialog));
gtk_widget_set_sensitive (info->dialog, FALSE);
gtk_widget_show (info->confirm_dialog); gtk_widget_show (info->confirm_dialog);
} }

View File

@ -296,8 +296,8 @@ file_revert_cmd_callback (GtkWidget *widget,
text = g_strdup_printf (_("Revert '%s' to\n" text = g_strdup_printf (_("Revert '%s' to\n"
"'%s'?\n\n" "'%s'?\n\n"
"(You will lose all your changes,\n" "You will lose all your changes, "
"including all undo information)"), "including all undo information."),
basename, uri); basename, uri);
g_free (basename); g_free (basename);
@ -318,6 +318,9 @@ file_revert_cmd_callback (GtkWidget *widget,
g_object_set_data (G_OBJECT (gdisp->gimage), REVERT_DATA_KEY, g_object_set_data (G_OBJECT (gdisp->gimage), REVERT_DATA_KEY,
query_box); query_box);
gtk_window_set_transient_for (GTK_WINDOW (query_box),
GTK_WINDOW (gdisp->shell));
gtk_widget_show (query_box); gtk_widget_show (query_box);
} }
} }

View File

@ -539,8 +539,6 @@ file_new_confirm_dialog (NewImageInfo *info)
gchar *max_size; gchar *max_size;
gchar *text; gchar *text;
gtk_widget_set_sensitive (info->dialog, FALSE);
size = gimp_image_new_get_memsize_string (info->size); size = gimp_image_new_get_memsize_string (info->size);
max_size = gimp_image_new_get_memsize_string (GIMP_GUI_CONFIG (info->gimp->config)->max_new_image_size); max_size = gimp_image_new_get_memsize_string (GIMP_GUI_CONFIG (info->gimp->config)->max_new_image_size);
@ -572,6 +570,11 @@ file_new_confirm_dialog (NewImageInfo *info)
g_free (max_size); g_free (max_size);
g_free (size); g_free (size);
gtk_window_set_transient_for (GTK_WINDOW (info->confirm_dialog),
GTK_WINDOW (info->dialog));
gtk_widget_set_sensitive (info->dialog, FALSE);
gtk_widget_show (info->confirm_dialog); gtk_widget_show (info->confirm_dialog);
} }

View File

@ -345,9 +345,9 @@ file_save_overwrite (GtkWidget *save_dialog,
gtk_window_set_transient_for (GTK_WINDOW (query_box), gtk_window_set_transient_for (GTK_WINDOW (query_box),
GTK_WINDOW (save_dialog)); GTK_WINDOW (save_dialog));
gtk_widget_show (query_box);
gtk_widget_set_sensitive (save_dialog, FALSE); gtk_widget_set_sensitive (save_dialog, FALSE);
gtk_widget_show (query_box);
} }
static void static void

View File

@ -165,8 +165,7 @@ gimp_container_tree_view_init (GimpContainerTreeView *tree_view)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tree_view->scrolled_win), gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tree_view->scrolled_win),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC); GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (tree_view), tree_view->scrolled_win, gtk_container_add (GTK_CONTAINER (tree_view), tree_view->scrolled_win);
TRUE, TRUE, 0);
gtk_widget_show (tree_view->scrolled_win); gtk_widget_show (tree_view->scrolled_win);
GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW
@ -194,6 +193,7 @@ gimp_container_tree_view_constructor (GType type,
tree_view->view = tree_view->view =
GTK_TREE_VIEW (gtk_tree_view_new_with_model (tree_view->model)); GTK_TREE_VIEW (gtk_tree_view_new_with_model (tree_view->model));
g_object_unref (list); g_object_unref (list);
gtk_tree_view_set_headers_visible (tree_view->view, FALSE); gtk_tree_view_set_headers_visible (tree_view->view, FALSE);
gtk_container_add (GTK_CONTAINER (tree_view->scrolled_win), gtk_container_add (GTK_CONTAINER (tree_view->scrolled_win),
GTK_WIDGET (tree_view->view)); GTK_WIDGET (tree_view->view));

View File

@ -106,16 +106,9 @@ static void
gimp_image_editor_real_set_image (GimpImageEditor *editor, gimp_image_editor_real_set_image (GimpImageEditor *editor,
GimpImage *gimage) GimpImage *gimage)
{ {
if (! editor->gimage && gimage)
{
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
}
else if (editor->gimage && ! gimage)
{
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
}
editor->gimage = gimage; editor->gimage = gimage;
gtk_widget_set_sensitive (GTK_WIDGET (editor), gimage != NULL);
} }

View File

@ -110,7 +110,7 @@ gimp_undo_editor_init (GimpUndoEditor *undo_editor)
NULL, NULL,
GIMP_PREVIEW_SIZE_MEDIUM, GIMP_PREVIEW_SIZE_MEDIUM,
FALSE, 3, 3); FALSE, 3, 3);
gtk_box_pack_start (GTK_BOX (undo_editor), undo_editor->view, TRUE, TRUE, 0); gtk_container_add (GTK_CONTAINER (undo_editor), undo_editor->view);
gtk_widget_show (undo_editor->view); gtk_widget_show (undo_editor->view);
g_signal_connect (undo_editor->view, "select_item", g_signal_connect (undo_editor->view, "select_item",
@ -132,8 +132,6 @@ gimp_undo_editor_init (GimpUndoEditor *undo_editor)
G_CALLBACK (gimp_undo_editor_redo_clicked), G_CALLBACK (gimp_undo_editor_redo_clicked),
NULL, NULL,
undo_editor); undo_editor);
gtk_widget_set_sensitive (GTK_WIDGET (undo_editor), FALSE);
} }
static void static void