[gimp] Bug 664584: WM DELETE event in single window mode is synonym to file-quit.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 664584: WM DELETE event in single window mode is synonym to file-quit.
- Date: Sat, 11 May 2013 19:58:29 +0000 (UTC)
commit 6008c2019bd2824a272455da59d6212fd3695533
Author: Jehan <jehan girinstud io>
Date: Sat May 11 09:04:33 2013 +0900
Bug 664584: WM DELETE event in single window mode is synonym to file-quit.
In multi-window mode, closing an image window is only meant to close
the current image (unless this is the last empty window).
In single window mode though, you are meaning to close the whole program.
Thanks to Niels Martignène for the original patch.
app/display/gimpimagewindow.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 658ca05..8868b3c 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -535,11 +535,17 @@ static gboolean
gimp_image_window_delete_event (GtkWidget *widget,
GdkEventAny *event)
{
- GimpImageWindow *window = GIMP_IMAGE_WINDOW (widget);
- GimpDisplayShell *shell = gimp_image_window_get_active_shell (window);
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (widget);
+ GimpDisplayShell *shell = gimp_image_window_get_active_shell (window);
+ GimpImageWindowPrivate *private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
+ GimpGuiConfig *config;
- /* FIXME multiple shells */
- if (shell)
+ config = GIMP_GUI_CONFIG (gimp_dialog_factory_get_context (private->dialog_factory)->gimp->config);
+
+ if (config->single_window_mode)
+ gimp_ui_manager_activate_action (gimp_image_window_get_ui_manager (window),
+ "file", "file-quit");
+ else if (shell)
gimp_display_shell_close (shell, FALSE);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]