@ -5,15 +5,15 @@ using namespace app::browser::header;
Menu : : Menu (
Menu : : Menu (
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__DEBUG ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__DEBUG ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__QUIT ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__QUIT ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__CLEAN ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__SESSION_ CLEAN ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__RESTORE ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__SESSION_ RESTORE ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__SAVE ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__SESSION_S AVE ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__MAIN_ TAB_APPEND ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__TAB_APPEND ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__MAIN_ TAB_CLOSE_ACTIV E ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__TAB_CLOSE ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__MAIN_ TAB_CLOSE_ALL ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__TAB_CLOSE_ALL ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__MAIN_ TAB_PAGE_NAVIGATION_HISTORY_BACK ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__TAB_PAGE_NAVIGATION_HISTORY_BACK ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__MAIN_ TAB_PAGE_NAVIGATION_HISTORY_FORWARD ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__TAB_PAGE_NAVIGATION_HISTORY_FORWARD ,
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__MAIN_ TAB_PAGE_NAVIGATION_RELOAD
const Glib : : RefPtr < Gio : : SimpleAction > & ACTION__TAB_PAGE_NAVIGATION_RELOAD
) {
) {
// Init widget
// Init widget
set_tooltip_text (
set_tooltip_text (
@ -21,144 +21,144 @@ Menu::Menu(
) ;
) ;
// Init components @TODO make builder
// Init components @TODO make builder
const auto MENU__MAIN = Gio : : Menu : : create ( ) ;
const auto MENU = Gio : : Menu : : create ( ) ;
const auto MENU__MAIN_ SESSION = Gio : : Menu : : create ( ) ;
const auto MENU__SESSION = Gio : : Menu : : create ( ) ;
MENU__MAIN_ SESSION - > append (
MENU__SESSION - > append (
_ ( " Clean " ) ,
_ ( " Clean " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__CLEAN
ACTION__SESSION_ CLEAN
)
)
) ;
) ;
MENU__MAIN_ SESSION - > append (
MENU__SESSION - > append (
_ ( " Restore " ) ,
_ ( " Restore " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__RESTORE
ACTION__SESSION_ RESTORE
)
)
) ;
) ;
MENU__MAIN_ SESSION - > append (
MENU__SESSION - > append (
_ ( " Save " ) ,
_ ( " Save " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__SAVE
ACTION__SESSION_S AVE
)
)
) ;
) ;
MENU__MAIN - > append_submenu (
MENU - > append_submenu (
_ ( " Session " ) ,
_ ( " Session " ) ,
MENU__MAIN_ SESSION
MENU__SESSION
) ;
) ;
const auto MENU__MAIN_ TAB = Gio : : Menu : : create ( ) ;
const auto MENU__TAB = Gio : : Menu : : create ( ) ;
MENU__MAIN_ TAB - > append (
MENU__TAB - > append (
_ ( " New.. " ) ,
_ ( " New.. " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_APPEND
ACTION__TAB_APPEND
)
)
) ;
) ;
const auto MENU__MAIN_ TAB_PAGE = Gio : : Menu : : create ( ) ;
const auto MENU__TAB_PAGE = Gio : : Menu : : create ( ) ;
const auto MENU__MAIN_ TAB_PAGE_NAVIGATION = Gio : : Menu : : create ( ) ;
const auto MENU__TAB_PAGE_NAVIGATION = Gio : : Menu : : create ( ) ;
const auto MENU__MAIN_ TAB_PAGE_NAVIGATION_HISTORY = Gio : : Menu : : create ( ) ;
const auto MENU__TAB_PAGE_NAVIGATION_HISTORY = Gio : : Menu : : create ( ) ;
MENU__MAIN_ TAB_PAGE_NAVIGATION_HISTORY - > append (
MENU__TAB_PAGE_NAVIGATION_HISTORY - > append (
_ ( " Back " ) ,
_ ( " Back " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_PAGE_NAVIGATION_HISTORY_BACK
ACTION__TAB_PAGE_NAVIGATION_HISTORY_BACK
)
)
) ;
) ;
MENU__MAIN_ TAB_PAGE_NAVIGATION_HISTORY - > append (
MENU__TAB_PAGE_NAVIGATION_HISTORY - > append (
_ ( " Forward " ) ,
_ ( " Forward " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_PAGE_NAVIGATION_HISTORY_FORWARD
ACTION__TAB_PAGE_NAVIGATION_HISTORY_FORWARD
)
)
) ;
) ;
MENU__MAIN_ TAB_PAGE_NAVIGATION - > append_submenu (
MENU__TAB_PAGE_NAVIGATION - > append_submenu (
_ ( " History " ) ,
_ ( " History " ) ,
MENU__MAIN_ TAB_PAGE_NAVIGATION_HISTORY
MENU__TAB_PAGE_NAVIGATION_HISTORY
) ;
) ;
MENU__MAIN_ TAB_PAGE_NAVIGATION - > append (
MENU__TAB_PAGE_NAVIGATION - > append (
_ ( " Reload " ) ,
_ ( " Reload " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_PAGE_NAVIGATION_RELOAD
ACTION__TAB_PAGE_NAVIGATION_RELOAD
)
)
) ;
) ;
MENU__MAIN_ TAB_PAGE - > append_submenu (
MENU__TAB_PAGE - > append_submenu (
_ ( " Navigation " ) ,
_ ( " Navigation " ) ,
MENU__MAIN_ TAB_PAGE_NAVIGATION
MENU__TAB_PAGE_NAVIGATION
) ;
) ;
MENU__MAIN_ TAB - > append_submenu (
MENU__TAB - > append_submenu (
_ ( " Page " ) ,
_ ( " Page " ) ,
MENU__MAIN_ TAB_PAGE
MENU__TAB_PAGE
) ;
) ;
const auto MENU__MAIN_ TAB_CLOSE = Gio : : Menu : : create ( ) ;
const auto MENU__TAB_CLOSE = Gio : : Menu : : create ( ) ;
MENU__MAIN_ TAB_CLOSE - > append (
MENU__TAB_CLOSE - > append (
_ ( " Active tab " ) ,
_ ( " Active tab " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_CLOSE_ACTIV E
ACTION__TAB_CLOSE
)
)
) ;
) ;
// @TODO
// @TODO
/*
/*
MENU__MAIN_ TAB_CLOSE - > append (
MENU__TAB_CLOSE - > append (
_ ( " All tabs to left " ) ,
_ ( " All tabs to left " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_CLOSE_LEFT
ACTION__TAB_CLOSE_LEFT
)
)
) ;
) ;
MENU__MAIN_ TAB_CLOSE - > append (
MENU__TAB_CLOSE - > append (
_ ( " All tabs to right " ) ,
_ ( " All tabs to right " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_CLOSE_RIGHT
ACTION__TAB_CLOSE_RIGHT
)
)
) ;
) ;
*/
*/
MENU__MAIN_ TAB_CLOSE - > append (
MENU__TAB_CLOSE - > append (
_ ( " All tabs " ) ,
_ ( " All tabs " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__MAIN_ TAB_CLOSE_ALL
ACTION__TAB_CLOSE_ALL
)
)
) ;
) ;
MENU__MAIN_ TAB - > append_submenu (
MENU__TAB - > append_submenu (
_ ( " Close " ) ,
_ ( " Close " ) ,
MENU__MAIN_ TAB_CLOSE
MENU__TAB_CLOSE
) ;
) ;
MENU__MAIN - > append_submenu (
MENU - > append_submenu (
_ ( " Tab " ) ,
_ ( " Tab " ) ,
MENU__MAIN_ TAB
MENU__TAB
) ;
) ;
const auto MENU__MAIN_ TOOLS = Gio : : Menu : : create ( ) ;
const auto MENU__TOOLS = Gio : : Menu : : create ( ) ;
MENU__MAIN_ TOOLS - > append (
MENU__TOOLS - > append (
_ ( " Debug " ) ,
_ ( " Debug " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__DEBUG
ACTION__DEBUG
)
)
) ;
) ;
MENU__MAIN - > append_submenu (
MENU - > append_submenu (
_ ( " Tools " ) ,
_ ( " Tools " ) ,
MENU__MAIN_ TOOLS
MENU__TOOLS
) ;
) ;
MENU__MAIN - > append (
MENU - > append (
_ ( " Quit " ) ,
_ ( " Quit " ) ,
get_action_detailed_name (
get_action_detailed_name (
ACTION__QUIT
ACTION__QUIT
@ -166,7 +166,7 @@ Menu::Menu(
) ;
) ;
set_menu_model (
set_menu_model (
MENU__MAIN
MENU
) ;
) ;
}
}