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.
This commit is contained in:
Michael Natterer 2009-09-25 14:09:24 +02:00
parent 4f60240a04
commit 7f064f694e
2 changed files with 3 additions and 20 deletions

View File

@ -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;
@ -656,22 +652,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)
{

View File

@ -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;