Move dialog destruction to a utility function

This commit is contained in:
Michael Natterer 2009-07-12 16:45:18 +02:00
parent f1b14dd6b7
commit 669d26ee39
1 changed files with 13 additions and 7 deletions

View File

@ -99,6 +99,8 @@ static void gimp_image_map_tool_response (GtkWidget *widget,
gint response_id,
GimpImageMapTool *im_tool);
static void gimp_image_map_tool_dialog_destroy (GimpImageMapTool *im_tool);
static void gimp_image_map_tool_notify_preview (GObject *config,
GParamSpec *pspec,
GimpImageMapTool *im_tool);
@ -248,13 +250,7 @@ gimp_image_map_tool_finalize (GObject *object)
}
if (image_map_tool->shell)
{
gtk_widget_destroy (image_map_tool->shell);
image_map_tool->shell = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->settings_box = NULL;
image_map_tool->label_group = NULL;
}
gimp_image_map_tool_dialog_destroy (image_map_tool);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -595,6 +591,16 @@ gimp_image_map_tool_response (GtkWidget *widget,
}
}
static void
gimp_image_map_tool_dialog_destroy (GimpImageMapTool *image_map_tool)
{
gtk_widget_destroy (image_map_tool->shell);
image_map_tool->shell = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->settings_box = NULL;
image_map_tool->label_group = NULL;
}
static void
gimp_image_map_tool_notify_preview (GObject *config,
GParamSpec *pspec,