convert preset menu to .ui
Change-Id: I31cbe438f5f5b790ca8f4373010b28d948c2b53e
This commit is contained in:
parent
98973e40e8
commit
bc937896e2
@ -203,11 +203,6 @@
|
|||||||
#define RID_SVX_UPDATE_STYLE (RID_SVX_START + 122)
|
#define RID_SVX_UPDATE_STYLE (RID_SVX_START + 122)
|
||||||
#define RID_SVX_MODIFY_STYLE (RID_SVX_START + 123)
|
#define RID_SVX_MODIFY_STYLE (RID_SVX_START + 123)
|
||||||
|
|
||||||
// for fill style preset listbox
|
|
||||||
#define RID_SVX_PRESET_MENU (RID_SVX_START + 124)
|
|
||||||
#define RID_SVX_PRESET_RENAME (RID_SVX_START + 125)
|
|
||||||
#define RID_SVX_PRESET_DELETE (RID_SVX_START + 126)
|
|
||||||
|
|
||||||
#define RID_SVXCTRL_RECTBTNS (RID_SVX_START + 226)
|
#define RID_SVXCTRL_RECTBTNS (RID_SVX_START + 226)
|
||||||
|
|
||||||
// ResId's for Starone impl. bitmaps
|
// ResId's for Starone impl. bitmaps
|
||||||
|
@ -53,6 +53,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
|
|||||||
svx/uiconfig/ui/paralrspacing \
|
svx/uiconfig/ui/paralrspacing \
|
||||||
svx/uiconfig/ui/paraulspacing \
|
svx/uiconfig/ui/paraulspacing \
|
||||||
svx/uiconfig/ui/passwd \
|
svx/uiconfig/ui/passwd \
|
||||||
|
svx/uiconfig/ui/presetmenu \
|
||||||
svx/uiconfig/ui/profileexporteddialog \
|
svx/uiconfig/ui/profileexporteddialog \
|
||||||
svx/uiconfig/ui/querydeletecontourdialog \
|
svx/uiconfig/ui/querydeletecontourdialog \
|
||||||
svx/uiconfig/ui/querydeleteobjectdialog \
|
svx/uiconfig/ui/querydeleteobjectdialog \
|
||||||
|
@ -59,7 +59,8 @@ void SvxPresetListBox::Command( const CommandEvent& rEvent )
|
|||||||
if(nIndex > 0)
|
if(nIndex > 0)
|
||||||
{
|
{
|
||||||
Point aPos(rEvent.GetMousePosPixel());
|
Point aPos(rEvent.GetMousePosPixel());
|
||||||
ScopedVclPtrInstance<PopupMenu> pMenu(SVX_RES(RID_SVX_PRESET_MENU));
|
VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/presetmenu.ui", "");
|
||||||
|
VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu"));
|
||||||
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
|
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
|
||||||
if(pMenuWindow != nullptr)
|
if(pMenuWindow != nullptr)
|
||||||
{
|
{
|
||||||
@ -123,16 +124,11 @@ IMPL_LINK(SvxPresetListBox, OnMenuItemSelected, Menu*, pMenu, bool)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
pMenu->Deactivate();
|
pMenu->Deactivate();
|
||||||
switch(pMenu->GetCurItemId())
|
OString sIdent = pMenu->GetCurItemIdent();
|
||||||
{
|
if (sIdent == "rename")
|
||||||
default:
|
|
||||||
case RID_SVX_PRESET_RENAME:
|
|
||||||
maRenameHdl.Call(this);
|
maRenameHdl.Call(this);
|
||||||
break;
|
else if (sIdent == "delete")
|
||||||
case RID_SVX_PRESET_DELETE:
|
|
||||||
maDeleteHdl.Call(this);
|
maDeleteHdl.Call(this);
|
||||||
break;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,23 +131,6 @@ Menu RID_SVX_STYLE_MENU
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
Menu RID_SVX_PRESET_MENU
|
|
||||||
{
|
|
||||||
ItemList =
|
|
||||||
{
|
|
||||||
MenuItem
|
|
||||||
{
|
|
||||||
Identifier = RID_SVX_PRESET_RENAME;
|
|
||||||
Text [ en-US ] = "Rename";
|
|
||||||
};
|
|
||||||
MenuItem
|
|
||||||
{
|
|
||||||
Identifier = RID_SVX_PRESET_DELETE;
|
|
||||||
Text [ en-US ] = "Delete";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
String RID_SVXSTR_BY_AUTHOR
|
String RID_SVXSTR_BY_AUTHOR
|
||||||
{
|
{
|
||||||
Text [ en-US ] = "By author";
|
Text [ en-US ] = "By author";
|
||||||
|
25
svx/uiconfig/ui/presetmenu.ui
Normal file
25
svx/uiconfig/ui/presetmenu.ui
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?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="rename">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Rename</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<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>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Loading…
x
Reference in New Issue
Block a user