Changeset 277 for trunk/src/gtk/MainView.cxx
- Timestamp:
- 06/11/07 09:12:09 (18 months ago)
- Files:
-
- 1 modified
-
trunk/src/gtk/MainView.cxx (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gtk/MainView.cxx
r263 r277 77 77 static void main_window_zoom_out_cb (GtkWidget *, gpointer); 78 78 static void main_window_zoom_width_cb (GtkToggleAction *, gpointer); 79 static void main_window_page_mode_scroll_cb (GtkToggleAction *, gpointer); 80 static void main_window_page_mode_text_cb (GtkToggleAction *, gpointer); 79 81 80 82 #if defined (HAVE_CUPS) … … 186 188 { "ZoomWidth", EPDFVIEW_STOCK_ZOOM_WIDTH, N_("Zoom to _Width"), NULL, 187 189 N_("Make the current document fill the window width"), 188 G_CALLBACK (main_window_zoom_width_cb), FALSE } 190 G_CALLBACK (main_window_zoom_width_cb), FALSE }, 191 192 { "PageModeScroll", GTK_STOCK_FULLSCREEN, N_("Scroll"), NULL, 193 N_("Mouse scroll page"), 194 G_CALLBACK (main_window_page_mode_scroll_cb), FALSE }, 195 196 { "PageModeText", GTK_STOCK_SELECT_ALL, N_("Select Text"), NULL, 197 N_(" Mouse select text"), 198 G_CALLBACK (main_window_page_mode_text_cb), FALSE }, 189 199 190 200 }; … … 273 283 } 274 284 285 void 286 MainView::activePageModeScroll (gboolean active) 287 { 288 GtkAction *action = 289 gtk_ui_manager_get_action (m_UIManager, "/ToolBar/PageModeScroll"); 290 gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), active); 291 } 292 293 294 void 295 MainView::activePageModeText (gboolean active) 296 { 297 GtkAction *action = 298 gtk_ui_manager_get_action (m_UIManager, "/ToolBar/PageModeText"); 299 gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), active); 300 } 301 275 302 gchar * 276 303 MainView::openFileDialog (const gchar *lastFolder) … … 1037 1064 } 1038 1065 } 1066 } 1067 1068 void 1069 MainView::copyTextToClibboard(const gchar* text) 1070 { 1071 GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); 1072 gtk_clipboard_set_text(clipboard, text, -1); 1039 1073 } 1040 1074 … … 1417 1451 pter->zoomWidthActivated (gtk_toggle_action_get_active (action)); 1418 1452 } 1453 1454 void 1455 main_window_page_mode_scroll_cb (GtkToggleAction *action, gpointer data) 1456 { 1457 g_assert ( NULL != data && "The data parameter is NULL."); 1458 1459 MainPter *pter = (MainPter *)data; 1460 pter->pageModeScrollActivated (gtk_toggle_action_get_active (action)); 1461 } 1462 1463 void 1464 main_window_page_mode_text_cb (GtkToggleAction *action, gpointer data) 1465 { 1466 g_assert ( NULL != data && "The data parameter is NULL."); 1467 1468 MainPter *pter = (MainPter *)data; 1469 pter->pageModeTextActivated (gtk_toggle_action_get_active (action)); 1470 }
