Commit e09ee5e5 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/widgets/gimpcoloreditor.c app/widgets/gimpcursorview.c

2005-06-05  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcursorview.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimphistogrameditor.c
	* app/widgets/gimppaletteeditor.c: peek at the default interface to
	get the parent interface. Unconditionally chain up in get_aux_info()
	and set_aux_info() methods.
parent 7475212d
2005-06-05 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcoloreditor.c
* app/widgets/gimpcursorview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpeditor.c
* app/widgets/gimphistogrameditor.c
* app/widgets/gimppaletteeditor.c: peek at the default interface to
get the parent interface. Unconditionally chain up in get_aux_info()
and set_aux_info() methods.
2005-06-04 Manish Singh <yosh@gimp.org>
* libgimp/Makefile.am: reorder to get the marshal files built first.
......
......@@ -95,7 +95,8 @@ static void gimp_color_editor_entry_changed (GimpColorHexEntry *entry,
GimpColorEditor *editor);
static GimpEditorClass *parent_class = NULL;
static GimpEditorClass *parent_class = NULL;
static GimpDockedInterface *parent_docked_iface = NULL;
GType
......@@ -355,6 +356,11 @@ gimp_color_editor_get_preview (GimpDocked *docked,
static void
gimp_color_editor_docked_iface_init (GimpDockedInterface *docked_iface)
{
parent_docked_iface = g_type_interface_peek_parent (docked_iface);
if (! parent_docked_iface)
parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
docked_iface->get_preview = gimp_color_editor_get_preview;
docked_iface->set_aux_info = gimp_color_editor_set_aux_info;
docked_iface->get_aux_info = gimp_color_editor_get_aux_info;
......@@ -371,6 +377,8 @@ gimp_color_editor_set_aux_info (GimpDocked *docked,
GtkWidget *notebook = GIMP_COLOR_NOTEBOOK (editor->notebook)->notebook;
GList *list;
parent_docked_iface->set_aux_info (docked, aux_info);
for (list = aux_info; list; list = g_list_next (list))
{
GimpSessionInfoAux *aux = list->data;
......@@ -408,7 +416,9 @@ gimp_color_editor_get_aux_info (GimpDocked *docked)
{
GimpColorEditor *editor = GIMP_COLOR_EDITOR (docked);
GimpColorNotebook *notebook = GIMP_COLOR_NOTEBOOK (editor->notebook);
GList *aux_info = NULL;
GList *aux_info;
aux_info = parent_docked_iface->get_aux_info (docked);
if (notebook->cur_page)
{
......
......@@ -54,7 +54,8 @@ static void gimp_cursor_view_style_set (GtkWidget *widget,
GtkStyle *prev_style);
static GimpEditorClass *parent_class = NULL;
static GimpEditorClass *parent_class = NULL;
static GimpDockedInterface *parent_docked_iface = NULL;
GType
......@@ -191,6 +192,11 @@ gimp_cursor_view_init (GimpCursorView *view)
static void
gimp_cursor_view_docked_iface_init (GimpDockedInterface *docked_iface)
{
parent_docked_iface = g_type_interface_peek_parent (docked_iface);
if (! parent_docked_iface)
parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
docked_iface->set_aux_info = gimp_cursor_view_set_aux_info;
docked_iface->get_aux_info = gimp_cursor_view_get_aux_info;
}
......@@ -205,6 +211,8 @@ gimp_cursor_view_set_aux_info (GimpDocked *docked,
GimpCursorView *view = GIMP_CURSOR_VIEW (docked);
GList *list;
parent_docked_iface->set_aux_info (docked, aux_info);
for (list = aux_info; list; list = g_list_next (list))
{
GimpSessionInfoAux *aux = list->data;
......@@ -233,11 +241,13 @@ gimp_cursor_view_set_aux_info (GimpDocked *docked,
static GList *
gimp_cursor_view_get_aux_info (GimpDocked *docked)
{
GimpCursorView *view = GIMP_CURSOR_VIEW (docked);
GList *aux_info = NULL;
GimpCursorView *view = GIMP_CURSOR_VIEW (docked);
GList *aux_info;
const gchar *nick;
GimpSessionInfoAux *aux;
aux_info = parent_docked_iface->get_aux_info (docked);
if (gimp_enum_get_value (GIMP_TYPE_COLOR_FRAME_MODE,
GIMP_COLOR_FRAME (view->color_frame_1)->frame_mode,
NULL, &nick, NULL, NULL))
......
......@@ -93,7 +93,8 @@ static void gimp_data_editor_revert_clicked (GtkWidget *widget,
static void gimp_data_editor_save_dirty (GimpDataEditor *editor);
static GimpEditorClass *parent_class = NULL;
static GimpEditorClass *parent_class = NULL;
static GimpDockedInterface *parent_docked_iface = NULL;
GType
......@@ -185,6 +186,11 @@ gimp_data_editor_init (GimpDataEditor *editor)
static void
gimp_data_editor_docked_iface_init (GimpDockedInterface *docked_iface)
{
parent_docked_iface = g_type_interface_peek_parent (docked_iface);
if (! parent_docked_iface)
parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
docked_iface->set_aux_info = gimp_data_editor_set_aux_info;
docked_iface->get_aux_info = gimp_data_editor_get_aux_info;
docked_iface->get_title = gimp_data_editor_get_title;
......@@ -294,6 +300,8 @@ gimp_data_editor_set_aux_info (GimpDocked *docked,
GimpDataEditor *editor = GIMP_DATA_EDITOR (docked);
GList *list;
parent_docked_iface->set_aux_info (docked, aux_info);
for (list = aux_info; list; list = g_list_next (list))
{
GimpSessionInfoAux *aux = list->data;
......@@ -315,8 +323,10 @@ gimp_data_editor_set_aux_info (GimpDocked *docked,
static GList *
gimp_data_editor_get_aux_info (GimpDocked *docked)
{
GimpDataEditor *editor = GIMP_DATA_EDITOR (docked);
GList *aux_info = NULL;
GimpDataEditor *editor = GIMP_DATA_EDITOR (docked);
GList *aux_info;
aux_info = parent_docked_iface->get_aux_info (docked);
if (editor->data)
{
......
......@@ -84,8 +84,7 @@ static gboolean gimp_editor_get_show_button_bar (GimpDocked *docked);
static GtkIconSize gimp_editor_ensure_button_box (GimpEditor *editor);
static GtkVBoxClass *parent_class = NULL;
static GimpDockedInterface *parent_docked_iface = NULL;
static GtkVBoxClass *parent_class = NULL;
GType
......@@ -231,8 +230,6 @@ gimp_editor_init (GimpEditor *editor)
static void
gimp_editor_docked_iface_init (GimpDockedInterface *docked_iface)
{
parent_docked_iface = g_type_interface_peek_parent (docked_iface);
docked_iface->get_menu = gimp_editor_get_menu;
docked_iface->has_button_bar = gimp_editor_has_button_bar;
docked_iface->set_show_button_bar = gimp_editor_set_show_button_bar;
......
......@@ -215,6 +215,9 @@ gimp_histogram_editor_docked_iface_init (GimpDockedInterface *docked_iface)
{
parent_docked_iface = g_type_interface_peek_parent (docked_iface);
if (! parent_docked_iface)
parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
docked_iface->set_aux_info = gimp_histogram_editor_set_aux_info;
docked_iface->get_aux_info = gimp_histogram_editor_get_aux_info;
}
......@@ -226,8 +229,7 @@ gimp_histogram_editor_set_aux_info (GimpDocked *docked,
GimpHistogramEditor *editor = GIMP_HISTOGRAM_EDITOR (docked);
GimpHistogramView *view = GIMP_HISTOGRAM_BOX (editor->box)->view;
if (parent_docked_iface->set_aux_info)
parent_docked_iface->set_aux_info (docked, aux_info);
parent_docked_iface->set_aux_info (docked, aux_info);
gimp_session_info_aux_set_props (G_OBJECT (view), aux_info,
"histogram-channel",
......@@ -242,16 +244,13 @@ gimp_histogram_editor_get_aux_info (GimpDocked *docked)
GimpHistogramView *view = GIMP_HISTOGRAM_BOX (editor->box)->view;
GList *aux_info;
aux_info = gimp_session_info_aux_new_from_props (G_OBJECT (view),
"histogram-channel",
"histogram-scale",
NULL);
aux_info = parent_docked_iface->get_aux_info (docked);
if (parent_docked_iface->get_aux_info)
return g_list_concat (parent_docked_iface->get_aux_info (docked),
aux_info);
else
return aux_info;
return g_list_concat (aux_info,
gimp_session_info_aux_new_from_props (G_OBJECT (view),
"histogram-channel",
"histogram-scale",
NULL));
}
static void
......
......@@ -293,6 +293,9 @@ gimp_palette_editor_docked_iface_init (GimpDockedInterface *docked_iface)
{
parent_docked_iface = g_type_interface_peek_parent (docked_iface);
if (! parent_docked_iface)
parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
docked_iface->set_aux_info = gimp_palette_editor_set_aux_info;
docked_iface->get_aux_info = gimp_palette_editor_get_aux_info;
}
......@@ -342,8 +345,7 @@ gimp_palette_editor_set_aux_info (GimpDocked *docked,
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (docked);
GList *list;
if (parent_docked_iface->set_aux_info)
parent_docked_iface->set_aux_info (docked, aux_info);
parent_docked_iface->set_aux_info (docked, aux_info);
for (list = aux_info; list; list = g_list_next (list))
{
......@@ -363,11 +365,10 @@ gimp_palette_editor_set_aux_info (GimpDocked *docked,
static GList *
gimp_palette_editor_get_aux_info (GimpDocked *docked)
{
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (docked);
GList *aux_info = NULL;
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (docked);
GList *aux_info;
if (parent_docked_iface->get_aux_info)
aux_info = parent_docked_iface->get_aux_info (docked);
aux_info = parent_docked_iface->get_aux_info (docked);
if (editor->zoom_factor != 1.0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment