diff options
author | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 2006-11-10 00:56:02 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-11-10 00:56:02 (GMT) |
commit | bd7342aad81904a616ea6948a1e87c59e26af951 (patch) | |
tree | 5d52e43a52f594e5a4d3964f2f858df254ce7fe8 /shell/ev-application.c | |
parent | 93d08f703def1edf4786c479ac882c399ae29885 (diff) |
Fixes bug #364364 - toolbar editor shows zoom actions again.
2006-11-10 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* cut-n-paste/toolbar-editor/egg-toolbar-editor.c: (setup_editor):
* data/Makefile.am:
* data/evince-preview-toolbar.xml:
* data/evince-toolbar.xml:
* shell/ev-application.c: (ev_application_shutdown),
(ev_application_init), (ev_application_get_toolbars_model):
* shell/ev-application.h:
* shell/ev-window.c: (update_chrome_visibility),
(ev_window_create_fullscreen_popup), (ev_window_run_preview),
(ev_window_cmd_edit_toolbar), (ev_window_init):
Fixes bug #364364 - toolbar editor shows zoom actions again.
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r-- | shell/ev-application.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c index 388c8d2..4bbec37 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -413,8 +413,10 @@ ev_application_shutdown (EvApplication *application) { if (application->toolbars_model) { g_object_unref (application->toolbars_model); + g_object_unref (application->preview_toolbars_model); g_free (application->toolbars_file); application->toolbars_model = NULL; + application->preview_toolbars_model = NULL; application->toolbars_file = NULL; } @@ -458,6 +460,14 @@ ev_application_init (EvApplication *ev_application) egg_toolbars_model_set_flags (ev_application->toolbars_model, 0, EGG_TB_MODEL_NOT_REMOVABLE); + ev_application->preview_toolbars_model = egg_toolbars_model_new (); + + egg_toolbars_model_load_toolbars (ev_application->preview_toolbars_model, + DATADIR"/evince-preview-toolbar.xml"); + + egg_toolbars_model_set_flags (ev_application->preview_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 @@ -488,9 +498,11 @@ ev_application_get_windows (EvApplication *application) return windows; } -EggToolbarsModel *ev_application_get_toolbars_model (EvApplication *application) +EggToolbarsModel *ev_application_get_toolbars_model (EvApplication *application, + gboolean preview) { - return application->toolbars_model; + return preview ? + application->preview_toolbars_model : application->toolbars_model; } #ifndef HAVE_GTK_RECENT |