Store the connection ID of the "changed" signal in the collection.
2001-05-31 Federico Mena Quintero <federico@ximian.com> * menus/gal-view-menus.c (gal_view_menus_construct): Store the connection ID of the "changed" signal in the collection. (gal_view_menus_new): Added preconditions. (gal_view_menus_construct): Added preconditions. svn path=/trunk/; revision=10075
This commit is contained in:
committed by
Federico Mena Quintero
parent
be88a44705
commit
8e3439ab3e
@ -1,3 +1,10 @@
|
||||
2001-05-31 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* menus/gal-view-menus.c (gal_view_menus_construct): Store the
|
||||
connection ID of the "changed" signal in the collection.
|
||||
(gal_view_menus_new): Added preconditions.
|
||||
(gal_view_menus_construct): Added preconditions.
|
||||
|
||||
2001-05-21 Chris Toshok <toshok@ximian.com>
|
||||
|
||||
* menus/gal-view-menus.c (build_menus): make the view menuitems
|
||||
|
||||
@ -90,10 +90,12 @@ gvm_destroy (GtkObject *object)
|
||||
|
||||
if (gvm->priv->collection && gvm->priv->collection_changed_id != 0) {
|
||||
gtk_signal_disconnect(GTK_OBJECT(gvm->priv->collection), gvm->priv->collection_changed_id);
|
||||
gvm->priv->collection_changed_id = 0;
|
||||
}
|
||||
|
||||
if (gvm->priv->collection)
|
||||
gtk_object_unref(GTK_OBJECT(gvm->priv->collection));
|
||||
|
||||
free_verbs(gvm);
|
||||
remove_xml(gvm);
|
||||
remove_listeners(gvm);
|
||||
@ -127,8 +129,12 @@ E_MAKE_TYPE(gal_view_menus, "GalViewMenus", GalViewMenus, gvm_class_init, gvm_in
|
||||
GalViewMenus *
|
||||
gal_view_menus_new (GalViewCollection *collection)
|
||||
{
|
||||
GalViewMenus *gvm = gtk_type_new (GAL_VIEW_MENUS_TYPE);
|
||||
GalViewMenus *gvm;
|
||||
|
||||
g_return_val_if_fail (collection != NULL, NULL);
|
||||
g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL);
|
||||
|
||||
gvm = gtk_type_new (GAL_VIEW_MENUS_TYPE);
|
||||
gal_view_menus_construct(gvm, collection);
|
||||
|
||||
return gvm;
|
||||
@ -138,12 +144,17 @@ GalViewMenus *
|
||||
gal_view_menus_construct (GalViewMenus *gvm,
|
||||
GalViewCollection *collection)
|
||||
{
|
||||
if (collection)
|
||||
gtk_object_ref(GTK_OBJECT(collection));
|
||||
gvm->priv->collection = collection;
|
||||
g_return_val_if_fail (gvm != NULL, NULL);
|
||||
g_return_val_if_fail (GAL_IS_VIEW_MENUS (gvm), NULL);
|
||||
g_return_val_if_fail (collection != NULL, NULL);
|
||||
g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL);
|
||||
|
||||
gtk_object_ref(GTK_OBJECT(collection));
|
||||
gvm->priv->collection = collection;
|
||||
gvm->priv->collection_changed_id = gtk_signal_connect (
|
||||
GTK_OBJECT(collection), "changed",
|
||||
GTK_SIGNAL_FUNC(collection_changed), gvm);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(collection), "changed",
|
||||
GTK_SIGNAL_FUNC(collection_changed), gvm);
|
||||
return gvm;
|
||||
}
|
||||
|
||||
@ -298,9 +309,10 @@ build_stuff (GalViewMenus *gvm,
|
||||
bonobo_ui_component_add_verb_list(gvm->priv->component, gvm->priv->verbs);
|
||||
}
|
||||
|
||||
void gal_view_menus_apply (GalViewMenus *gvm,
|
||||
BonoboUIComponent *component,
|
||||
CORBA_Environment *ev)
|
||||
void
|
||||
gal_view_menus_apply (GalViewMenus *gvm,
|
||||
BonoboUIComponent *component,
|
||||
CORBA_Environment *ev)
|
||||
{
|
||||
gvm->priv->component = component;
|
||||
|
||||
|
||||
@ -31,6 +31,6 @@ GalViewMenus *gal_view_menus_construct (GalViewMenus *menus,
|
||||
|
||||
void gal_view_menus_apply (GalViewMenus *menus,
|
||||
BonoboUIComponent *component,
|
||||
CORBA_Environment *ev);
|
||||
CORBA_Environment *ev);
|
||||
|
||||
#endif /* _GAL_VIEW_MENUS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user