make it behave like the other non-toolbox tools
--Sven
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Tue Feb 8 13:12:26 CET 2000 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/by_color_select.c: made it behave like the other non-toolbox
|
||||||
|
tools, which means the dialog is popped up again if you select it
|
||||||
|
from the menu while the tool is active.
|
||||||
|
|
||||||
2000-02-08 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
|
2000-02-08 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
|
||||||
|
|
||||||
* plug-ins/common/max_rgb.c: fixed typo.
|
* plug-ins/common/max_rgb.c: fixed typo.
|
||||||
|
@ -505,13 +505,6 @@ tools_new_by_color_select (void)
|
|||||||
tools_register (BY_COLOR_SELECT, (ToolOptions *) by_color_options);
|
tools_register (BY_COLOR_SELECT, (ToolOptions *) by_color_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The "by color" dialog */
|
|
||||||
if (!by_color_dialog)
|
|
||||||
by_color_dialog = by_color_select_dialog_new ();
|
|
||||||
else
|
|
||||||
if (!GTK_WIDGET_VISIBLE (by_color_dialog->shell))
|
|
||||||
gtk_widget_show (by_color_dialog->shell);
|
|
||||||
|
|
||||||
tool = tools_new_tool (BY_COLOR_SELECT);
|
tool = tools_new_tool (BY_COLOR_SELECT);
|
||||||
private = g_new (ByColorSelect, 1);
|
private = g_new (ByColorSelect, 1);
|
||||||
|
|
||||||
@ -557,6 +550,13 @@ by_color_select_initialize_by_image (GImage *gimage)
|
|||||||
void
|
void
|
||||||
by_color_select_initialize (GDisplay *gdisp)
|
by_color_select_initialize (GDisplay *gdisp)
|
||||||
{
|
{
|
||||||
|
/* The "by color" dialog */
|
||||||
|
if (!by_color_dialog)
|
||||||
|
by_color_dialog = by_color_select_dialog_new ();
|
||||||
|
else
|
||||||
|
if (!GTK_WIDGET_VISIBLE (by_color_dialog->shell))
|
||||||
|
gtk_widget_show (by_color_dialog->shell);
|
||||||
|
|
||||||
by_color_select_initialize_by_image (gdisp->gimage);
|
by_color_select_initialize_by_image (gdisp->gimage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -688,6 +688,10 @@ by_color_select_dialog_new (void)
|
|||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
gtk_widget_show (bcd->shell);
|
gtk_widget_show (bcd->shell);
|
||||||
|
|
||||||
|
gtk_signal_connect_object (GTK_OBJECT (bcd->shell), "unmap_event",
|
||||||
|
GTK_SIGNAL_FUNC (gtk_widget_hide),
|
||||||
|
(gpointer) bcd->shell);
|
||||||
|
|
||||||
return bcd;
|
return bcd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -876,7 +880,7 @@ by_color_select_close_callback (GtkWidget *widget,
|
|||||||
ByColorDialog *bcd;
|
ByColorDialog *bcd;
|
||||||
|
|
||||||
bcd = (ByColorDialog *) data;
|
bcd = (ByColorDialog *) data;
|
||||||
|
|
||||||
if (GTK_WIDGET_VISIBLE (bcd->shell))
|
if (GTK_WIDGET_VISIBLE (bcd->shell))
|
||||||
gtk_widget_hide (bcd->shell);
|
gtk_widget_hide (bcd->shell);
|
||||||
|
|
||||||
|
@ -505,13 +505,6 @@ tools_new_by_color_select (void)
|
|||||||
tools_register (BY_COLOR_SELECT, (ToolOptions *) by_color_options);
|
tools_register (BY_COLOR_SELECT, (ToolOptions *) by_color_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The "by color" dialog */
|
|
||||||
if (!by_color_dialog)
|
|
||||||
by_color_dialog = by_color_select_dialog_new ();
|
|
||||||
else
|
|
||||||
if (!GTK_WIDGET_VISIBLE (by_color_dialog->shell))
|
|
||||||
gtk_widget_show (by_color_dialog->shell);
|
|
||||||
|
|
||||||
tool = tools_new_tool (BY_COLOR_SELECT);
|
tool = tools_new_tool (BY_COLOR_SELECT);
|
||||||
private = g_new (ByColorSelect, 1);
|
private = g_new (ByColorSelect, 1);
|
||||||
|
|
||||||
@ -557,6 +550,13 @@ by_color_select_initialize_by_image (GImage *gimage)
|
|||||||
void
|
void
|
||||||
by_color_select_initialize (GDisplay *gdisp)
|
by_color_select_initialize (GDisplay *gdisp)
|
||||||
{
|
{
|
||||||
|
/* The "by color" dialog */
|
||||||
|
if (!by_color_dialog)
|
||||||
|
by_color_dialog = by_color_select_dialog_new ();
|
||||||
|
else
|
||||||
|
if (!GTK_WIDGET_VISIBLE (by_color_dialog->shell))
|
||||||
|
gtk_widget_show (by_color_dialog->shell);
|
||||||
|
|
||||||
by_color_select_initialize_by_image (gdisp->gimage);
|
by_color_select_initialize_by_image (gdisp->gimage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -688,6 +688,10 @@ by_color_select_dialog_new (void)
|
|||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
gtk_widget_show (bcd->shell);
|
gtk_widget_show (bcd->shell);
|
||||||
|
|
||||||
|
gtk_signal_connect_object (GTK_OBJECT (bcd->shell), "unmap_event",
|
||||||
|
GTK_SIGNAL_FUNC (gtk_widget_hide),
|
||||||
|
(gpointer) bcd->shell);
|
||||||
|
|
||||||
return bcd;
|
return bcd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -876,7 +880,7 @@ by_color_select_close_callback (GtkWidget *widget,
|
|||||||
ByColorDialog *bcd;
|
ByColorDialog *bcd;
|
||||||
|
|
||||||
bcd = (ByColorDialog *) data;
|
bcd = (ByColorDialog *) data;
|
||||||
|
|
||||||
if (GTK_WIDGET_VISIBLE (bcd->shell))
|
if (GTK_WIDGET_VISIBLE (bcd->shell))
|
||||||
gtk_widget_hide (bcd->shell);
|
gtk_widget_hide (bcd->shell);
|
||||||
|
|
||||||
|
@ -505,13 +505,6 @@ tools_new_by_color_select (void)
|
|||||||
tools_register (BY_COLOR_SELECT, (ToolOptions *) by_color_options);
|
tools_register (BY_COLOR_SELECT, (ToolOptions *) by_color_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The "by color" dialog */
|
|
||||||
if (!by_color_dialog)
|
|
||||||
by_color_dialog = by_color_select_dialog_new ();
|
|
||||||
else
|
|
||||||
if (!GTK_WIDGET_VISIBLE (by_color_dialog->shell))
|
|
||||||
gtk_widget_show (by_color_dialog->shell);
|
|
||||||
|
|
||||||
tool = tools_new_tool (BY_COLOR_SELECT);
|
tool = tools_new_tool (BY_COLOR_SELECT);
|
||||||
private = g_new (ByColorSelect, 1);
|
private = g_new (ByColorSelect, 1);
|
||||||
|
|
||||||
@ -557,6 +550,13 @@ by_color_select_initialize_by_image (GImage *gimage)
|
|||||||
void
|
void
|
||||||
by_color_select_initialize (GDisplay *gdisp)
|
by_color_select_initialize (GDisplay *gdisp)
|
||||||
{
|
{
|
||||||
|
/* The "by color" dialog */
|
||||||
|
if (!by_color_dialog)
|
||||||
|
by_color_dialog = by_color_select_dialog_new ();
|
||||||
|
else
|
||||||
|
if (!GTK_WIDGET_VISIBLE (by_color_dialog->shell))
|
||||||
|
gtk_widget_show (by_color_dialog->shell);
|
||||||
|
|
||||||
by_color_select_initialize_by_image (gdisp->gimage);
|
by_color_select_initialize_by_image (gdisp->gimage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -688,6 +688,10 @@ by_color_select_dialog_new (void)
|
|||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
gtk_widget_show (bcd->shell);
|
gtk_widget_show (bcd->shell);
|
||||||
|
|
||||||
|
gtk_signal_connect_object (GTK_OBJECT (bcd->shell), "unmap_event",
|
||||||
|
GTK_SIGNAL_FUNC (gtk_widget_hide),
|
||||||
|
(gpointer) bcd->shell);
|
||||||
|
|
||||||
return bcd;
|
return bcd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -876,7 +880,7 @@ by_color_select_close_callback (GtkWidget *widget,
|
|||||||
ByColorDialog *bcd;
|
ByColorDialog *bcd;
|
||||||
|
|
||||||
bcd = (ByColorDialog *) data;
|
bcd = (ByColorDialog *) data;
|
||||||
|
|
||||||
if (GTK_WIDGET_VISIBLE (bcd->shell))
|
if (GTK_WIDGET_VISIBLE (bcd->shell))
|
||||||
gtk_widget_hide (bcd->shell);
|
gtk_widget_hide (bcd->shell);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user