Move dialog destruction to a utility function
This commit is contained in:
parent
22ea0ce3ee
commit
53bdcab4d8
1 changed files with 13 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue