Changeset 253 for trunk/src/gtk/MainView.cxx
- Timestamp:
- 10/16/06 14:49:05 (2 years ago)
- Files:
-
- 1 modified
-
trunk/src/gtk/MainView.cxx (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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 ///
