Set the current tool's gdisplay pointer to NULL when destroying a gdisplay

Mon Apr 13 00:27:45 EDP 1998 Matthew Wilson <msw@gimp.org>

	* app/gdisplay.c: Set the current tool's gdisplay pointer to NULL
	when destroying a gdisplay

	* app/interface.c: Use "clicked" as the signal to handle for menu
	based tools.  This lets us pop by_color_select back up.

--Matt
This commit is contained in:
EDP 1998 Matthew Wilson 1998-04-13 04:32:39 +00:00 committed by Matt Wilson
parent d9e0bcc917
commit 56772cb2cf
7 changed files with 41 additions and 3 deletions

View File

@ -1,3 +1,11 @@
Mon Apr 13 00:27:45 EDP 1998 Matthew Wilson <msw@gimp.org>
* app/gdisplay.c: Set the current tool's gdisplay pointer to NULL
when destroying a gdisplay
* app/interface.c: Use "clicked" as the signal to handle for menu
based tools. This lets us pop by_color_select back up.
Sun Apr 12 22:51:31 MEST 1998 Sven Neumann <sven@gimp.org>
* gimp_tips.txt: added a few more tips

View File

@ -182,12 +182,22 @@ gdisplay_format_title (GImage *gimage,
static void
gdisplay_delete (GDisplay *gdisp)
{
GDisplay *tool_gdisp;
g_hash_table_remove (display_ht, gdisp->shell);
g_hash_table_remove (display_ht, gdisp->canvas);
/* stop any active tool */
active_tool_control (HALT, (void *) gdisp);
/* clear out the pointer to this gdisp from the active tool */
if (active_tool && active_tool->gdisp_ptr) {
tool_gdisp = active_tool->gdisp_ptr;
if (gdisp->ID == tool_gdisp->ID)
active_tool->gdisp_ptr = NULL;
}
/* free the selection structure */
selection_free (gdisp->select);

View File

@ -182,12 +182,22 @@ gdisplay_format_title (GImage *gimage,
static void
gdisplay_delete (GDisplay *gdisp)
{
GDisplay *tool_gdisp;
g_hash_table_remove (display_ht, gdisp->shell);
g_hash_table_remove (display_ht, gdisp->canvas);
/* stop any active tool */
active_tool_control (HALT, (void *) gdisp);
/* clear out the pointer to this gdisp from the active tool */
if (active_tool && active_tool->gdisp_ptr) {
tool_gdisp = active_tool->gdisp_ptr;
if (gdisp->ID == tool_gdisp->ID)
active_tool->gdisp_ptr = NULL;
}
/* free the selection structure */
selection_free (gdisp->select);

View File

@ -387,7 +387,7 @@ create_tools (GtkWidget *parent)
tool_widgets[i] = button = gtk_radio_button_new (group);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_signal_connect (GTK_OBJECT (button), "toggled",
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) tools_select_update,
tool_data[i].callback_data);
}

View File

@ -387,7 +387,7 @@ create_tools (GtkWidget *parent)
tool_widgets[i] = button = gtk_radio_button_new (group);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_signal_connect (GTK_OBJECT (button), "toggled",
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) tools_select_update,
tool_data[i].callback_data);
}

View File

@ -182,12 +182,22 @@ gdisplay_format_title (GImage *gimage,
static void
gdisplay_delete (GDisplay *gdisp)
{
GDisplay *tool_gdisp;
g_hash_table_remove (display_ht, gdisp->shell);
g_hash_table_remove (display_ht, gdisp->canvas);
/* stop any active tool */
active_tool_control (HALT, (void *) gdisp);
/* clear out the pointer to this gdisp from the active tool */
if (active_tool && active_tool->gdisp_ptr) {
tool_gdisp = active_tool->gdisp_ptr;
if (gdisp->ID == tool_gdisp->ID)
active_tool->gdisp_ptr = NULL;
}
/* free the selection structure */
selection_free (gdisp->select);

View File

@ -387,7 +387,7 @@ create_tools (GtkWidget *parent)
tool_widgets[i] = button = gtk_radio_button_new (group);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_signal_connect (GTK_OBJECT (button), "toggled",
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) tools_select_update,
tool_data[i].callback_data);
}