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.
This commit is contained in:

committed by
Michael Natterer

parent
f80e52fbf0
commit
b09cadf033
@ -1,3 +1,12 @@
|
|||||||
|
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>
|
2003-10-15 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/gui/info-window.c: eek. should actually commit what i
|
* app/gui/info-window.c: eek. should actually commit what i
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
* The GimpConfig serialization and deserialization interface.
|
* 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,
|
static gboolean gimp_config_iface_serialize (GimpConfig *config,
|
||||||
GimpConfigWriter *writer,
|
GimpConfigWriter *writer,
|
||||||
@ -69,7 +69,7 @@ gimp_config_interface_get_type (void)
|
|||||||
static const GTypeInfo config_iface_info =
|
static const GTypeInfo config_iface_info =
|
||||||
{
|
{
|
||||||
sizeof (GimpConfigInterface),
|
sizeof (GimpConfigInterface),
|
||||||
(GBaseInitFunc) gimp_config_iface_init,
|
(GBaseInitFunc) gimp_config_iface_base_init,
|
||||||
(GBaseFinalizeFunc) NULL,
|
(GBaseFinalizeFunc) NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -85,15 +85,22 @@ gimp_config_interface_get_type (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static 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;
|
if (! config_iface->serialize)
|
||||||
gimp_config_iface->deserialize = gimp_config_iface_deserialize;
|
{
|
||||||
gimp_config_iface->serialize_property = NULL;
|
config_iface->serialize = gimp_config_iface_serialize;
|
||||||
gimp_config_iface->deserialize_property = NULL;
|
config_iface->deserialize = gimp_config_iface_deserialize;
|
||||||
gimp_config_iface->duplicate = gimp_config_iface_duplicate;
|
config_iface->duplicate = gimp_config_iface_duplicate;
|
||||||
gimp_config_iface->equal = gimp_config_iface_equal;
|
config_iface->equal = gimp_config_iface_equal;
|
||||||
gimp_config_iface->reset = gimp_config_iface_reset;
|
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
|
static gboolean
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "gimpdocked.h"
|
#include "gimpdocked.h"
|
||||||
|
|
||||||
|
|
||||||
static void gimp_docked_iface_init (GimpDockedInterface *docked_iface);
|
static void gimp_docked_iface_base_init (GimpDockedInterface *docked_iface);
|
||||||
|
|
||||||
|
|
||||||
GType
|
GType
|
||||||
@ -43,7 +43,7 @@ gimp_docked_interface_get_type (void)
|
|||||||
static const GTypeInfo docked_iface_info =
|
static const GTypeInfo docked_iface_info =
|
||||||
{
|
{
|
||||||
sizeof (GimpDockedInterface),
|
sizeof (GimpDockedInterface),
|
||||||
(GBaseInitFunc) gimp_docked_iface_init,
|
(GBaseInitFunc) gimp_docked_iface_base_init,
|
||||||
(GBaseFinalizeFunc) NULL,
|
(GBaseFinalizeFunc) NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,13 +59,8 @@ gimp_docked_interface_get_type (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static 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
|
void
|
||||||
@ -142,6 +137,21 @@ gimp_docked_get_menu (GimpDocked *docked,
|
|||||||
|
|
||||||
docked_iface = GIMP_DOCKED_GET_INTERFACE (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)
|
if (docked_iface->get_menu)
|
||||||
return docked_iface->get_menu (docked, item_factory_data);
|
return docked_iface->get_menu (docked, item_factory_data);
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
* The GimpConfig serialization and deserialization interface.
|
* 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,
|
static gboolean gimp_config_iface_serialize (GimpConfig *config,
|
||||||
GimpConfigWriter *writer,
|
GimpConfigWriter *writer,
|
||||||
@ -69,7 +69,7 @@ gimp_config_interface_get_type (void)
|
|||||||
static const GTypeInfo config_iface_info =
|
static const GTypeInfo config_iface_info =
|
||||||
{
|
{
|
||||||
sizeof (GimpConfigInterface),
|
sizeof (GimpConfigInterface),
|
||||||
(GBaseInitFunc) gimp_config_iface_init,
|
(GBaseInitFunc) gimp_config_iface_base_init,
|
||||||
(GBaseFinalizeFunc) NULL,
|
(GBaseFinalizeFunc) NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -85,15 +85,22 @@ gimp_config_interface_get_type (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static 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;
|
if (! config_iface->serialize)
|
||||||
gimp_config_iface->deserialize = gimp_config_iface_deserialize;
|
{
|
||||||
gimp_config_iface->serialize_property = NULL;
|
config_iface->serialize = gimp_config_iface_serialize;
|
||||||
gimp_config_iface->deserialize_property = NULL;
|
config_iface->deserialize = gimp_config_iface_deserialize;
|
||||||
gimp_config_iface->duplicate = gimp_config_iface_duplicate;
|
config_iface->duplicate = gimp_config_iface_duplicate;
|
||||||
gimp_config_iface->equal = gimp_config_iface_equal;
|
config_iface->equal = gimp_config_iface_equal;
|
||||||
gimp_config_iface->reset = gimp_config_iface_reset;
|
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
|
static gboolean
|
||||||
|
Reference in New Issue
Block a user