Commit b09cadf0 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/widgets/gimpdocked.c (gimp_docked_iface_base_init) they are base_init,

2003-10-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdocked.c (gimp_docked_iface_base_init)
	* app/config/gimpconfig.c (gimp_config_iface_base_init): they are
	base_init, not just init functions. Changed implementations to not
	overwrite the parent class' vtable entries with the default
	implementations. Fixes derived interface methods and brings
	back all dockable menus.
parent f80e52fb
2003-10-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdocked.c (gimp_docked_iface_base_init)
* app/config/gimpconfig.c (gimp_config_iface_base_init): they are
base_init, not just init functions. Changed implementations to not
overwrite the parent class' vtable entries with the default
implementations. Fixes derived interface methods and brings
back all dockable menus.
2003-10-15 Michael Natterer <mitch@gimp.org>
* app/gui/info-window.c: eek. should actually commit what i
......@@ -44,7 +44,7 @@
* The GimpConfig serialization and deserialization interface.
*/
static void gimp_config_iface_init (GimpConfigInterface *gimp_config_iface);
static void gimp_config_iface_base_init (GimpConfigInterface *config_iface);
static gboolean gimp_config_iface_serialize (GimpConfig *config,
GimpConfigWriter *writer,
......@@ -69,7 +69,7 @@ gimp_config_interface_get_type (void)
static const GTypeInfo config_iface_info =
{
sizeof (GimpConfigInterface),
(GBaseInitFunc) gimp_config_iface_init,
(GBaseInitFunc) gimp_config_iface_base_init,
(GBaseFinalizeFunc) NULL,
};
......@@ -85,15 +85,22 @@ gimp_config_interface_get_type (void)
}
static void
gimp_config_iface_init (GimpConfigInterface *gimp_config_iface)
gimp_config_iface_base_init (GimpConfigInterface *config_iface)
{
gimp_config_iface->serialize = gimp_config_iface_serialize;
gimp_config_iface->deserialize = gimp_config_iface_deserialize;
gimp_config_iface->serialize_property = NULL;
gimp_config_iface->deserialize_property = NULL;
gimp_config_iface->duplicate = gimp_config_iface_duplicate;
gimp_config_iface->equal = gimp_config_iface_equal;
gimp_config_iface->reset = gimp_config_iface_reset;
if (! config_iface->serialize)
{
config_iface->serialize = gimp_config_iface_serialize;
config_iface->deserialize = gimp_config_iface_deserialize;
config_iface->duplicate = gimp_config_iface_duplicate;
config_iface->equal = gimp_config_iface_equal;
config_iface->reset = gimp_config_iface_reset;
}
/* always set these to NULL since we don't want to inherit them
* from parent classes
*/
config_iface->serialize_property = NULL;
config_iface->deserialize_property = NULL;
}
static gboolean
......
......@@ -30,7 +30,7 @@
#include "gimpdocked.h"
static void gimp_docked_iface_init (GimpDockedInterface *docked_iface);
static void gimp_docked_iface_base_init (GimpDockedInterface *docked_iface);
GType
......@@ -43,7 +43,7 @@ gimp_docked_interface_get_type (void)
static const GTypeInfo docked_iface_info =
{
sizeof (GimpDockedInterface),
(GBaseInitFunc) gimp_docked_iface_init,
(GBaseInitFunc) gimp_docked_iface_base_init,
(GBaseFinalizeFunc) NULL,
};
......@@ -59,13 +59,8 @@ gimp_docked_interface_get_type (void)
}
static void
gimp_docked_iface_init (GimpDockedInterface *docked_iface)
gimp_docked_iface_base_init (GimpDockedInterface *docked_iface)
{
docked_iface->set_aux_info = NULL;
docked_iface->get_aux_info = NULL;
docked_iface->get_preview = NULL;
docked_iface->set_context = NULL;
docked_iface->get_menu = NULL;
}
void
......@@ -142,6 +137,21 @@ gimp_docked_get_menu (GimpDocked *docked,
docked_iface = GIMP_DOCKED_GET_INTERFACE (docked);
#if 0
g_print ("gimp_docked_get_menu: docked = %p\n"
"iface->set_aux_info = %p\n"
"iface->get_aux_info = %p\n"
"iface->get_preview = %p\n"
"iface->set_context = %p\n"
"iface->get_menu = %p\n\n",
docked,
docked_iface->set_aux_info,
docked_iface->get_aux_info,
docked_iface->get_preview,
docked_iface->set_context,
docked_iface->get_menu);
#endif
if (docked_iface->get_menu)
return docked_iface->get_menu (docked, item_factory_data);
......
......@@ -44,7 +44,7 @@
* The GimpConfig serialization and deserialization interface.
*/
static void gimp_config_iface_init (GimpConfigInterface *gimp_config_iface);
static void gimp_config_iface_base_init (GimpConfigInterface *config_iface);
static gboolean gimp_config_iface_serialize (GimpConfig *config,
GimpConfigWriter *writer,
......@@ -69,7 +69,7 @@ gimp_config_interface_get_type (void)
static const GTypeInfo config_iface_info =
{
sizeof (GimpConfigInterface),
(GBaseInitFunc) gimp_config_iface_init,
(GBaseInitFunc) gimp_config_iface_base_init,
(GBaseFinalizeFunc) NULL,
};
......@@ -85,15 +85,22 @@ gimp_config_interface_get_type (void)
}
static void
gimp_config_iface_init (GimpConfigInterface *gimp_config_iface)
gimp_config_iface_base_init (GimpConfigInterface *config_iface)
{
gimp_config_iface->serialize = gimp_config_iface_serialize;
gimp_config_iface->deserialize = gimp_config_iface_deserialize;
gimp_config_iface->serialize_property = NULL;
gimp_config_iface->deserialize_property = NULL;
gimp_config_iface->duplicate = gimp_config_iface_duplicate;
gimp_config_iface->equal = gimp_config_iface_equal;
gimp_config_iface->reset = gimp_config_iface_reset;
if (! config_iface->serialize)
{
config_iface->serialize = gimp_config_iface_serialize;
config_iface->deserialize = gimp_config_iface_deserialize;
config_iface->duplicate = gimp_config_iface_duplicate;
config_iface->equal = gimp_config_iface_equal;
config_iface->reset = gimp_config_iface_reset;
}
/* always set these to NULL since we don't want to inherit them
* from parent classes
*/
config_iface->serialize_property = NULL;
config_iface->deserialize_property = NULL;
}
static gboolean
......
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