From af066154980eee61f268cb640db65a0c2b06a070 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 20 Mar 2003 14:34:16 +0000 Subject: [PATCH] default the fill_type to GIMP_BACKGROUND_FILL (as in gimp_initialize()). 2003-03-20 Sven Neumann * 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. --- ChangeLog | 13 +++++++++++++ NEWS | 2 +- app/actions/file-commands.c | 7 +++++-- app/core/gimpimage-new.c | 2 ++ app/dialogs/file-save-dialog.c | 4 ++-- app/dialogs/image-new-dialog.c | 7 +++++-- app/gui/file-commands.c | 7 +++++-- app/gui/file-new-dialog.c | 7 +++++-- app/gui/file-save-dialog.c | 4 ++-- app/widgets/gimpcontainertreeview.c | 4 ++-- app/widgets/gimpimageeditor.c | 11 ++--------- app/widgets/gimpundoeditor.c | 4 +--- 12 files changed, 45 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9566d17e38..b376617d13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2003-03-20 Sven Neumann + + * 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 * libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as diff --git a/NEWS b/NEWS index 3b89e3c8fe..1af44f2e78 100644 --- a/NEWS +++ b/NEWS @@ -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 simple config file writer to GimpConfig [Sven] - 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] - Rewrote the Undo History as a GimpDockable [Mitch] - Lots of bug fixes diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c index 548dc38d2b..bf19cf25ce 100644 --- a/app/actions/file-commands.c +++ b/app/actions/file-commands.c @@ -296,8 +296,8 @@ file_revert_cmd_callback (GtkWidget *widget, text = g_strdup_printf (_("Revert '%s' to\n" "'%s'?\n\n" - "(You will lose all your changes,\n" - "including all undo information)"), + "You will lose all your changes, " + "including all undo information."), basename, uri); g_free (basename); @@ -318,6 +318,9 @@ file_revert_cmd_callback (GtkWidget *widget, g_object_set_data (G_OBJECT (gdisp->gimage), REVERT_DATA_KEY, query_box); + gtk_window_set_transient_for (GTK_WINDOW (query_box), + GTK_WINDOW (gdisp->shell)); + gtk_widget_show (query_box); } } diff --git a/app/core/gimpimage-new.c b/app/core/gimpimage-new.c index a21a577d60..c783e696b5 100644 --- a/app/core/gimpimage-new.c +++ b/app/core/gimpimage-new.c @@ -60,6 +60,8 @@ gimp_image_new_values_new (Gimp *gimp, if (values->type == GIMP_INDEXED) values->type = GIMP_RGB; /* no indexed images */ + + values->fill_type = GIMP_BACKGROUND_FILL; } else { diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c index 866227c8ed..d385064c3d 100644 --- a/app/dialogs/file-save-dialog.c +++ b/app/dialogs/file-save-dialog.c @@ -345,9 +345,9 @@ file_save_overwrite (GtkWidget *save_dialog, gtk_window_set_transient_for (GTK_WINDOW (query_box), GTK_WINDOW (save_dialog)); - gtk_widget_show (query_box); - gtk_widget_set_sensitive (save_dialog, FALSE); + + gtk_widget_show (query_box); } static void diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index 2ae6df2d26..84f949cb72 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -539,8 +539,6 @@ file_new_confirm_dialog (NewImageInfo *info) gchar *max_size; gchar *text; - gtk_widget_set_sensitive (info->dialog, FALSE); - 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); @@ -572,6 +570,11 @@ file_new_confirm_dialog (NewImageInfo *info) g_free (max_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); } diff --git a/app/gui/file-commands.c b/app/gui/file-commands.c index 548dc38d2b..bf19cf25ce 100644 --- a/app/gui/file-commands.c +++ b/app/gui/file-commands.c @@ -296,8 +296,8 @@ file_revert_cmd_callback (GtkWidget *widget, text = g_strdup_printf (_("Revert '%s' to\n" "'%s'?\n\n" - "(You will lose all your changes,\n" - "including all undo information)"), + "You will lose all your changes, " + "including all undo information."), basename, uri); g_free (basename); @@ -318,6 +318,9 @@ file_revert_cmd_callback (GtkWidget *widget, g_object_set_data (G_OBJECT (gdisp->gimage), REVERT_DATA_KEY, query_box); + gtk_window_set_transient_for (GTK_WINDOW (query_box), + GTK_WINDOW (gdisp->shell)); + gtk_widget_show (query_box); } } diff --git a/app/gui/file-new-dialog.c b/app/gui/file-new-dialog.c index 2ae6df2d26..84f949cb72 100644 --- a/app/gui/file-new-dialog.c +++ b/app/gui/file-new-dialog.c @@ -539,8 +539,6 @@ file_new_confirm_dialog (NewImageInfo *info) gchar *max_size; gchar *text; - gtk_widget_set_sensitive (info->dialog, FALSE); - 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); @@ -572,6 +570,11 @@ file_new_confirm_dialog (NewImageInfo *info) g_free (max_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); } diff --git a/app/gui/file-save-dialog.c b/app/gui/file-save-dialog.c index 866227c8ed..d385064c3d 100644 --- a/app/gui/file-save-dialog.c +++ b/app/gui/file-save-dialog.c @@ -345,9 +345,9 @@ file_save_overwrite (GtkWidget *save_dialog, gtk_window_set_transient_for (GTK_WINDOW (query_box), GTK_WINDOW (save_dialog)); - gtk_widget_show (query_box); - gtk_widget_set_sensitive (save_dialog, FALSE); + + gtk_widget_show (query_box); } static void diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c index 06ae0dcc78..6db462b958 100644 --- a/app/widgets/gimpcontainertreeview.c +++ b/app/widgets/gimpcontainertreeview.c @@ -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_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_box_pack_start (GTK_BOX (tree_view), tree_view->scrolled_win, - TRUE, TRUE, 0); + gtk_container_add (GTK_CONTAINER (tree_view), tree_view->scrolled_win); gtk_widget_show (tree_view->scrolled_win); GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW @@ -194,6 +193,7 @@ gimp_container_tree_view_constructor (GType type, tree_view->view = GTK_TREE_VIEW (gtk_tree_view_new_with_model (tree_view->model)); g_object_unref (list); + gtk_tree_view_set_headers_visible (tree_view->view, FALSE); gtk_container_add (GTK_CONTAINER (tree_view->scrolled_win), GTK_WIDGET (tree_view->view)); diff --git a/app/widgets/gimpimageeditor.c b/app/widgets/gimpimageeditor.c index 359729d2f3..79010132a4 100644 --- a/app/widgets/gimpimageeditor.c +++ b/app/widgets/gimpimageeditor.c @@ -106,16 +106,9 @@ static void gimp_image_editor_real_set_image (GimpImageEditor *editor, 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; + + gtk_widget_set_sensitive (GTK_WIDGET (editor), gimage != NULL); } diff --git a/app/widgets/gimpundoeditor.c b/app/widgets/gimpundoeditor.c index ea17305599..a24ac046a9 100644 --- a/app/widgets/gimpundoeditor.c +++ b/app/widgets/gimpundoeditor.c @@ -110,7 +110,7 @@ gimp_undo_editor_init (GimpUndoEditor *undo_editor) NULL, GIMP_PREVIEW_SIZE_MEDIUM, 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); 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), NULL, undo_editor); - - gtk_widget_set_sensitive (GTK_WIDGET (undo_editor), FALSE); } static void