diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2005-07-08 09:21:56 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-07-08 09:21:56 (GMT) |
commit | 73aa6f5da16527a89d0c89a10020b92cba755a15 (patch) | |
tree | e66d940de568fae2396aca94ff623dca7ce784bf | |
parent | 9597e80a5f48b7436de1bd025ec6e6c031254398 (diff) |
Let tbe check file existence for us. Add a comment about eggrecent mime
2005-07-08 Marco Pesenti Gritti <mpg@redhat.com>
* shell/ev-application.c: (ev_application_init):
Let tbe check file existence for us.
Add a comment about eggrecent mime filter.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | shell/ev-application.c | 9 |
2 files changed, 12 insertions, 4 deletions
@@ -1,5 +1,12 @@ 2005-07-08 Marco Pesenti Gritti <mpg@redhat.com> + * shell/ev-application.c: (ev_application_init): + + Let tbe check file existence for us. + Add a comment about eggrecent mime filter. + +2005-07-08 Marco Pesenti Gritti <mpg@redhat.com> + * data/evince-ui.xml: * shell/ev-application.c: (ev_application_shutdown), (ev_application_init), (ev_application_get_toolbars_model), diff --git a/shell/ev-application.c b/shell/ev-application.c index 9048653..6cbb149 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -245,18 +245,19 @@ ev_application_init (EvApplication *ev_application) ev_application->toolbars_file = g_build_filename (ev_dot_dir (), "evince_toolbar.xml", NULL); - if (!g_file_test (ev_application->toolbars_file, G_FILE_TEST_EXISTS)) { + if (!egg_toolbars_model_load (ev_application->toolbars_model, + ev_application->toolbars_file)) { egg_toolbars_model_load (ev_application->toolbars_model, DATADIR"/evince-toolbar.xml"); - } else { - egg_toolbars_model_load (ev_application->toolbars_model, - ev_application->toolbars_file); } egg_toolbars_model_set_flags (ev_application->toolbars_model, 0, EGG_TB_MODEL_NOT_REMOVABLE); 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 + the list of mime types is dynamic */ egg_recent_model_set_limit (ev_application->recent_model, 5); egg_recent_model_set_filter_groups (ev_application->recent_model, "Evince", NULL); |