]> www.fi.muni.cz Git - evince.git/commitdiff
*** empty log message ***
authorMarco Pesenti Gritti <marco@src.gnome.org>
Mon, 9 May 2005 12:22:23 +0000 (12:22 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Mon, 9 May 2005 12:22:23 +0000 (12:22 +0000)
cut-n-paste/recent-files/egg-recent-view-gtk.c
cut-n-paste/toolbar-editor/Makefile.am

index 98727366edb7068601d1a00ce3be43e9c30eb2a9..fb01a74518fca4ea94edf3c1bcbef0ddbc7cfaa7 100644 (file)
@@ -99,7 +99,8 @@ egg_recent_view_gtk_clear (EggRecentViewGtk *view)
        GObject *menu_item;
        gint *menu_data=NULL;
 
-       g_return_if_fail (view->menu != NULL);
+       if (view->menu == NULL)
+               return;
 
        menu_children = gtk_container_get_children (GTK_CONTAINER (view->menu));
 
@@ -336,7 +337,8 @@ egg_recent_view_gtk_set_list (EggRecentViewGtk *view, GList *list)
        gint display=1;
        gint index=1;
 
-       g_return_if_fail (view);
+       if (view->menu == NULL)
+               return;
 
        egg_recent_view_gtk_clear (view);
 
@@ -497,7 +499,6 @@ egg_recent_view_gtk_finalize (GObject *object)
 
        g_free (view->uid);
 
-       g_object_unref (view->menu);
        g_object_unref (view->model);
 #ifndef USE_STABLE_LIBGNOMEUI
        g_object_unref (view->theme);
@@ -695,13 +696,16 @@ egg_recent_view_gtk_set_menu (EggRecentViewGtk *view,
 {
        g_return_if_fail (view);
        g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view));
-       g_return_if_fail (menu);
 
        if (view->menu != NULL)
-               g_object_unref (view->menu);
+               g_object_remove_weak_pointer (G_OBJECT (view->menu),
+                                             (gpointer *) &view->menu);
        
        view->menu = menu;
-       g_object_ref (view->menu);
+
+       if (view->menu != NULL)
+               g_object_add_weak_pointer (G_OBJECT (view->menu),
+                                          (gpointer *) &view->menu);
 }
 
 /**
index 7d57262842d6025fd38a9c20e9ea3877f57ab278..5a9b233892013837dd06bb656fe032fa06b0a5d3 100644 (file)
@@ -33,3 +33,7 @@ egg-marshal.c: eggmarshalers.c eggmarshalers.h
 
 EXTRA_DIST= \
        eggmarshalers.list
+
+EGGDIR=$(srcdir)/../../../libegg/libegg
+regenerate-built-sources:
+       EGGFILES="$(EGGFILES) eggmarshalers.list" EGGDIR="$(EGGDIR)" $(top_srcdir)/cut-n-paste/update-from-egg.sh