#include "ev-window-title.h"
#include "ev-navigation-action.h"
#include "ev-page-action.h"
+#include "ev-open-recent-action.h"
#include "ev-sidebar.h"
#include "ev-sidebar-links.h"
#include "ev-sidebar-attachments.h"
#include "ev-jobs.h"
#include "ev-sidebar-page.h"
#include "eggfindbar.h"
-
-#ifndef HAVE_GTK_RECENT
-#include "egg-recent-view-uimanager.h"
-#include "egg-recent-view.h"
-#include "egg-recent-model.h"
-#endif
-
#include "egg-toolbar-editor.h"
#include "egg-editable-toolbar.h"
#include "egg-toolbars-model.h"
GtkActionGroup *action_group;
GtkActionGroup *view_popup_action_group;
GtkActionGroup *attachment_popup_action_group;
-#ifdef HAVE_GTK_RECENT
GtkRecentManager *recent_manager;
GtkActionGroup *recent_action_group;
guint recent_ui_id;
-#endif
GtkUIManager *ui_manager;
/* Fullscreen mode */
char *local_uri;
EvLinkDest *dest;
gboolean unlink_temp_file;
+ gboolean in_reload;
EvDocument *document;
EvHistory *history;
EvPageCache *page_cache;
EvWindowPageMode page_mode;
EvWindowTitle *title;
-#ifndef HAVE_GTK_RECENT
- EggRecentViewUIManager *recent_view;
-#endif
EvJob *load_job;
EvJob *thumbnail_job;
+ EvJob *save_job;
#ifdef WITH_GNOME_PRINT
GnomePrintJob *print_job;
#endif
#define THUMBNAILS_SIDEBAR_ID "thumbnails"
#define ATTACHMENTS_SIDEBAR_ID "attachments"
-static void ev_window_update_actions (EvWindow *ev_window);
+static void ev_window_update_actions (EvWindow *ev_window);
static void ev_window_sidebar_visibility_changed_cb (EvSidebar *ev_sidebar,
GParamSpec *pspec,
EvWindow *ev_window);
static void ev_window_print_job_cb (EvJobPrint *job,
EvWindow *window);
#endif
+static void ev_window_save_job_cb (EvJobSave *save,
+ EvWindow *window);
static void ev_window_sizing_mode_changed_cb (EvView *view,
GParamSpec *pspec,
EvWindow *ev_window);
static void ev_view_popup_cmd_copy_image (GtkAction *action,
EvWindow *window);
static void ev_attachment_popup_cmd_open_attachment (GtkAction *action,
- EvWindow *window);
-static void ev_attachment_popup_cmd_save_attachment_as (GtkAction *action,
- EvWindow *window);
+ EvWindow *window);
+static void ev_attachment_popup_cmd_save_attachment_as (GtkAction *action,
+ EvWindow *window);
static void ev_window_cmd_view_best_fit (GtkAction *action,
EvWindow *ev_window);
static void ev_window_cmd_view_page_width (GtkAction *action,
EvWindow *ev_window);
-static void view_handle_link_cb (EvView *view,
- EvLink *link,
- EvWindow *window);
+static void view_handle_link_cb (EvView *view,
+ EvLink *link,
+ EvWindow *window);
+static void find_bar_search_changed_cb (EggFindBar *find_bar,
+ GParamSpec *param,
+ EvWindow *ev_window);
G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW)
if (window->priv->history == NULL)
return;
+
+ if (!EV_IS_DOCUMENT_LINKS (window->priv->document))
+ return;
if (link) {
action = g_object_ref (ev_link_get_action (link));
find_task.page_label = page_label;
find_task.chapter = NULL;
- if (EV_IS_DOCUMENT_LINKS (window->priv->document) &&
- ev_document_links_has_document_links (EV_DOCUMENT_LINKS (window->priv->document))) {
+ if (ev_document_links_has_document_links (EV_DOCUMENT_LINKS (window->priv->document))) {
GtkTreeModel *model;
g_object_get (G_OBJECT (window->priv->sidebar_links), "model", &model, NULL);
if (uri && ev_metadata_manager_get (uri, "page", &page, TRUE)) {
n_pages = ev_page_cache_get_n_pages (window->priv->page_cache);
new_page = CLAMP (g_value_get_int (&page), 0, n_pages - 1);
- if (new_page == n_pages - 1)
+ if (!window->priv->in_reload && new_page == n_pages - 1)
new_page = 0;
ev_page_cache_set_current_page (window->priv->page_cache,
new_page);
ev_window_clear_thumbnail_job (ev_window);
}
+static void
+ev_window_refresh_window_thumbnail (EvWindow *ev_window, int rotation)
+{
+
+ EvRenderContext *rc;
+ gint page_width, page_height;
+ gdouble scale;
+ EvDocument *document = ev_window->priv->document;
+
+ if (!EV_IS_DOCUMENT_THUMBNAILS (document)) {
+ return;
+ }
+
+ ev_window_clear_thumbnail_job (ev_window);
+
+ ev_page_cache_get_size (ev_window->priv->page_cache,
+ 0, 0, 1.0,
+ &page_width, &page_height);
+ scale = (gdouble)128 / (gdouble)page_width;
+
+ rc = ev_render_context_new (rotation, 0, scale);
+
+ ev_window->priv->thumbnail_job = ev_job_thumbnail_new (document, rc);
+ g_signal_connect (ev_window->priv->thumbnail_job, "finished",
+ G_CALLBACK (ev_window_set_icon_from_thumbnail),
+ ev_window);
+ ev_job_queue_add_job (EV_JOB (ev_window->priv->thumbnail_job), EV_JOB_PRIORITY_LOW);
+ g_object_unref (rc);
+}
+
static gboolean
ev_window_setup_document (EvWindow *ev_window)
{
G_CALLBACK (find_changed_cb),
ev_window, 0);
}
-
- if (EV_IS_DOCUMENT_THUMBNAILS (document)) {
- EvRenderContext *rc;
- gint page_width, page_height;
- gdouble scale;
-
- ev_window_clear_thumbnail_job (ev_window);
-
- ev_page_cache_get_size (ev_window->priv->page_cache,
- 0, 0, 1.0,
- &page_width, &page_height);
- scale = (gdouble)128 / (gdouble)page_width;
-
- rc = ev_render_context_new (0, 0, scale);
- ev_window->priv->thumbnail_job = ev_job_thumbnail_new (document, rc);
- g_signal_connect (ev_window->priv->thumbnail_job, "finished",
- G_CALLBACK (ev_window_set_icon_from_thumbnail),
- ev_window);
- ev_job_queue_add_job (EV_JOB (ev_window->priv->thumbnail_job), EV_JOB_PRIORITY_LOW);
- g_object_unref (rc);
- }
+
+ ev_window_refresh_window_thumbnail (ev_window, 0);
ev_window_set_page_mode (ev_window, PAGE_MODE_DOCUMENT);
ev_window_title_set_document (ev_window->priv->title, document);
static void
ev_window_clear_load_job (EvWindow *ev_window)
{
- if (ev_window->priv->load_job != NULL) {
-
- if (!ev_window->priv->load_job->finished)
- ev_job_queue_remove_job (ev_window->priv->load_job);
-
- g_signal_handlers_disconnect_by_func (ev_window->priv->load_job, ev_window_load_job_cb, ev_window);
- g_object_unref (ev_window->priv->load_job);
- ev_window->priv->load_job = NULL;
- }
+ if (ev_window->priv->load_job != NULL) {
+
+ if (!ev_window->priv->load_job->finished)
+ ev_job_queue_remove_job (ev_window->priv->load_job);
+
+ g_signal_handlers_disconnect_by_func (ev_window->priv->load_job, ev_window_load_job_cb, ev_window);
+ g_object_unref (ev_window->priv->load_job);
+ ev_window->priv->load_job = NULL;
+ }
}
static void
ev_window_clear_local_uri (EvWindow *ev_window)
{
- if (ev_window->priv->local_uri) {
- ev_tmp_uri_unlink (ev_window->priv->local_uri);
- g_free (ev_window->priv->local_uri);
- ev_window->priv->local_uri = NULL;
- }
+ if (ev_window->priv->local_uri) {
+ ev_tmp_uri_unlink (ev_window->priv->local_uri);
+ g_free (ev_window->priv->local_uri);
+ ev_window->priv->local_uri = NULL;
+ }
}
static void
break;
}
- ev_window_clear_load_job (ev_window);
+ /* Restart the search after reloading */
+ if (ev_window->priv->in_reload) {
+ GtkWidget *widget;
+
+ widget = gtk_window_get_focus (GTK_WINDOW (ev_window));
+ if (widget && gtk_widget_get_ancestor (widget, EGG_TYPE_FIND_BAR)) {
+ find_bar_search_changed_cb (EGG_FIND_BAR (ev_window->priv->find_bar),
+ NULL, ev_window);
+ }
+ }
+
+ ev_window_clear_load_job (ev_window);
+ ev_window->priv->in_reload = FALSE;
return;
}
_("Unable to open document"),
job->error);
ev_window_clear_load_job (ev_window);
+ ev_window->priv->in_reload = FALSE;
}
return;
{
GnomeVFSURI *source_uri;
GnomeVFSURI *target_uri;
+
+ if (ev_window->priv->uri &&
+ g_ascii_strcasecmp (ev_window->priv->uri, uri) == 0) {
+ ev_window->priv->in_reload = TRUE;
+ }
ev_window_close_dialogs (ev_window);
ev_window_clear_load_job (ev_window);
g_object_unref (dest);
}
-#ifdef HAVE_GTK_RECENT
static void
-ev_window_cmd_recent_file_activate (GtkAction *action,
- EvWindow *window)
+ev_window_cmd_recent_file_activate (GtkAction *action,
+ EvWindow *window)
{
GtkRecentInfo *info;
const gchar *uri;
NULL, 0, FALSE, NULL,
GDK_CURRENT_TIME);
}
-#else
+
static void
-ev_window_cmd_recent_file_activate (GtkAction *action,
- EvWindow *ev_window)
+ev_window_open_recent_action_item_activated (EvOpenRecentAction *action,
+ const gchar *uri,
+ EvWindow *window)
{
- char *uri;
- EggRecentItem *item;
-
- item = egg_recent_view_uimanager_get_item (ev_window->priv->recent_view,
- action);
-
- uri = egg_recent_item_get_uri (item);
-
ev_application_open_uri_at_dest (EV_APP, uri,
- gtk_window_get_screen (GTK_WINDOW (ev_window)),
- NULL, 0, FALSE, NULL,
+ gtk_window_get_screen (GTK_WINDOW (window)),
+ NULL, 0, FALSE, NULL,
GDK_CURRENT_TIME);
-
- g_free (uri);
}
-#endif /* HAVE_GTK_RECENT */
static void
ev_window_add_recent (EvWindow *window, const char *filename)
{
-#ifdef HAVE_GTK_RECENT
gtk_recent_manager_add_item (window->priv->recent_manager, filename);
-#else
- EggRecentItem *item;
-
- item = egg_recent_item_new_from_uri (filename);
- egg_recent_item_add_group (item, "Evince");
- egg_recent_model_add_full (ev_application_get_recent_model (EV_APP), item);
-#endif /* HAVE_GTK_RECENT */
}
-#ifdef HAVE_GTK_RECENT
static gint
compare_recent_items (GtkRecentInfo *a, GtkRecentInfo *b)
{
return 0;
}
-#endif /* HAVE_GTK_RECENT */
/*
* Doubles underscore to avoid spurious menu accels.
static void
ev_window_setup_recent (EvWindow *ev_window)
{
-#ifdef HAVE_GTK_RECENT
GList *items, *l;
guint n_items = 0;
const gchar *evince = g_get_application_name ();
g_list_foreach (items, (GFunc) gtk_recent_info_unref, NULL);
g_list_free (items);
-#else /* HAVE_GTK_RECENT */
- ev_window->priv->recent_view = egg_recent_view_uimanager_new (ev_window->priv->ui_manager,
- "/MainMenu/FileMenu/RecentFilesMenu",
- G_CALLBACK (ev_window_cmd_recent_file_activate),
- ev_window);
-
- egg_recent_view_uimanager_show_icons (EGG_RECENT_VIEW_UIMANAGER (ev_window->priv->recent_view), FALSE);
-
- egg_recent_view_set_model (EGG_RECENT_VIEW (ev_window->priv->recent_view),
- ev_application_get_recent_model (EV_APP));
-
- egg_recent_view_uimanager_set_trailing_sep (ev_window->priv->recent_view, TRUE);
-
- g_signal_connect (ev_window->priv->recent_view, "activate",
- G_CALLBACK (ev_window_cmd_recent_file_activate), ev_window);
-#endif /* HAVE_GTK_RECENT */
}
static gint
}
static void
-file_save_dialog_response_cb (GtkWidget *fc,
- gint response_id,
- EvWindow *ev_window)
+ev_window_clear_save_job (EvWindow *ev_window)
{
- gchar *uri;
- gchar *local_uri;
- gint fd;
- gchar *filename;
- gchar *tmp_filename;
- GError *error = NULL;
-
- if (response_id != GTK_RESPONSE_OK) {
- gtk_widget_destroy (fc);
- return;
+ if (ev_window->priv->save_job != NULL) {
+ if (!ev_window->priv->save_job->finished)
+ ev_job_queue_remove_job (ev_window->priv->save_job);
+
+ g_signal_handlers_disconnect_by_func (ev_window->priv->save_job,
+ ev_window_save_job_cb,
+ ev_window);
+ g_object_unref (ev_window->priv->save_job);
+ ev_window->priv->save_job = NULL;
}
+}
- uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));
-
- filename = ev_tmp_filename ("saveacopy");
- tmp_filename = g_strdup_printf ("%s.XXXXXX", filename);
- g_free (filename);
-
- fd = g_mkstemp (tmp_filename);
- if (fd == -1) {
+static void
+ev_window_save_job_cb (EvJobSave *job,
+ EvWindow *window)
+{
+ if (job->error) {
gchar *msg;
- gchar *display_name;
- gint save_errno = errno;
- display_name = g_filename_display_name (tmp_filename);
- g_set_error (&error,
- G_FILE_ERROR,
- g_file_error_from_errno (save_errno),
- _("Failed to create file “%s”: %s"),
- display_name, g_strerror (save_errno));
- g_free (display_name);
-
- msg = g_strdup_printf (_("The file could not be saved as “%s”."), uri);
- ev_window_error_dialog (GTK_WINDOW (ev_window), msg, error);
-
- g_free (tmp_filename);
- g_free (uri);
+ msg = g_strdup_printf (_("The file could not be saved as “%s”."), job->uri);
+ ev_window_error_dialog (GTK_WINDOW (window), msg, job->error);
g_free (msg);
- g_error_free (error);
- gtk_widget_destroy (fc);
-
- return;
- }
-
- /* Save document to temp filename */
- local_uri = g_filename_to_uri (tmp_filename, NULL, NULL);
-
- ev_document_doc_mutex_lock ();
- ev_document_save (ev_window->priv->document, local_uri, &error);
- ev_document_doc_mutex_unlock ();
-
- close (fd);
-
- if (!error) {
- /* If original document was compressed,
- * compress it again before saving
- */
- if (g_object_get_data (G_OBJECT (ev_window->priv->document),
- "uri-uncompressed")) {
- EvCompressionType ctype = EV_COMPRESSION_NONE;
- const gchar *ext;
- gchar *uri_comp;
-
- ext = g_strrstr (ev_window->priv->uri, ".gz");
- if (ext && g_ascii_strcasecmp (ext, ".gz") == 0)
- ctype = EV_COMPRESSION_GZIP;
-
- ext = g_strrstr (ev_window->priv->uri, ".bz2");
- if (ext && g_ascii_strcasecmp (ext, ".bz2") == 0)
- ctype = EV_COMPRESSION_BZIP2;
-
- uri_comp = ev_file_compress (local_uri, ctype, &error);
- g_free (local_uri);
- ev_tmp_filename_unlink (tmp_filename);
-
- if (!uri_comp || error) {
- local_uri = NULL;
- } else {
- local_uri = uri_comp;
- }
- }
}
- g_free (tmp_filename);
-
- if (error) {
- gchar *msg;
+ ev_window_clear_save_job (window);
+}
- msg = g_strdup_printf (_("The file could not be saved as “%s”."), uri);
- ev_window_error_dialog (GTK_WINDOW (ev_window), msg, error);
- g_free (uri);
- g_free (msg);
- g_error_free (error);
- g_free (local_uri);
+static void
+file_save_dialog_response_cb (GtkWidget *fc,
+ gint response_id,
+ EvWindow *ev_window)
+{
+ gchar *uri;
+
+ if (response_id != GTK_RESPONSE_OK) {
gtk_widget_destroy (fc);
-
return;
}
-
- if (local_uri) {
- GnomeVFSURI *target_uri;
-
- target_uri = gnome_vfs_uri_new (uri);
- if (gnome_vfs_uri_is_local (target_uri)) {
- /* If target uri is local, just rename local_uri */
- if (gnome_vfs_move (local_uri, uri, TRUE) != GNOME_VFS_OK)
- ev_tmp_uri_unlink (local_uri);
- } else {
- GnomeVFSURI *source_uri;
-
- source_uri = gnome_vfs_uri_new (local_uri);
- ev_window_save_remote (ev_window, source_uri, target_uri);
- gnome_vfs_uri_unref (source_uri);
- }
-
- gnome_vfs_uri_unref (target_uri);
- g_free (local_uri);
- }
+
+ uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));
+
+ ev_window_clear_save_job (ev_window);
+ ev_window->priv->save_job = ev_job_save_new (ev_window->priv->document,
+ uri, ev_window->priv->uri);
+ g_signal_connect (ev_window->priv->save_job, "finished",
+ G_CALLBACK (ev_window_save_job_cb),
+ ev_window);
+ /* The priority doesn't matter for this job */
+ ev_job_queue_add_job (ev_window->priv->save_job, EV_JOB_PRIORITY_LOW);
g_free (uri);
+
gtk_widget_destroy (fc);
}
ranges = g_memdup (page_range, n_ranges * sizeof (GtkPageRange));
}
break;
- default:
+ case GTK_PRINT_PAGES_ALL: {
+ gint n_pages;
+
+ n_pages = ev_page_cache_get_n_pages (ev_page_cache_get (window->priv->document));
+
+ ranges = g_new0 (EvPrintRange, 1);
+
+ ranges->start = 0;
+ ranges->end = n_pages - 1;
+ n_ranges = 1;
+ }
break;
}
ev_view_set_fullscreen (EV_VIEW (window->priv->view), TRUE);
ev_window_update_fullscreen_action (window);
- update_chrome_flag (window, EV_CHROME_FULLSCREEN_TOOLBAR, TRUE);
+ /* If the user doesn't have the main toolbar he/she won't probably want
+ * the toolbar in fullscreen mode. See bug #483048
+ */
+ update_chrome_flag (window, EV_CHROME_FULLSCREEN_TOOLBAR,
+ (window->priv->chrome & EV_CHROME_TOOLBAR) != 0);
update_chrome_visibility (window);
gtk_window_fullscreen (GTK_WINDOW (window));
if (g_file_test (uri, G_FILE_TEST_EXISTS)) {
break;
}
+ g_free (uri);
+ uri = NULL;
}
if (uri == NULL) {
ev_sidebar_thumbnails_refresh (EV_SIDEBAR_THUMBNAILS (window->priv->sidebar_thumbs),
rotation);
+ ev_window_refresh_window_thumbnail (window, rotation);
}
static void
priv->attachment_popup_action_group = NULL;
}
-#ifdef HAVE_GTK_RECENT
if (priv->recent_action_group) {
g_object_unref (priv->recent_action_group);
priv->recent_action_group = NULL;
}
priv->recent_ui_id = 0;
-#else
- if (priv->recent_view) {
- g_object_unref (priv->recent_view);
- priv->recent_view = NULL;
- }
-#endif /* HAVE_GTK_RECENT */
if (priv->page_cache) {
g_signal_handlers_disconnect_by_func (priv->page_cache, page_changed_cb, window);
ev_window_clear_load_job (window);
}
+ if (priv->save_job) {
+ ev_window_clear_save_job (window);
+ }
+
if (priv->thumbnail_job) {
ev_window_clear_thumbnail_job (window);
}
/* Edit menu */
{ "EditCopy", GTK_STOCK_COPY, NULL, "<control>C", NULL,
G_CALLBACK (ev_window_cmd_edit_copy) },
-#ifdef HAVE_GTK_RECENT
{ "EditSelectAll", GTK_STOCK_SELECT_ALL, N_("Select _All"), "<control>A", NULL,
-#else
- { "EditSelectAll", NULL, N_("Select _All"), "<control>A", NULL,
-#endif /* HAVE_GTK_RECENT */
G_CALLBACK (ev_window_cmd_edit_select_all) },
{ "EditFind", GTK_STOCK_FIND, N_("_Find..."), "<control>F",
N_("Find a word or phrase in the document"),
{ "ViewFullscreen", GTK_STOCK_FULLSCREEN, N_("_Fullscreen"), "F11",
N_("Expand the window to fill the screen"),
G_CALLBACK (ev_window_cmd_view_fullscreen) },
- { "ViewPresentation", EV_STOCK_RUN_PRESENTATION, N_("_Presentation"), "F5",
+ { "ViewPresentation", EV_STOCK_RUN_PRESENTATION, N_("Pre_sentation"), "F5",
N_("Run document as a presentation"),
G_CALLBACK (ev_window_cmd_view_presentation) },
{ "ViewBestFit", EV_STOCK_ZOOM_PAGE, N_("_Best Fit"), NULL,
G_CALLBACK (navigation_action_activate_link_cb), window);
gtk_action_group_add_action (group, action);
g_object_unref (action);
+
+ action = g_object_new (EV_TYPE_OPEN_RECENT_ACTION,
+ "name", "FileOpenRecent",
+ "label", _("_Open..."),
+ "tooltip", _("Open an existing document"),
+ "stock_id", GTK_STOCK_OPEN,
+ NULL);
+ g_signal_connect (action, "activate",
+ G_CALLBACK (ev_window_cmd_file_open), window);
+ g_signal_connect (action, "item_activated",
+ G_CALLBACK (ev_window_open_recent_action_item_activated),
+ window);
+ gtk_action_group_add_action (group, action);
+ g_object_unref (action);
}
static void
allowing to launch executables is a good idea though. -- marco */
}
-static gboolean
-uri_is_valid (const gchar *uri)
-{
- gchar *p = (gchar *) uri;
-
- if (!p || !g_ascii_isalpha (*p))
- return FALSE;
-
- p++;
- while (g_ascii_isalnum (*p))
- p++;
-
- return (g_ascii_strncasecmp (p, "://", strlen ("://")) == 0);
-}
-
static void
launch_external_uri (EvWindow *window, EvLinkAction *action)
{
const gchar *uri = ev_link_action_get_uri (action);
-
- if (!uri_is_valid (uri)) {
- GtkWidget *dialog;
+ GnomeVFSResult result = gnome_vfs_url_show (uri);
+ GtkWidget *dialog;
+ gchar* message = NULL;
+ switch(result) {
+ case GNOME_VFS_OK:
+ break;
+ case GNOME_VFS_ERROR_BAD_PARAMETERS:
+ message = _("Invalid URI: “%s”");
+ break;
+ case GNOME_VFS_ERROR_NOT_SUPPORTED:
+ message = _("Unsupported URI: “%s”");
+ break;
+ default:
+ message = _("Unknown error");
+ }
+ if(message) {
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
_("Unable to open external link"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("Invalid URI: “%s”"), uri);
+ message, uri);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_widget_show (dialog);
- return;
}
-
- gnome_vfs_url_show (uri);
+ return;
}
static void
g_error_free (error);
}
-#ifdef HAVE_GTK_RECENT
#if GTK_CHECK_VERSION(2,11,4)
ev_window->priv->recent_manager = gtk_recent_manager_get_default ();
#else
"changed",
G_CALLBACK (ev_window_setup_recent),
ev_window);
-#endif /* HAVE_GTK_RECENT */
-
+
ev_window->priv->menubar =
gtk_ui_manager_get_widget (ev_window->priv->ui_manager,
"/MainMenu");
ev_window->priv->menubar,
FALSE, FALSE, 0);
-
ev_window->priv->toolbar = GTK_WIDGET
(g_object_new (EGG_TYPE_EDITABLE_TOOLBAR,
"ui-manager", ev_window->priv->ui_manager,