Changeset 68
- Timestamp:
- 04/15/06 10:59:57 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
data/epdfview-ui.xml (modified) (1 diff)
-
src/gtk/MainView.cxx (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/epdfview-ui.xml
r64 r68 8 8 </menu> 9 9 <menu action="ViewMenu"> 10 <menuitem name="ShowToolBar" action="ShowToolBar"/> 11 <menuitem name="ShowStatusBar" action="ShowStatusBar"/> 12 <menuitem name="ShowSideBar" action="ShowSideBar"/> 13 <separator/> 10 14 <menuitem name="ZoomIn" action="ZoomIn"/> 11 15 <menuitem name="ZoomOut" action="ZoomOut"/> -
trunk/src/gtk/MainView.cxx
r67 r68 46 46 GtkTreeViewColumn *, gpointer); 47 47 static void main_window_quit_cb (GtkWidget *, gpointer); 48 static void main_window_show_sidebar_cb (GtkToggleAction *, gpointer); 48 49 static void main_window_zoom_fit_cb (GtkWidget *, gpointer); 49 50 static void main_window_zoom_in_cb (GtkWidget *, gpointer); … … 114 115 N_("Display application's credits"), 115 116 G_CALLBACK (main_window_about_box_cb) } 117 }; 118 119 static GtkToggleActionEntry g_ToggleEntries[] = 120 { 121 { "ShowToolBar", NULL, N_("Show _Toolbar"), NULL, 122 N_("Show or hidde the toolbar"), 123 NULL, TRUE }, 124 { "ShowStatusBar", NULL, N_("Show _Statusbar"), NULL, 125 N_("Show or hidde the statusbar"), 126 NULL, TRUE }, 127 { "ShowSideBar", NULL, N_("Show O_utline"), NULL, 128 N_("Show or hidde the document's outline"), 129 G_CALLBACK (main_window_show_sidebar_cb), FALSE } 116 130 }; 117 131 … … 382 396 gtk_widget_hide (m_Sidebar); 383 397 } 398 GtkAction *showSideBar = 399 gtk_ui_manager_get_action (m_UIManager, 400 "/MenuBar/ViewMenu/ShowSideBar"); 401 gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (showSideBar), show); 384 402 } 385 403 … … 545 563 gtk_action_group_add_actions (actionGroup, g_NormalEntries, 546 564 G_N_ELEMENTS (g_NormalEntries), m_Pter); 565 gtk_action_group_add_toggle_actions (actionGroup, g_ToggleEntries, 566 G_N_ELEMENTS (g_ToggleEntries), 567 this); 547 568 m_UIManager = gtk_ui_manager_new (); 548 569 gtk_ui_manager_insert_action_group (m_UIManager, actionGroup, 0); … … 828 849 829 850 /// 851 /// @brief Called when the user clicks on the "Show Outline" action. 852 /// 853 void 854 main_window_show_sidebar_cb (GtkToggleAction *action, gpointer data) 855 { 856 g_assert ( NULL != data && "The data parameter is NULL."); 857 858 MainView *view = (MainView *)data; 859 view->showSidebar (gtk_toggle_action_get_active (action)); 860 } 861 862 /// 830 863 /// @brief The user tries to fit the document into the window. 831 864 ///
