Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
EvBrowserPluginToolbar.cpp File Reference
#include "config.h"
#include "EvBrowserPluginToolbar.h"
#include "ev-page-action-widget.h"
#include "ev-search-box.h"
#include <glib/gi18n-lib.h>
+ Include dependency graph for EvBrowserPluginToolbar.cpp:

Go to the source code of this file.

Data Structures

struct  _EvBrowserPluginToolbarPrivate
 
class  SignalBlocker
 

Enumerations

enum  { PROP_0, PROP_PLUGIN }
 

Functions

static void goToPreviousPage (EvBrowserPluginToolbar *toolbar)
 
static void goToNextPage (EvBrowserPluginToolbar *toolbar)
 
static void activateLink (EvBrowserPluginToolbar *toolbar, EvLink *link)
 
static void toggleContinuous (EvBrowserPluginToolbar *toolbar)
 
static void toggleDual (EvBrowserPluginToolbar *toolbar)
 
static void zoomIn (EvBrowserPluginToolbar *toolbar)
 
static void zoomOut (EvBrowserPluginToolbar *toolbar)
 
static void zoomFitPageToggled (EvBrowserPluginToolbar *toolbar)
 
static void zoomFitWidthToggled (EvBrowserPluginToolbar *toolbar)
 
static void zoomAutomaticToggled (EvBrowserPluginToolbar *toolbar)
 
static void printDocument (EvBrowserPluginToolbar *toolbar)
 
static void downloadDocument (EvBrowserPluginToolbar *toolbar)
 
static void searchPopoverClosed (EvBrowserPluginToolbar *toolbar)
 
static void searchStarted (EvBrowserPluginToolbar *toolbar, EvJobFind *job)
 
static void searchCleared (EvBrowserPluginToolbar *toolbar)
 
static void searchNext (EvBrowserPluginToolbar *toolbar)
 
static void searchPrevious (EvBrowserPluginToolbar *toolbar)
 
static void toggleSearch (EvBrowserPluginToolbar *toolbar)
 
static void continuousChanged (EvDocumentModel *model, GParamSpec *, EvBrowserPluginToolbar *toolbar)
 
static void dualPageChanged (EvDocumentModel *model, GParamSpec *, EvBrowserPluginToolbar *toolbar)
 
static void sizingModeChanged (EvDocumentModel *model, GParamSpec *, EvBrowserPluginToolbar *toolbar)
 
static void evBrowserPluginToolbarSetProperty (GObject *object, guint propID, const GValue *value, GParamSpec *paramSpec)
 
static GtkWidget * createButton (EvBrowserPluginToolbar *toolbar, const char *iconName, const char *description, GCallback callback)
 
static GtkWidget * createToggleButton (EvBrowserPluginToolbar *toolbar, const char *iconName, const char *description, bool initialState, GCallback callback)
 
static GtkWidget * createMenuButton (EvBrowserPluginToolbar *toolbar, const gchar *iconName, GtkWidget *menu, GtkAlign menuAlign)
 
static GtkWidget * createButtonGroup (EvBrowserPluginToolbar *toolbar)
 
static GtkWidget * createSizingModeMenu (EvBrowserPluginToolbar *toolbar)
 
static void evBrowserPluginToolbarConstructed (GObject *object)
 
static void evBrowserPluginToolbarDispose (GObject *object)
 
static void ev_browser_plugin_toolbar_class_init (EvBrowserPluginToolbarClass *klass)
 
static void ev_browser_plugin_toolbar_init (EvBrowserPluginToolbar *toolbar)
 
GtkWidget * ev_browser_plugin_toolbar_new (EvBrowserPlugin *plugin)
 

Enumeration Type Documentation

anonymous enum
Enumerator
PROP_0 
PROP_PLUGIN 

Definition at line 26 of file EvBrowserPluginToolbar.cpp.

26  {
27  PROP_0,
29 };

Function Documentation

static void activateLink ( EvBrowserPluginToolbar toolbar,
EvLink link 
)
static

Definition at line 55 of file EvBrowserPluginToolbar.cpp.

56 {
57  toolbar->priv->plugin->activateLink(link);
58 }

+ Here is the caller graph for this function:

static void continuousChanged ( EvDocumentModel model,
GParamSpec *  ,
EvBrowserPluginToolbar toolbar 
)
static

Definition at line 184 of file EvBrowserPluginToolbar.cpp.

185 {
186  SignalBlocker blocker(toolbar->priv->continuousToggleButton, toggleContinuous, toolbar);
187  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->priv->continuousToggleButton),
188  toolbar->priv->plugin->isContinuous());
189 }

+ Here is the caller graph for this function:

static GtkWidget* createButton ( EvBrowserPluginToolbar toolbar,
const char *  iconName,
const char *  description,
GCallback  callback 
)
static

Definition at line 232 of file EvBrowserPluginToolbar.cpp.

233 {
234  GtkWidget *button = gtk_button_new();
235 
236  gtk_widget_set_valign(button, GTK_ALIGN_CENTER);
237  gtk_widget_set_tooltip_text(button, description);
238  gtk_button_set_image(GTK_BUTTON(button), gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_MENU));
239  gtk_button_set_label(GTK_BUTTON(button), nullptr);
240  gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE);
241  g_signal_connect_swapped(button, "clicked", callback, toolbar);
242 
243  return button;
244 }

+ Here is the caller graph for this function:

static GtkWidget* createButtonGroup ( EvBrowserPluginToolbar toolbar)
static

Definition at line 273 of file EvBrowserPluginToolbar.cpp.

274 {
275  GtkWidget *box = gtk_box_new(gtk_orientable_get_orientation(GTK_ORIENTABLE(toolbar)), 0);
276 
277  GtkStyleContext *styleContext = gtk_widget_get_style_context(box);
278  gtk_style_context_add_class(styleContext, GTK_STYLE_CLASS_RAISED);
279  gtk_style_context_add_class(styleContext, GTK_STYLE_CLASS_LINKED);
280 
281  return box;
282 }

+ Here is the caller graph for this function:

static GtkWidget* createMenuButton ( EvBrowserPluginToolbar toolbar,
const gchar *  iconName,
GtkWidget *  menu,
GtkAlign  menuAlign 
)
static

Definition at line 261 of file EvBrowserPluginToolbar.cpp.

262 {
263  GtkWidget *button = gtk_menu_button_new();
264 
265  gtk_widget_set_valign(button, GTK_ALIGN_CENTER);
266  gtk_button_set_image(GTK_BUTTON(button), gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_MENU));
267  gtk_widget_set_halign(menu, menuAlign);
268  gtk_menu_button_set_popup(GTK_MENU_BUTTON(button), menu);
269 
270  return button;
271 }

+ Here is the caller graph for this function:

static GtkWidget* createSizingModeMenu ( EvBrowserPluginToolbar toolbar)
static

Definition at line 284 of file EvBrowserPluginToolbar.cpp.

285 {
286  GtkWidget *menu = gtk_menu_new();
287 
288  GtkWidget *menuItem = gtk_check_menu_item_new_with_mnemonic(_("Fit Pa_ge"));
289  toolbar->priv->zoomFitPageRadioButton = menuItem;
290  gtk_check_menu_item_set_draw_as_radio(GTK_CHECK_MENU_ITEM(menuItem), TRUE);
291  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuItem),
292  toolbar->priv->plugin->sizingMode() == EV_SIZING_FIT_PAGE);
293  g_signal_connect_swapped(menuItem, "toggled", G_CALLBACK(zoomFitPageToggled), toolbar);
294  gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuItem);
295  gtk_widget_show(menuItem);
296 
297  menuItem = gtk_check_menu_item_new_with_mnemonic(_("Fit _Width"));
298  toolbar->priv->zoomFitWidthRadioButton = menuItem;
299  gtk_check_menu_item_set_draw_as_radio(GTK_CHECK_MENU_ITEM(menuItem), TRUE);
300  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuItem),
301  toolbar->priv->plugin->sizingMode() == EV_SIZING_FIT_WIDTH);
302  g_signal_connect_swapped(menuItem, "toggled", G_CALLBACK(zoomFitWidthToggled), toolbar);
303  gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuItem);
304  gtk_widget_show(menuItem);
305 
306  menuItem = gtk_check_menu_item_new_with_mnemonic(_("_Automatic"));
307  toolbar->priv->zoomAutomaticRadioButton = menuItem;
308  gtk_check_menu_item_set_draw_as_radio(GTK_CHECK_MENU_ITEM(menuItem), TRUE);
309  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuItem),
310  toolbar->priv->plugin->sizingMode() == EV_SIZING_AUTOMATIC);
311  g_signal_connect_swapped(menuItem, "toggled", G_CALLBACK(zoomAutomaticToggled), toolbar);
312  gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuItem);
313  gtk_widget_show(menuItem);
314 
315  g_signal_connect(toolbar->priv->plugin->model(), "notify::sizing-mode",
316  G_CALLBACK(sizingModeChanged), toolbar);
317 
318  return menu;
319 }

+ Here is the caller graph for this function:

static GtkWidget* createToggleButton ( EvBrowserPluginToolbar toolbar,
const char *  iconName,
const char *  description,
bool  initialState,
GCallback  callback 
)
static

Definition at line 246 of file EvBrowserPluginToolbar.cpp.

247 {
248  GtkWidget *button = gtk_toggle_button_new();
249 
250  gtk_widget_set_valign(button, GTK_ALIGN_CENTER);
251  gtk_widget_set_tooltip_text(button, description);
252  gtk_button_set_image(GTK_BUTTON(button), gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_MENU));
253  gtk_button_set_label(GTK_BUTTON(button), nullptr);
254  gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE);
255  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), initialState);
256  g_signal_connect_swapped(button, "toggled", callback, toolbar);
257 
258  return button;
259 }

+ Here is the caller graph for this function:

static void downloadDocument ( EvBrowserPluginToolbar toolbar)
static

Definition at line 103 of file EvBrowserPluginToolbar.cpp.

104 {
105  toolbar->priv->plugin->download();
106 }

+ Here is the caller graph for this function:

static void dualPageChanged ( EvDocumentModel model,
GParamSpec *  ,
EvBrowserPluginToolbar toolbar 
)
static

Definition at line 191 of file EvBrowserPluginToolbar.cpp.

192 {
193  SignalBlocker blocker(toolbar->priv->dualToggleButton, toggleDual, toolbar);
194  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->priv->dualToggleButton),
195  toolbar->priv->plugin->isDual());
196 }

+ Here is the caller graph for this function:

static void ev_browser_plugin_toolbar_class_init ( EvBrowserPluginToolbarClass klass)
static

Definition at line 470 of file EvBrowserPluginToolbar.cpp.

471 {
472  GObjectClass *gObjectClass = G_OBJECT_CLASS(klass);
473  gObjectClass->set_property = evBrowserPluginToolbarSetProperty;
474  gObjectClass->constructed = evBrowserPluginToolbarConstructed;
475  gObjectClass->dispose = evBrowserPluginToolbarDispose;
476 
477  g_object_class_install_property(gObjectClass,
478  PROP_PLUGIN,
479  g_param_spec_pointer("plugin",
480  "Plugin",
481  "The plugin",
482  static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)));
483 
484  g_type_class_add_private(gObjectClass, sizeof(EvBrowserPluginToolbarPrivate));
485 }
static void ev_browser_plugin_toolbar_init ( EvBrowserPluginToolbar toolbar)
static

Definition at line 487 of file EvBrowserPluginToolbar.cpp.

488 {
489  toolbar->priv = G_TYPE_INSTANCE_GET_PRIVATE(toolbar, EV_TYPE_BROWSER_PLUGIN_TOOLBAR, EvBrowserPluginToolbarPrivate);
490 }
GtkWidget* ev_browser_plugin_toolbar_new ( EvBrowserPlugin plugin)

Definition at line 492 of file EvBrowserPluginToolbar.cpp.

493 {
494  return GTK_WIDGET(g_object_new(EV_TYPE_BROWSER_PLUGIN_TOOLBAR, "plugin", plugin, nullptr));
495 }

+ Here is the caller graph for this function:

static void evBrowserPluginToolbarConstructed ( GObject *  object)
static

Definition at line 321 of file EvBrowserPluginToolbar.cpp.

322 {
323  G_OBJECT_CLASS(ev_browser_plugin_toolbar_parent_class)->constructed(object);
324 
326  bool rtl = gtk_widget_get_direction(GTK_WIDGET(toolbar)) == GTK_TEXT_DIR_RTL;
327 
328  GtkWidget *hbox = createButtonGroup(toolbar);
329 
330  // Navigation buttons
331  GtkWidget *button = createButton(toolbar, "go-up-symbolic", _("Go to the previous page"), G_CALLBACK(goToPreviousPage));
332  gtk_container_add(GTK_CONTAINER(hbox), button);
333  gtk_widget_show(button);
334 
335  button = createButton(toolbar, "go-down-symbolic", _("Go to the next page"), G_CALLBACK(goToNextPage));
336  gtk_container_add(GTK_CONTAINER(hbox), button);
337  gtk_widget_show(button);
338 
339  GtkWidget *toolItem = GTK_WIDGET(gtk_tool_item_new());
340  if (rtl)
341  gtk_widget_set_margin_left(toolItem, 12);
342  else
343  gtk_widget_set_margin_right(toolItem, 12);
344  gtk_container_add(GTK_CONTAINER(toolItem), hbox);
345  gtk_widget_show(hbox);
346 
347  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
348  gtk_widget_show(toolItem);
349 
350  // Page Selector
351  toolItem = GTK_WIDGET(g_object_new(EV_TYPE_PAGE_ACTION_WIDGET, nullptr));
353  g_signal_connect_swapped(toolItem, "activate-link", G_CALLBACK(activateLink), toolbar);
354  if (rtl)
355  gtk_widget_set_margin_left(toolItem, 12);
356  else
357  gtk_widget_set_margin_right(toolItem, 12);
358  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
359  gtk_widget_show(toolItem);
360 
361  // Search.
362  button = createToggleButton(toolbar, "edit-find-symbolic", _("Find a word or phrase in the document"),
363  false, G_CALLBACK(toggleSearch));
364  toolbar->priv->searchToggleButton = button;
365  toolItem = GTK_WIDGET(gtk_tool_item_new());
366  gtk_container_add(GTK_CONTAINER(toolItem), button);
367  gtk_widget_show(button);
368 
369  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
370  gtk_widget_show(toolItem);
371 
372  // Separator
373  toolItem = GTK_WIDGET(gtk_tool_item_new());
374  gtk_tool_item_set_expand(GTK_TOOL_ITEM(toolItem), TRUE);
375  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
376  gtk_widget_show(toolItem);
377 
378  // View mode
379  hbox = createButtonGroup(toolbar);
380 
381  button = createToggleButton(toolbar, "view-continuous-symbolic", _("Show the entire document"),
382  toolbar->priv->plugin->isContinuous(), G_CALLBACK(toggleContinuous));
383  toolbar->priv->continuousToggleButton = button;
384  g_signal_connect(toolbar->priv->plugin->model(), "notify::continuous",
385  G_CALLBACK(continuousChanged), toolbar);
386  gtk_container_add(GTK_CONTAINER(hbox), button);
387  gtk_widget_show(button);
388 
389  button = createToggleButton(toolbar, "view-dual-symbolic", _("Show two pages at once"),
390  toolbar->priv->plugin->isDual(), G_CALLBACK(toggleDual));
391  toolbar->priv->dualToggleButton = button;
392  g_signal_connect(toolbar->priv->plugin->model(), "notify::dual-page",
393  G_CALLBACK(dualPageChanged), toolbar);
394  gtk_container_add(GTK_CONTAINER(hbox), button);
395  gtk_widget_show(button);
396 
397  toolItem = GTK_WIDGET(gtk_tool_item_new());
398  if (rtl)
399  gtk_widget_set_margin_left(toolItem, 12);
400  else
401  gtk_widget_set_margin_right(toolItem, 12);
402  gtk_container_add(GTK_CONTAINER(toolItem), hbox);
403  gtk_widget_show(hbox);
404 
405  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
406  gtk_widget_show(toolItem);
407 
408  // Zoom
409  hbox = createButtonGroup(toolbar);
410 
411  button = createButton(toolbar, "zoom-in-symbolic", _("Enlarge the document"), G_CALLBACK(zoomIn));
412  gtk_container_add(GTK_CONTAINER(hbox), button);
413  gtk_widget_show(button);
414 
415  button = createButton(toolbar, "zoom-out-symbolic", _("Shrink the document"), G_CALLBACK(zoomOut));
416  gtk_container_add(GTK_CONTAINER(hbox), button);
417  gtk_widget_show(button);
418 
419  button = createMenuButton(toolbar, "go-down-symbolic", createSizingModeMenu(toolbar), GTK_ALIGN_END);
420  gtk_container_add(GTK_CONTAINER(hbox), button);
421  gtk_widget_show(button);
422 
423  toolItem = GTK_WIDGET(gtk_tool_item_new());
424  if (rtl)
425  gtk_widget_set_margin_left(toolItem, 12);
426  else
427  gtk_widget_set_margin_right(toolItem, 12);
428  gtk_container_add(GTK_CONTAINER(toolItem), hbox);
429  gtk_widget_show(hbox);
430 
431  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
432  gtk_widget_show(toolItem);
433 
434  // Actions
435  // Only add download button if browser is Epiphany for now.
436  if (toolbar->priv->plugin->canDownload()) {
437  button = createButton(toolbar, "folder-download-symbolic", _("Download document"), G_CALLBACK(downloadDocument));
438  toolItem = GTK_WIDGET(gtk_tool_item_new());
439  gtk_container_add(GTK_CONTAINER(toolItem), button);
440  gtk_widget_show(button);
441  if (rtl)
442  gtk_widget_set_margin_left(toolItem, 6);
443  else
444  gtk_widget_set_margin_right(toolItem, 6);
445 
446  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
447  gtk_widget_show(toolItem);
448  }
449 
450  button = createButton(toolbar, "printer-symbolic", _("Print document"), G_CALLBACK(printDocument));
451  toolItem = GTK_WIDGET(gtk_tool_item_new());
452  gtk_container_add(GTK_CONTAINER(toolItem), button);
453  gtk_widget_show(button);
454 
455  gtk_container_add(GTK_CONTAINER(toolbar), toolItem);
456  gtk_widget_show(toolItem);
457 }

+ Here is the caller graph for this function:

static void evBrowserPluginToolbarDispose ( GObject *  object)
static

Definition at line 459 of file EvBrowserPluginToolbar.cpp.

460 {
462  if (toolbar->priv->searchPopover) {
463  gtk_widget_destroy(toolbar->priv->searchPopover);
464  toolbar->priv->searchPopover = nullptr;
465  }
466 
467  G_OBJECT_CLASS(ev_browser_plugin_toolbar_parent_class)->dispose(object);
468 }

+ Here is the caller graph for this function:

static void evBrowserPluginToolbarSetProperty ( GObject *  object,
guint  propID,
const GValue *  value,
GParamSpec *  paramSpec 
)
static

Definition at line 219 of file EvBrowserPluginToolbar.cpp.

220 {
222 
223  switch (propID) {
224  case PROP_PLUGIN:
225  toolbar->priv->plugin = static_cast<EvBrowserPlugin *>(g_value_get_pointer(value));
226  break;
227  default:
228  G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propID, paramSpec);
229  }
230 }

+ Here is the caller graph for this function:

static void goToNextPage ( EvBrowserPluginToolbar toolbar)
static

Definition at line 50 of file EvBrowserPluginToolbar.cpp.

51 {
52  toolbar->priv->plugin->goToNextPage();
53 }

+ Here is the caller graph for this function:

static void goToPreviousPage ( EvBrowserPluginToolbar toolbar)
static

Definition at line 45 of file EvBrowserPluginToolbar.cpp.

46 {
47  toolbar->priv->plugin->goToPreviousPage();
48 }

+ Here is the caller graph for this function:

static void printDocument ( EvBrowserPluginToolbar toolbar)
static

Definition at line 98 of file EvBrowserPluginToolbar.cpp.

99 {
100  toolbar->priv->plugin->print();
101 }

+ Here is the caller graph for this function:

static void searchCleared ( EvBrowserPluginToolbar toolbar)
static

Definition at line 119 of file EvBrowserPluginToolbar.cpp.

120 {
121  toolbar->priv->plugin->clearSearch();
122 }

+ Here is the caller graph for this function:

static void searchNext ( EvBrowserPluginToolbar toolbar)
static

Definition at line 124 of file EvBrowserPluginToolbar.cpp.

125 {
126  toolbar->priv->plugin->search(EvBrowserPlugin::SearchDirection::Next);
127 }

+ Here is the caller graph for this function:

static void searchPopoverClosed ( EvBrowserPluginToolbar toolbar)
static

Definition at line 108 of file EvBrowserPluginToolbar.cpp.

109 {
110  if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->priv->searchToggleButton)))
111  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->priv->searchToggleButton), FALSE);
112 }

+ Here is the caller graph for this function:

static void searchPrevious ( EvBrowserPluginToolbar toolbar)
static

Definition at line 129 of file EvBrowserPluginToolbar.cpp.

130 {
131  toolbar->priv->plugin->search(EvBrowserPlugin::SearchDirection::Previous);
132 }

+ Here is the caller graph for this function:

static void searchStarted ( EvBrowserPluginToolbar toolbar,
EvJobFind job 
)
static

Definition at line 114 of file EvBrowserPluginToolbar.cpp.

115 {
116  toolbar->priv->plugin->search(job);
117 }

+ Here is the caller graph for this function:

static void sizingModeChanged ( EvDocumentModel model,
GParamSpec *  ,
EvBrowserPluginToolbar toolbar 
)
static

Definition at line 198 of file EvBrowserPluginToolbar.cpp.

199 {
200  {
201  SignalBlocker fitPageBlocker(toolbar->priv->zoomFitPageRadioButton, zoomFitPageToggled, toolbar);
202  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toolbar->priv->zoomFitPageRadioButton),
203  toolbar->priv->plugin->sizingMode() == EV_SIZING_FIT_PAGE);
204  }
205 
206  {
207  SignalBlocker fitWidthBlocker(toolbar->priv->zoomFitPageRadioButton, zoomFitWidthToggled, toolbar);
208  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toolbar->priv->zoomFitWidthRadioButton),
209  toolbar->priv->plugin->sizingMode() == EV_SIZING_FIT_WIDTH);
210  }
211 
212  {
213  SignalBlocker automaticBlocker(toolbar->priv->zoomAutomaticRadioButton, zoomAutomaticToggled, toolbar);
214  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toolbar->priv->zoomAutomaticRadioButton),
215  toolbar->priv->plugin->sizingMode() == EV_SIZING_AUTOMATIC);
216  }
217 }

+ Here is the caller graph for this function:

static void toggleContinuous ( EvBrowserPluginToolbar toolbar)
static

Definition at line 60 of file EvBrowserPluginToolbar.cpp.

61 {
62  toolbar->priv->plugin->toggleContinuous();
63 }

+ Here is the caller graph for this function:

static void toggleDual ( EvBrowserPluginToolbar toolbar)
static

Definition at line 65 of file EvBrowserPluginToolbar.cpp.

66 {
67  toolbar->priv->plugin->toggleDual();
68 }

+ Here is the caller graph for this function:

static void toggleSearch ( EvBrowserPluginToolbar toolbar)
static

Definition at line 134 of file EvBrowserPluginToolbar.cpp.

135 {
136  if (!toolbar->priv->searchPopover) {
137  toolbar->priv->searchPopover = gtk_popover_new(toolbar->priv->searchToggleButton);
138  gtk_popover_set_position (GTK_POPOVER (toolbar->priv->searchPopover), GTK_POS_BOTTOM);
139  g_signal_connect_swapped(toolbar->priv->searchPopover, "closed", G_CALLBACK(searchPopoverClosed), toolbar);
140  GtkWidget *searchBox = ev_search_box_new(toolbar->priv->plugin->model());
141  g_signal_connect_swapped(searchBox, "started", G_CALLBACK(searchStarted), toolbar);
142  g_signal_connect_swapped(searchBox, "cleared", G_CALLBACK(searchCleared), toolbar);
143  g_signal_connect_swapped(searchBox, "next", G_CALLBACK(searchNext), toolbar);
144  g_signal_connect_swapped(searchBox, "previous", G_CALLBACK(searchPrevious), toolbar);
145  gtk_container_add(GTK_CONTAINER(toolbar->priv->searchPopover), searchBox);
146  gtk_widget_show(searchBox);
147  }
148 
149  if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->priv->searchToggleButton))) {
150  gtk_widget_show(toolbar->priv->searchPopover);
151  toolbar->priv->plugin->setSearchModeEnabled(true);
152 
153  GtkSearchEntry *entry = ev_search_box_get_entry(EV_SEARCH_BOX(gtk_bin_get_child(GTK_BIN(toolbar->priv->searchPopover))));
154  const char *searchString = gtk_entry_get_text(GTK_ENTRY(entry));
155  if (searchString && searchString[0])
156  toolbar->priv->plugin->restartSearch();
157  } else {
158  gtk_widget_hide(toolbar->priv->searchPopover);
159  toolbar->priv->plugin->setSearchModeEnabled(false);
160  }
161 }

+ Here is the caller graph for this function:

static void zoomAutomaticToggled ( EvBrowserPluginToolbar toolbar)
static

Definition at line 92 of file EvBrowserPluginToolbar.cpp.

93 {
94  if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(toolbar->priv->zoomAutomaticRadioButton)))
96 }

+ Here is the caller graph for this function:

static void zoomFitPageToggled ( EvBrowserPluginToolbar toolbar)
static

Definition at line 80 of file EvBrowserPluginToolbar.cpp.

81 {
82  if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(toolbar->priv->zoomFitPageRadioButton)))
84 }

+ Here is the caller graph for this function:

static void zoomFitWidthToggled ( EvBrowserPluginToolbar toolbar)
static

Definition at line 86 of file EvBrowserPluginToolbar.cpp.

87 {
88  if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(toolbar->priv->zoomFitWidthRadioButton)))
90 }

+ Here is the caller graph for this function:

static void zoomIn ( EvBrowserPluginToolbar toolbar)
static

Definition at line 70 of file EvBrowserPluginToolbar.cpp.

71 {
72  toolbar->priv->plugin->zoomIn();
73 }

+ Here is the caller graph for this function:

static void zoomOut ( EvBrowserPluginToolbar toolbar)
static

Definition at line 75 of file EvBrowserPluginToolbar.cpp.

76 {
77  toolbar->priv->plugin->zoomOut();
78 }

+ Here is the caller graph for this function: