Changeset 259
- Timestamp:
- 10/20/06 10:22:49 (2 years ago)
- Files:
-
- trunk/src/IMainView.h (modified) (1 diff)
- trunk/src/gtk/MainView.cxx (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/IMainView.h
r253 r259 583 583 /// @param pter The main presenter that will drive the view. 584 584 /// 585 IMainView (MainPter *pter) 586 { 585 IMainView (MainPter *pter) 586 { 587 587 g_assert ( NULL != pter && "Tried to set a NULL presenter." ); 588 m_Pter = pter; 588 m_Pter = pter; 589 589 } 590 590 trunk/src/gtk/MainView.cxx
r253 r259 164 164 static GtkToggleActionEntry g_ToggleEntries[] = 165 165 { 166 { "FullScreen", NULL, N_("F_ull screen"), NULL,166 { "FullScreen", NULL, N_("F_ull screen"), "F11", 167 167 N_("Toggle full screen window"), 168 168 G_CALLBACK (main_window_fullscreen_cb), FALSE }, … … 436 436 MainView::sensitiveFind (gboolean sensitive) 437 437 { 438 GtkAction *find = 438 GtkAction *find = 439 439 gtk_ui_manager_get_action (m_UIManager, "/MenuBar/EditMenu/Find"); 440 440 gtk_action_set_sensitive (find, sensitive); … … 497 497 #endif // HAVE_CUPS 498 498 499 void 499 void 500 500 MainView::sensitiveReload (gboolean sensitive) 501 501 { 502 GtkAction *reload = 502 GtkAction *reload = 503 503 gtk_ui_manager_get_action (m_UIManager, "/MenuBar/FileMenu/ReloadFile"); 504 504 gtk_action_set_sensitive (reload, sensitive); 505 505 } 506 506 507 void 507 void 508 508 MainView::sensitiveRotateLeft (gboolean sensitive) 509 509 { 510 GtkAction *rotateLeft = 510 GtkAction *rotateLeft = 511 511 gtk_ui_manager_get_action (m_UIManager, "/MenuBar/ViewMenu/RotateLeft"); 512 512 gtk_action_set_sensitive (rotateLeft, sensitive); … … 516 516 MainView::sensitiveRotateRight (gboolean sensitive) 517 517 { 518 GtkAction *rotateRight = gtk_ui_manager_get_action (m_UIManager, 518 GtkAction *rotateRight = gtk_ui_manager_get_action (m_UIManager, 519 519 "/MenuBar/ViewMenu/RotateRight"); 520 520 gtk_action_set_sensitive (rotateRight, sensitive); … … 641 641 MainView::setFullScreen (gboolean fullScreen) 642 642 { 643 GtkWidget *toolBar = gtk_ui_manager_get_widget (m_UIManager, "/ToolBar"); 644 GtkWidget *menuBar = gtk_ui_manager_get_widget (m_UIManager, "/MenuBar"); 643 645 if ( fullScreen ) 644 646 { 645 647 gtk_window_fullscreen (GTK_WINDOW (m_MainWindow)); 648 // Hide the menu bar, tool bar, status bar and the index bar. Then 649 // zoom to fit. 650 gtk_widget_hide (menuBar); 651 gtk_widget_hide (toolBar); 652 gtk_widget_hide (m_StatusBar); 653 gtk_widget_hide (m_Sidebar); 654 gtk_toggle_action_set_active ( 655 GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (m_UIManager, 656 "/MenuBar/ViewMenu/ZoomFit")), TRUE); 646 657 } 647 658 else 648 659 { 649 660 gtk_window_unfullscreen (GTK_WINDOW (m_MainWindow)); 661 gtk_widget_show (menuBar); 662 // Show again the toolbar, status bar and index, only if it was 663 // enabled. 664 main_window_show_index_cb ( 665 GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (m_UIManager, 666 "/MenuBar/ViewMenu/ShowIndex")), 667 (gpointer)m_Pter); 668 main_window_show_statusbar_cb ( 669 GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (m_UIManager, 670 "/MenuBar/ViewMenu/ShowStatusBar")), 671 (gpointer)m_Pter); 672 main_window_show_toolbar_cb ( 673 GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (m_UIManager, 674 "/MenuBar/ViewMenu/ShowToolBar")), 675 (gpointer)m_Pter); 650 676 } 651 677 } … … 743 769 "/MenuBar/ViewMenu/ShowStatusBar"); 744 770 gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (toggleAction), show); 745 if ( show ) 771 if ( show ) 746 772 { 747 773 gtk_widget_show (m_StatusBar);
