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>
|
2003-05-23 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* docs/keybindings.txt
|
* docs/keybindings.txt
|
||||||
|
@ -352,6 +352,7 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||||||
|
|
||||||
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
||||||
|
|
||||||
|
if (dialog_factory)
|
||||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||||
cnp->shell);
|
cnp->shell);
|
||||||
|
|
||||||
|
@ -352,6 +352,7 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||||||
|
|
||||||
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
||||||
|
|
||||||
|
if (dialog_factory)
|
||||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||||
cnp->shell);
|
cnp->shell);
|
||||||
|
|
||||||
|
@ -352,6 +352,7 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||||||
|
|
||||||
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
|
||||||
|
|
||||||
|
if (dialog_factory)
|
||||||
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
gimp_dialog_factory_add_foreign (dialog_factory, dialog_identifier,
|
||||||
cnp->shell);
|
cnp->shell);
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@ struct _GimpColorPanel
|
|||||||
GimpContext *context;
|
GimpContext *context;
|
||||||
|
|
||||||
ColorNotebook *color_notebook;
|
ColorNotebook *color_notebook;
|
||||||
gboolean color_notebook_active;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -125,7 +124,6 @@ gimp_color_panel_init (GimpColorPanel *panel)
|
|||||||
{
|
{
|
||||||
panel->context = NULL;
|
panel->context = NULL;
|
||||||
panel->color_notebook = NULL;
|
panel->color_notebook = NULL;
|
||||||
panel->color_notebook_active = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -239,7 +237,7 @@ gimp_color_panel_color_changed (GimpColorButton *button)
|
|||||||
|
|
||||||
panel = GIMP_COLOR_PANEL (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);
|
gimp_color_button_get_color (GIMP_COLOR_BUTTON (button), &color);
|
||||||
color_notebook_set_color (panel->color_notebook, &color);
|
color_notebook_set_color (panel->color_notebook, &color);
|
||||||
@ -266,16 +264,10 @@ gimp_color_panel_clicked (GtkButton *button)
|
|||||||
panel,
|
panel,
|
||||||
FALSE,
|
FALSE,
|
||||||
gimp_color_button_has_alpha (GIMP_COLOR_BUTTON (button)));
|
gimp_color_button_has_alpha (GIMP_COLOR_BUTTON (button)));
|
||||||
panel->color_notebook_active = TRUE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if (! panel->color_notebook_active)
|
|
||||||
{
|
{
|
||||||
color_notebook_show (panel->color_notebook);
|
color_notebook_show (panel->color_notebook);
|
||||||
panel->color_notebook_active = TRUE;
|
|
||||||
}
|
|
||||||
color_notebook_set_color (panel->color_notebook, &color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +292,6 @@ gimp_color_panel_select_callback (ColorNotebook *notebook,
|
|||||||
/* Fallthrough */
|
/* Fallthrough */
|
||||||
case COLOR_NOTEBOOK_CANCEL:
|
case COLOR_NOTEBOOK_CANCEL:
|
||||||
color_notebook_hide (panel->color_notebook);
|
color_notebook_hide (panel->color_notebook);
|
||||||
panel->color_notebook_active = FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user