[gimp] Get rid of the shell's window-state-event handler
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Get rid of the shell's window-state-event handler
- Date: Tue, 29 Sep 2009 18:39:36 +0000 (UTC)
commit 7f064f694e104d627c62fcc526ba932ec9bb90ad
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 25 14:09:24 2009 +0200
Get rid of the shell's window-state-event handler
Move the last remaining function to the window. It doesn't actually
belong there, but it's better than the handler in the wrong place.
Added FIXME as reminder.
app/display/gimpdisplayshell.c | 20 --------------------
app/display/gimpimagewindow.c | 3 +++
2 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 5b8c208..90df859 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -121,9 +121,6 @@ static void gimp_display_shell_destroy (GtkObject *object);
static void gimp_display_shell_unrealize (GtkWidget *widget);
static void gimp_display_shell_screen_changed (GtkWidget *widget,
GdkScreen *previous);
-static gboolean
- gimp_display_shell_window_state_event (GtkWidget *widget,
- GdkEventWindowState *event);
static gboolean gimp_display_shell_popup_menu (GtkWidget *widget);
static void gimp_display_shell_real_scaled (GimpDisplayShell *shell);
@@ -202,7 +199,6 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
widget_class->unrealize = gimp_display_shell_unrealize;
widget_class->screen_changed = gimp_display_shell_screen_changed;
- widget_class->window_state_event = gimp_display_shell_window_state_event;
widget_class->popup_menu = gimp_display_shell_popup_menu;
klass->scaled = gimp_display_shell_real_scaled;
@@ -657,22 +653,6 @@ gimp_display_shell_screen_changed (GtkWidget *widget,
}
static gboolean
-gimp_display_shell_window_state_event (GtkWidget *widget,
- GdkEventWindowState *event)
-{
- GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (widget);
-
- GTK_WIDGET_CLASS (parent_class)->window_state_event (widget, event);
-
- if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED)
- {
- gimp_display_shell_progress_window_state_changed (shell);
- }
-
- return FALSE;
-}
-
-static gboolean
gimp_display_shell_popup_menu (GtkWidget *widget)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (widget);
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index e3ec6d6..e8e02b1 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -36,6 +36,7 @@
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-close.h"
+#include "gimpdisplayshell-progress.h"
#include "gimpimagewindow.h"
#include "gimpstatusbar.h"
@@ -391,6 +392,8 @@ gimp_image_window_window_state_event (GtkWidget *widget,
gimp_dialog_factories_show_with_display ();
}
+ /* FIXME multiple shells */
+ gimp_display_shell_progress_window_state_changed (GIMP_DISPLAY_SHELL (display->shell));
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]