diff options
-rw-r--r-- | sd/UIConfig_simpress.mk | 1 | ||||
-rw-r--r-- | sd/source/ui/app/popup.src | 22 | ||||
-rw-r--r-- | sd/source/ui/inc/res_bmp.hrc | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 9 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/layoutmenu.ui | 31 |
5 files changed, 37 insertions, 27 deletions
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index 6bf23ea2f9ae..f98901bd695a 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -121,6 +121,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/insertslides \ sd/uiconfig/simpress/ui/interactiondialog \ sd/uiconfig/simpress/ui/interactionpage \ + sd/uiconfig/simpress/ui/layoutmenu \ sd/uiconfig/simpress/ui/masterlayoutdlg \ sd/uiconfig/simpress/ui/navigatorpanel \ sd/uiconfig/simpress/ui/notebookbar \ diff --git a/sd/source/ui/app/popup.src b/sd/source/ui/app/popup.src index 9668057eab3c..aad53501ce1c 100644 --- a/sd/source/ui/app/popup.src +++ b/sd/source/ui/app/popup.src @@ -108,26 +108,4 @@ Menu RID_TASKPANE_CURRENT_MASTERPAGESSELECTOR_POPUP }; }; -Menu RID_TASKPANE_LAYOUTMENU_POPUP -{ - ItemList = - { - MenuItem - { - Identifier = SID_TP_APPLY_TO_SELECTED_SLIDES; - HelpId = CMD_SID_TP_APPLY_TO_SELECTED_SLIDES; - Text [ en-US ] = "Apply to ~Selected Slides"; - }; - - SEPARATOR - - MenuItem - { - Identifier = SID_INSERTPAGE_LAYOUT_MENU; - HelpId = CMD_SID_INSERTPAGE_LAYOUT_MENU; - Text [ en-US ] = "~Insert Slide"; - }; - }; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/res_bmp.hrc b/sd/source/ui/inc/res_bmp.hrc index 79e05cbd5b09..a6c240efa51a 100644 --- a/sd/source/ui/inc/res_bmp.hrc +++ b/sd/source/ui/inc/res_bmp.hrc @@ -199,7 +199,6 @@ // ResourceIDs for Popup-Menus do not need a dummy string!!! #define RID_TASKPANE_MASTERPAGESSELECTOR_POPUP RID_APP_START+67 -#define RID_TASKPANE_LAYOUTMENU_POPUP RID_APP_START+68 #define RID_TASKPANE_CURRENT_MASTERPAGESSELECTOR_POPUP RID_APP_START+93 #define RID_GRAPHICSTYLEFAMILY RID_APP_START+395 diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index ab862728f282..2a621b0fa554 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -600,7 +600,8 @@ void LayoutMenu::Command (const CommandEvent& rEvent) } // Setup the menu. - ScopedVclPtrInstance<PopupMenu> pMenu(SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/layoutmenu.ui", ""); + VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu")); FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow()); if (pMenuWindow != nullptr) pMenuWindow->SetPopupModeFlags( @@ -640,13 +641,13 @@ IMPL_LINK(LayoutMenu, OnMenuItemSelected, Menu*, pMenu, bool) } pMenu->Deactivate(); - const sal_Int32 nIndex (pMenu->GetCurItemId()); + OString sIdent = pMenu->GetCurItemIdent(); - if (nIndex == SID_TP_APPLY_TO_SELECTED_SLIDES) + if (sIdent == "apply") { AssignLayoutToSelectedSlides(GetSelectedAutoLayout()); } - else if (nIndex == SID_INSERTPAGE_LAYOUT_MENU) + else if (sIdent == "insert") { // Add arguments to this slot and forward it to the main view // shell. diff --git a/sd/uiconfig/simpress/ui/layoutmenu.ui b/sd/uiconfig/simpress/ui/layoutmenu.ui new file mode 100644 index 000000000000..ae59cf23241d --- /dev/null +++ b/sd/uiconfig/simpress/ui/layoutmenu.ui @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.0 --> +<interface> + <requires lib="gtk+" version="3.10"/> + <object class="GtkMenu" id="menu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuItem" id="apply"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Apply to ~Selected Slides</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkSeparatorMenuItem" id="menuitem1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="insert"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Insert Slide</property> + <property name="use_underline">True</property> + </object> + </child> + </object> +</interface> |