Changeset 253
- Timestamp:
- 10/16/06 14:49:05 (2 years ago)
- Location:
- trunk
- Files:
-
- 8 modified
-
THANKS (modified) (1 diff)
-
src/IMainView.h (modified) (1 diff)
-
src/MainPter.cxx (modified) (1 diff)
-
src/MainPter.h (modified) (1 diff)
-
src/gtk/MainView.cxx (modified) (7 diffs)
-
src/gtk/MainView.h (modified) (1 diff)
-
tests/DumbMainView.cxx (modified) (1 diff)
-
tests/DumbMainView.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/THANKS
r252 r253 2 2 contributions: 3 3 4 - Enrico Tröger <enrico.troeger@uvena.de>, for his full screen patch. 4 5 - Igor Vagulin <igor_vagulin@mail.ru>, for his Russian translation. 5 6 - LoneFox <>, for his patches. -
trunk/src/IMainView.h
r227 r253 356 356 357 357 /// 358 /// @brief Sets the view to full screen. 359 /// 360 /// @param fullScreen @a TRUE if the view should go full screen, 361 /// @a FALSE otherwise. 362 /// 363 virtual void setFullScreen (gboolean fullScreen) = 0; 364 365 /// 358 366 /// @brief Sets the text for the number of pages. 359 367 /// -
trunk/src/MainPter.cxx
r252 r253 329 329 330 330 /// 331 /// @brief The "Full Screen" action was activated. 332 /// 333 /// @param show TRUE if Full Screen is active, FALSE otherwise. 334 /// 335 void 336 MainPter::fullScreenActivated (gboolean active) 337 { 338 getView ().setFullScreen (active); 339 } 340 341 /// 331 342 /// @brief The "Go To First Page" action was activated. 332 343 /// -
trunk/src/MainPter.h
r245 r253 48 48 void aboutBoxLinkActivated (const gchar *link); 49 49 void findActivated (void); 50 void fullScreenActivated (gboolean active); 50 51 void goToFirstPageActivated (void); 51 52 void goToLastPageActivated (void); -
trunk/src/gtk/MainView.cxx
r251 r253 53 53 gpointer); 54 54 static void main_window_find_cb (GtkWidget *, gpointer); 55 static void main_window_fullscreen_cb (GtkToggleAction *, gpointer); 55 56 static gboolean main_window_moved_or_resized_cb (GtkWidget *, 56 57 GdkEventConfigure *, gpointer); … … 82 83 83 84 // The actions for menus and toolbars. 84 static const GtkActionEntry g_NormalEntries[] = 85 static const GtkActionEntry g_NormalEntries[] = 85 86 { 86 87 { "FileMenu", NULL, N_("_File"), NULL, NULL, NULL }, … … 163 164 static GtkToggleActionEntry g_ToggleEntries[] = 164 165 { 166 { "FullScreen", NULL, N_("F_ull screen"), NULL, 167 N_("Toggle full screen window"), 168 G_CALLBACK (main_window_fullscreen_cb), FALSE }, 169 165 170 { "ShowToolBar", NULL, N_("Show _Toolbar"), NULL, 166 171 N_("Show or hide the toolbar"), 167 172 G_CALLBACK (main_window_show_toolbar_cb), TRUE }, 173 168 174 { "ShowStatusBar", NULL, N_("Show _Statusbar"), NULL, 169 175 N_("Show or hide the statusbar"), 170 176 G_CALLBACK (main_window_show_statusbar_cb), TRUE }, 177 171 178 { "ShowIndex", NULL, N_("Show I_ndex"), "F9", 172 179 N_("Show or hide the document's outline"), … … 568 575 config.getWindowHeight ()); 569 576 gtk_widget_show (m_MainWindow); 570 gtk_window_move (GTK_WINDOW (m_MainWindow), 577 gtk_window_move (GTK_WINDOW (m_MainWindow), 571 578 config.getWindowX (), config.getWindowY ()); 572 579 } … … 598 605 gtk_widget_hide (m_Sidebar); 599 606 } 600 GtkAction *showIndex = 601 gtk_ui_manager_get_action (m_UIManager, 607 GtkAction *showIndex = 608 gtk_ui_manager_get_action (m_UIManager, 602 609 "/MenuBar/ViewMenu/ShowIndex"); 603 610 gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (showIndex), show); … … 629 636 } 630 637 gdk_flush (); 638 } 639 640 void 641 MainView::setFullScreen (gboolean fullScreen) 642 { 643 if ( fullScreen ) 644 { 645 gtk_window_fullscreen (GTK_WINDOW (m_MainWindow)); 646 } 647 else 648 { 649 gtk_window_unfullscreen (GTK_WINDOW (m_MainWindow)); 650 } 631 651 } 632 652 … … 1059 1079 1060 1080 /// 1081 /// @brief The user tried to switch to full screen. 1082 /// 1083 void 1084 main_window_fullscreen_cb (GtkToggleAction *action, gpointer data) 1085 { 1086 g_assert ( NULL != data && "The data parameter is NULL."); 1087 1088 MainPter *pter = (MainPter *)data; 1089 pter->fullScreenActivated (gtk_toggle_action_get_active (action)); 1090 } 1091 1092 /// 1061 1093 /// @brief Called when the window is moved or resized. 1062 1094 /// -
trunk/src/gtk/MainView.h
r227 r253 62 62 void showIndex (gboolean show); 63 63 void setCursor (ViewCursor cursorType); 64 void setFullScreen (gboolean fullScreen); 64 65 void setNumberOfPagesText (const gchar *text); 65 66 void setGoToPageText (const gchar *text); -
trunk/tests/DumbMainView.cxx
r227 r253 267 267 268 268 void 269 DumbMainView::setFullScreen (gboolean fullScreen) 270 { 271 } 272 273 void 269 274 DumbMainView::setNumberOfPagesText (const gchar *text) 270 275 { -
trunk/tests/DumbMainView.h
r227 r253 63 63 const gchar *getGoToPageText (void); 64 64 void setCursor (ViewCursor cursorType); 65 void setFullScreen (gboolean fullScreen); 65 66 void setNumberOfPagesText (const gchar *text); 66 67 void setGoToPageText (const gchar *text);
