190 GtkWidget *tool_item;
191 GtkWidget *hbox, *vbox;
194 GMenuModel *bookmarks_submenu_model;
196 G_OBJECT_CLASS (ev_toolbar_parent_class)->constructed (
object);
198 builder = gtk_builder_new_from_resource (
"/org/gnome/evince/gtk/menus.ui");
201 "document-open-symbolic",
202 _(
"Open an existing document"));
204 gtk_container_add (GTK_CONTAINER (ev_toolbar), button);
205 gtk_widget_set_margin_end (button, 6);
210 gtk_widget_set_tooltip_text (tool_item,
_(
"Select page or search in the index"));
211 atk_object_set_name (gtk_widget_get_accessible (tool_item),
_(
"Select page"));
215 gtk_widget_set_margin_end (tool_item, 6);
216 gtk_header_bar_pack_start (GTK_HEADER_BAR (ev_toolbar), tool_item);
221 gtk_widget_set_margin_end (hbox, 6);
222 gtk_header_bar_pack_start (GTK_HEADER_BAR (ev_toolbar), hbox);
226 _(
"Find a word or phrase in the document"));
228 gtk_widget_set_margin_end (button, 6);
229 gtk_header_bar_pack_start (GTK_HEADER_BAR (ev_toolbar), button);
234 _(
"Annotate the document"));
236 gtk_widget_set_margin_end (button, 6);
237 gtk_header_bar_pack_start (GTK_HEADER_BAR (ev_toolbar), button);
240 menu = G_MENU_MODEL (gtk_builder_get_object (builder,
"action-menu"));
242 menu, GTK_ALIGN_END);
243 gtk_widget_set_tooltip_text (button,
_(
"File options"));
244 atk_object_set_name (gtk_widget_get_accessible (button),
_(
"File options"));
247 gtk_header_bar_pack_end (GTK_HEADER_BAR (ev_toolbar), button);
250 menu = G_MENU_MODEL (gtk_builder_get_object (builder,
"view-menu"));
252 menu, GTK_ALIGN_END);
253 gtk_widget_set_tooltip_text (button,
_(
"View options"));
254 atk_object_set_name (gtk_widget_get_accessible (button),
_(
"View options"));
256 gtk_header_bar_pack_end (GTK_HEADER_BAR (ev_toolbar), button);
260 G_MENU (gtk_builder_get_object (builder,
"zoom-menu")));
262 gtk_widget_set_tooltip_text (vbox,
_(
"Select or set the zoom level of the document"));
263 atk_object_set_name (gtk_widget_get_accessible (vbox),
_(
"Set zoom level"));
264 g_signal_connect (vbox,
"activated",
267 gtk_widget_set_margin_end (vbox, 6);
268 gtk_header_bar_pack_end (GTK_HEADER_BAR (ev_toolbar), vbox);
272 g_signal_connect (bookmarks_submenu_model,
"items-changed",
277 g_object_unref (builder);