]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-application.c
Use GtkRecent instead of EggRecent when it's available. Fixes bug #349273
[evince.git] / shell / ev-application.c
index b7002a750cebff125fe348b7b873e9f56272e6aa..88a2ee983f331bad22ce8f1dc12d50f0860f8de1 100644 (file)
@@ -330,10 +330,12 @@ ev_application_shutdown (EvApplication *application)
                application->toolbars_file = NULL;
        }
 
+#ifndef HAVE_GTK_RECENT
        if (application->recent_model) {
                g_object_unref (application->recent_model);
                application->recent_model = NULL;
        }
+#endif
        
        g_free (application->last_chooser_uri);
        g_object_unref (application);
@@ -367,7 +369,8 @@ ev_application_init (EvApplication *ev_application)
 
        egg_toolbars_model_set_flags (ev_application->toolbars_model, 0,
                                      EGG_TB_MODEL_NOT_REMOVABLE); 
-                                     
+
+#ifndef HAVE_GTK_RECENT
        ev_application->recent_model = egg_recent_model_new (EGG_RECENT_MODEL_SORT_MRU);
        /* FIXME we should add a mime type filter but current eggrecent
            has only a varargs style api which does not work well when
@@ -375,6 +378,7 @@ ev_application_init (EvApplication *ev_application)
        egg_recent_model_set_limit (ev_application->recent_model, 5);   
        egg_recent_model_set_filter_groups (ev_application->recent_model,
                                            "Evince", NULL);
+#endif /* HAVE_GTK_RECENT */
 }
 
 GList *
@@ -401,10 +405,12 @@ EggToolbarsModel *ev_application_get_toolbars_model (EvApplication *application)
        return application->toolbars_model;
 }
 
+#ifndef HAVE_GTK_RECENT
 EggRecentModel *ev_application_get_recent_model (EvApplication *application)
 {
        return application->recent_model;
 }
+#endif
 
 void ev_application_save_toolbars_model (EvApplication *application)
 {