don't call gimp_dialog_factory_add_foreign() with a NULL dialog_factory.
2003-05-23 Michael Natterer <mitch@gimp.org> * app/gui/color-notebook.c (color_notebook_new_internal): don't call gimp_dialog_factory_add_foreign() with a NULL dialog_factory. * app/widgets/gimpcolorpanel.c: removed the color_notebook_active boolean state and *always* call color_notebook_show() when the user clicks the button. This way the notebook is automatically deiconified or risen.
This commit is contained in:

committed by
Michael Natterer

parent
3dffa4fbd3
commit
0fc53e0f54
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2003-05-23 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/color-notebook.c (color_notebook_new_internal): don't
|
||||
call gimp_dialog_factory_add_foreign() with a NULL dialog_factory.
|
||||
|
||||
* app/widgets/gimpcolorpanel.c: removed the color_notebook_active
|
||||
boolean state and *always* call color_notebook_show() when the
|
||||
user clicks the button. This way the notebook is automatically
|
||||
deiconified or risen.
|
||||
|
||||
2003-05-23 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* docs/keybindings.txt
|
||||
|
@ -352,8 +352,9 @@ color_notebook_new_internal (GimpViewable *viewable,
|
||||
|
||||
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
||||
|
||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||
cnp->shell);
|
||||
if (dialog_factory)
|
||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||
cnp->shell);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 4);
|
||||
|
@ -352,8 +352,9 @@ color_notebook_new_internal (GimpViewable *viewable,
|
||||
|
||||
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
||||
|
||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||
cnp->shell);
|
||||
if (dialog_factory)
|
||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||
cnp->shell);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 4);
|
||||
|
@ -352,8 +352,9 @@ color_notebook_new_internal (GimpViewable *viewable,
|
||||
|
||||
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
||||
|
||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||
cnp->shell);
|
||||
if (dialog_factory)
|
||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||
cnp->shell);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 4);
|
||||
|
@ -47,7 +47,6 @@ struct _GimpColorPanel
|
||||
GimpContext *context;
|
||||
|
||||
ColorNotebook *color_notebook;
|
||||
gboolean color_notebook_active;
|
||||
};
|
||||
|
||||
|
||||
@ -123,9 +122,8 @@ gimp_color_panel_class_init (GimpColorPanelClass *klass)
|
||||
static void
|
||||
gimp_color_panel_init (GimpColorPanel *panel)
|
||||
{
|
||||
panel->context = NULL;
|
||||
panel->color_notebook = NULL;
|
||||
panel->color_notebook_active = FALSE;
|
||||
panel->context = NULL;
|
||||
panel->color_notebook = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -239,7 +237,7 @@ gimp_color_panel_color_changed (GimpColorButton *button)
|
||||
|
||||
panel = GIMP_COLOR_PANEL (button);
|
||||
|
||||
if (panel->color_notebook_active)
|
||||
if (panel->color_notebook)
|
||||
{
|
||||
gimp_color_button_get_color (GIMP_COLOR_BUTTON (button), &color);
|
||||
color_notebook_set_color (panel->color_notebook, &color);
|
||||
@ -266,16 +264,10 @@ gimp_color_panel_clicked (GtkButton *button)
|
||||
panel,
|
||||
FALSE,
|
||||
gimp_color_button_has_alpha (GIMP_COLOR_BUTTON (button)));
|
||||
panel->color_notebook_active = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! panel->color_notebook_active)
|
||||
{
|
||||
color_notebook_show (panel->color_notebook);
|
||||
panel->color_notebook_active = TRUE;
|
||||
}
|
||||
color_notebook_set_color (panel->color_notebook, &color);
|
||||
color_notebook_show (panel->color_notebook);
|
||||
}
|
||||
}
|
||||
|
||||
@ -300,7 +292,6 @@ gimp_color_panel_select_callback (ColorNotebook *notebook,
|
||||
/* Fallthrough */
|
||||
case COLOR_NOTEBOOK_CANCEL:
|
||||
color_notebook_hide (panel->color_notebook);
|
||||
panel->color_notebook_active = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user