Kaydet (Commit) 37530ebb authored tarafından Caolán McNamara's avatar Caolán McNamara

convert scenario menu to .ui

Change-Id: Iac0f52898ce9e8484731d62b2555ed3c83563d1d
üst 73295fa4
......@@ -188,6 +188,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/samplingdialog \
sc/uiconfig/scalc/ui/standardfilterdialog \
sc/uiconfig/scalc/ui/scenariodialog \
sc/uiconfig/scalc/ui/scenariomenu \
sc/uiconfig/scalc/ui/scgeneralpage \
sc/uiconfig/scalc/ui/searchresults \
sc/uiconfig/scalc/ui/selectdatasource \
......
......@@ -46,9 +46,6 @@
#define HID_SC_ADD_AUTOFMT "SC_HID_SC_ADD_AUTOFMT"
#define HID_SC_AUTOFMT_NAME "SC_HID_SC_AUTOFMT_NAME"
#define HID_SC_SCENARIO_DELETE "SC_HID_SC_SCENARIO_DELETE"
#define HID_SC_SCENARIO_EDIT "SC_HID_SC_SCENARIO_EDIT"
#define HID_FUNCTION_BOX "SC_HID_FUNCTION_BOX"
// wrong group - HID_SC_DLG_START is full
......
......@@ -441,10 +441,6 @@
#define RID_SCDLG_HFEDIT_HEADER (SC_DIALOGS_START + 68)
#define RID_SCDLG_HFEDIT_FOOTER (SC_DIALOGS_START + 69)
#define RID_POPUP_NAVIPI_SCENARIO (SC_DIALOGS_START + 120)
#define RID_NAVIPI_SCENARIO_DELETE (SC_DIALOGS_START + 121)
#define RID_NAVIPI_SCENARIO_EDIT (SC_DIALOGS_START + 122)
#define RID_CELLSTYLEFAMILY (SC_DIALOGS_START + 138)
#define RID_PAGESTYLEFAMILY (SC_DIALOGS_START + 139)
#define BMP_STYLES_FAMILY_CELL (SC_DIALOGS_START + 140)
......
......@@ -176,23 +176,4 @@ String SCSTR_QHLP_SCEN_COMMENT
Text [ en-US ] = "Comment";
};
Menu RID_POPUP_NAVIPI_SCENARIO
{
ItemList =
{
MenuItem
{
Identifier = RID_NAVIPI_SCENARIO_DELETE ;
HelpId = HID_SC_SCENARIO_DELETE ;
Text [ en-US ] = "Delete" ;
};
MenuItem
{
Identifier = RID_NAVIPI_SCENARIO_EDIT ;
HelpId = HID_SC_SCENARIO_EDIT ;
Text [ en-US ] = "Properties..." ;
};
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -135,20 +135,14 @@ bool ScScenarioListBox::EventNotify( NotifyEvent& rNEvt )
{
if( !pEntry->mbProtected )
{
ScopedVclPtrInstance<ScPopupMenu> aPopup( ScResId( RID_POPUP_NAVIPI_SCENARIO ) );
aPopup->Execute( this, pCEvt->GetMousePosPixel() );
if (aPopup->WasHit())
{
switch( aPopup->GetSelected() )
{
case RID_NAVIPI_SCENARIO_DELETE:
DeleteScenario();
break;
case RID_NAVIPI_SCENARIO_EDIT:
EditScenario();
break;
}
}
VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/scalc/ui/scenariomenu.ui", "");
VclPtr<PopupMenu> aPopup(aBuilder.get_menu("menu"));
sal_uInt16 nId = aPopup->Execute(this, pCEvt->GetMousePosPixel());
OString sIdent(aPopup->GetItemIdent(nId));
if (sIdent == "delete")
DeleteScenario();
else if (sIdent == "edit")
EditScenario();
}
}
bHandled = true;
......
<?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="delete">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Delete</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="edit">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Properties...</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment