summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-14 17:02:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-15 20:08:40 +0200
commita36997c15b310b50f77446ea6c10ccc939a9cc27 (patch)
tree06859915b0256e314a1f24c1686e2f97fc57868b
parent15ac3f9f4dc65fc0c6020284064e3725956f5d0a (diff)
convert column menu to .ui
Change-Id: I3a41b716c473a17821969f09945ac1a94b024d41 Reviewed-on: https://gerrit.libreoffice.org/36569 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx8
-rw-r--r--include/svx/fmresids.hrc1
-rw-r--r--include/svx/svxids.hrc16
-rw-r--r--svx/AllLangResTarget_svx.mk1
-rw-r--r--svx/UIConfig_svx.mk1
-rw-r--r--svx/inc/fmhelp.hrc8
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx384
-rw-r--r--svx/source/fmcomp/gridctrl.src164
-rw-r--r--svx/uiconfig/ui/colsmenu.ui271
9 files changed, 475 insertions, 379 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index a3ee13ac737d..0686504c8099 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -631,16 +631,16 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM
if (bDBIsReadOnly)
{
- rMenu.EnableItem(SID_FM_HIDECOL, false);
- PopupMenu* pShowColsMenu = rMenu.GetPopupMenu(SID_FM_SHOWCOLS);
+ rMenu.EnableItem(rMenu.GetItemId("hide"), false);
+ PopupMenu* pShowColsMenu = rMenu.GetPopupMenu(rMenu.GetItemId("show"));
if (pShowColsMenu)
{
// at most 16 items which mean "show column <name>"
for (sal_uInt16 i=1; i<16; ++i)
pShowColsMenu->EnableItem(i, false);
// "show cols/more..." and "show cols/all"
- pShowColsMenu->EnableItem(SID_FM_SHOWCOLS_MORE, false);
- pShowColsMenu->EnableItem(SID_FM_SHOWALLCOLS, false);
+ pShowColsMenu->EnableItem(pShowColsMenu->GetItemId("more"), false);
+ pShowColsMenu->EnableItem(pShowColsMenu->GetItemId("all"), false);
}
}
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index 7ff02a58790f..66e9b70741b9 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -63,7 +63,6 @@
// Menu-Id's -----------------------------------------------------------
#define RID_FMEXPLORER_POPUPMENU (RID_FORMS_START + 0)
-#define RID_SVXMNU_COLS (RID_FORMS_START + 2)
#define RID_FMSHELL_CONVERSIONMENU (RID_FORMS_START + 4)
#define RID_FM_FILTER_MENU (RID_FORMS_START + 5)
#define RID_MENU_DATANAVIGATOR (RID_FORMS_START + 10)
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 89ec26cfffe5..18ddd6436a84 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -562,13 +562,13 @@
#define SID_FM_DBGRID ( SID_SVX_START + 603 )
#define SID_FM_IMAGEBUTTON ( SID_SVX_START + 604 )
#define SID_FM_FILECONTROL ( SID_SVX_START + 605 )
-#define SID_FM_CHANGECOL ( SID_SVX_START + 606 )
+//FREE
#define SID_FM_NAVIGATIONBAR ( SID_SVX_START + 607 )
#define SID_FM_NEW_HIDDEN ( SID_SVX_START + 608 )
#define SID_FM_RENAME_OBJECT ( SID_SVX_START + 609 )
#define SID_FM_DELETEROWS ( SID_SVX_START + 610 )
-#define SID_FM_INSERTCOL ( SID_SVX_START + 611 )
-#define SID_FM_DELETECOL ( SID_SVX_START + 612 )
+//FREE
+//FREE
#define SID_FM_CTL_PROPERTIES ( SID_SVX_START + 613 )
#define SID_FM_PROPERTIES ( SID_SVX_START + 614 )
#define SID_FM_TAB_DIALOG ( SID_SVX_START + 615 )
@@ -654,11 +654,11 @@
#define SID_FM_CONVERTTO_IMAGECONTROL ( SID_SVX_START + 750 )
#define SID_FM_CONVERTTO_FORMATTED ( SID_SVX_START + 751 )
#define SID_FM_FILTER_NAVIGATOR_CONTROL ( SID_SVX_START + 752 )
-#define SID_FM_HIDECOL ( SID_SVX_START + 753 )
-#define SID_FM_SHOWCOLS ( SID_SVX_START + 754 )
-#define SID_FM_SHOWCOLS_MORE ( SID_SVX_START + 755 )
-#define SID_FM_SHOWALLCOLS ( SID_SVX_START + 756 )
-#define SID_FM_TWOFIELDS_DATE_N_TIME ( SID_SVX_START + 757 )
+//FREE
+//FREE
+//FREE
+//FREE
+//FREE
#define SID_FM_FILTER_EDIT ( SID_SVX_START + 758 )
#define SID_FM_FILTER_IS_NULL ( SID_SVX_START + 759 )
#define SID_FM_FILTER_IS_NOT_NULL ( SID_SVX_START + 760 )
diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk
index 10a2d6557685..0d14e1dce4c5 100644
--- a/svx/AllLangResTarget_svx.mk
+++ b/svx/AllLangResTarget_svx.mk
@@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
svx/source/dialog/ucsubset.src \
svx/source/engine3d/float3d.src \
svx/source/engine3d/string3d.src \
- svx/source/fmcomp/gridctrl.src \
svx/source/form/datanavi.src \
svx/source/form/filtnav.src \
svx/source/form/fmexpl.src \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 286b14ac9560..98af04cd8aef 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/chineseconversiondialog \
svx/uiconfig/ui/chinesedictionary \
svx/uiconfig/ui/colorwindow \
+ svx/uiconfig/ui/colsmenu \
svx/uiconfig/ui/compressgraphicdialog \
svx/uiconfig/ui/crashreportdlg \
svx/uiconfig/ui/datanavigator \
diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc
index 5a1f072407ce..7cea12f7c35f 100644
--- a/svx/inc/fmhelp.hrc
+++ b/svx/inc/fmhelp.hrc
@@ -25,7 +25,6 @@
#define HID_FIELD_SEL_WIN "SVX_HID_FIELD_SEL_WIN"
#define HID_FILTER_NAVIGATOR "SVX_HID_FILTER_NAVIGATOR"
#define HID_FILTER_NAVIGATOR_WIN "SVX_HID_FILTER_NAVIGATOR_WIN"
-#define HID_CONTROLS_DATE_N_TIME "SVX_HID_CONTROLS_DATE_N_TIME"
#define HID_GRID_TRAVEL_FIRST "SVX_HID_GRID_TRAVEL_FIRST"
#define HID_GRID_TRAVEL_PREV "SVX_HID_GRID_TRAVEL_PREV"
#define HID_GRID_TRAVEL_NEXT "SVX_HID_GRID_TRAVEL_NEXT"
@@ -39,13 +38,6 @@
#define HID_XFORMS_TOOLBOX_ITEM_EDIT "SVX_HID_XFORMS_TOOLBOX_ITEM_EDIT"
#define HID_XFORMS_TOOLBOX_ITEM_REMOVE "SVX_HID_XFORMS_TOOLBOX_ITEM_REMOVE"
#define HID_XFORMS_MID_INSERT_CONTROL "SVX_HID_XFORMS_MID_INSERT_CONTROL"
-#define HID_FM_INSERTCOL "SVX_HID_FM_INSERTCOL"
-#define HID_FM_CHANGECOL "SVX_HID_FM_CHANGECOL"
-#define HID_FM_DELETECOL "SVX_HID_FM_DELETECOL"
-#define HID_FM_HIDECOL "SVX_HID_FM_HIDECOL"
-#define HID_FM_SHOWCOLS "SVX_HID_FM_SHOWCOLS"
-#define HID_FM_SHOWCOLS_MORE "SVX_HID_FM_SHOWCOLS_MORE"
-#define HID_FM_SHOWALLCOLS "SVX_HID_FM_SHOWALLCOLS"
#define HID_FM_DELETE "SVX_HID_FM_DELETE"
#define HID_FM_FILTER_EDIT "SVX_HID_FM_EDIT"
#define HID_FM_FILTER_IS_NULL "SVX_HID_FM_FILTER_IS_NULL"
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 8a40701f5bea..1579600a1f8f 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -88,24 +88,6 @@ using namespace ::svxform;
using namespace ::svx;
using namespace ::dbtools;
-OUString FieldServiceFromId(sal_Int32 nID)
-{
- switch (nID)
- {
- case SID_FM_EDIT : return OUString(FM_COL_TEXTFIELD);
- case SID_FM_COMBOBOX : return OUString(FM_COL_COMBOBOX);
- case SID_FM_LISTBOX : return OUString(FM_COL_LISTBOX);
- case SID_FM_CHECKBOX : return OUString(FM_COL_CHECKBOX);
- case SID_FM_DATEFIELD : return OUString(FM_COL_DATEFIELD);
- case SID_FM_TIMEFIELD : return OUString(FM_COL_TIMEFIELD);
- case SID_FM_NUMERICFIELD : return OUString(FM_COL_NUMERICFIELD);
- case SID_FM_CURRENCYFIELD : return OUString(FM_COL_CURRENCYFIELD);
- case SID_FM_PATTERNFIELD : return OUString(FM_COL_PATTERNFIELD);
- case SID_FM_FORMATTEDFIELD : return OUString(FM_COL_FORMATTEDFIELD);
- }
- return OUString();
-}
-
struct FmGridHeaderData
{
ODataAccessDescriptor aDropData;
@@ -115,16 +97,12 @@ struct FmGridHeaderData
Reference< XInterface > xDroppedResultSet;
};
-const sal_Int16 nChangeTypeOffset = 1000;
-void SetMenuItem(sal_uInt16 nImgID, sal_uInt16 nID, Menu* pMenu, Menu& rNewMenu, bool bDesignMode, sal_Int16 nOffset = nChangeTypeOffset)
+void SetMenuItem(sal_uInt16 nImgID, const OString &rID, Menu& rMenu, bool bDesignMode)
{
Image aImage(BitmapEx(SVX_RES(nImgID)));
- pMenu->SetItemImage(nID, aImage);
- pMenu->EnableItem(nID, bDesignMode);
- rNewMenu.InsertItem(nID + nOffset, pMenu->GetItemText(nID));
- rNewMenu.SetItemImage(nID + nOffset, aImage);
- rNewMenu.SetHelpId(nID + nOffset, pMenu->GetHelpId(nID));
- rNewMenu.EnableItem(nID + nOffset, bDesignMode);
+ sal_uInt16 nID = rMenu.GetItemId(rID);
+ rMenu.SetItemImage(nID, aImage);
+ rMenu.EnableItem(nID, bDesignMode);
}
FmGridHeader::FmGridHeader( BrowseBox* pParent, WinBits nWinBits)
@@ -434,61 +412,61 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void )
Reference< XPropertySet > xCol, xSecondCol;
// Create Column based on type, default textfield
- std::vector<sal_uInt16> aPossibleTypes;
+ std::vector<OString> aPossibleTypes;
std::vector<sal_uInt16> aImgResId;
switch (nDataType)
{
case DataType::BIT:
case DataType::BOOLEAN:
- aPossibleTypes.push_back(SID_FM_CHECKBOX);
+ aPossibleTypes.push_back(FM_COL_CHECKBOX);
aImgResId.push_back(RID_SVXBMP_CHECKBOX);
break;
case DataType::TINYINT:
case DataType::SMALLINT:
case DataType::INTEGER:
- aPossibleTypes.push_back(SID_FM_NUMERICFIELD);
+ aPossibleTypes.push_back(FM_COL_NUMERICFIELD);
aImgResId.push_back(RID_SVXBMP_NUMERICFIELD);
- aPossibleTypes.push_back(SID_FM_FORMATTEDFIELD);
+ aPossibleTypes.push_back(FM_COL_FORMATTEDFIELD);
aImgResId.push_back(RID_SVXBMP_FORMATTEDFIELD);
break;
case DataType::REAL:
case DataType::DOUBLE:
case DataType::NUMERIC:
case DataType::DECIMAL:
- aPossibleTypes.push_back(SID_FM_FORMATTEDFIELD);
+ aPossibleTypes.push_back(FM_COL_FORMATTEDFIELD);
aImgResId.push_back(RID_SVXBMP_FORMATTEDFIELD);
- aPossibleTypes.push_back(SID_FM_NUMERICFIELD);
+ aPossibleTypes.push_back(FM_COL_NUMERICFIELD);
aImgResId.push_back(RID_SVXBMP_NUMERICFIELD);
break;
case DataType::TIMESTAMP:
- aPossibleTypes.push_back(SID_FM_TWOFIELDS_DATE_N_TIME);
+ aPossibleTypes.push_back("dateandtimefield");
aImgResId.push_back(RID_SVXBMP_DATE_N_TIME_FIELDS);
- aPossibleTypes.push_back(SID_FM_DATEFIELD);
+ aPossibleTypes.push_back(FM_COL_DATEFIELD);
aImgResId.push_back(RID_SVXBMP_DATEFIELD);
- aPossibleTypes.push_back(SID_FM_TIMEFIELD);
+ aPossibleTypes.push_back(FM_COL_TIMEFIELD);
aImgResId.push_back(RID_SVXBMP_TIMEFIELD);
- aPossibleTypes.push_back(SID_FM_FORMATTEDFIELD);
+ aPossibleTypes.push_back(FM_COL_FORMATTEDFIELD);
aImgResId.push_back(RID_SVXBMP_FORMATTEDFIELD);
break;
case DataType::DATE:
- aPossibleTypes.push_back(SID_FM_DATEFIELD);
+ aPossibleTypes.push_back(FM_COL_DATEFIELD);
aImgResId.push_back(RID_SVXBMP_DATEFIELD);
- aPossibleTypes.push_back(SID_FM_FORMATTEDFIELD);
+ aPossibleTypes.push_back(FM_COL_FORMATTEDFIELD);
aImgResId.push_back(RID_SVXBMP_FORMATTEDFIELD);
break;
case DataType::TIME:
- aPossibleTypes.push_back(SID_FM_TIMEFIELD);
+ aPossibleTypes.push_back(FM_COL_TIMEFIELD);
aImgResId.push_back(RID_SVXBMP_TIMEFIELD);
- aPossibleTypes.push_back(SID_FM_FORMATTEDFIELD);
+ aPossibleTypes.push_back(FM_COL_FORMATTEDFIELD);
aImgResId.push_back(RID_SVXBMP_FORMATTEDFIELD);
break;
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
default:
- aPossibleTypes.push_back(SID_FM_EDIT);
+ aPossibleTypes.push_back(FM_COL_TEXTFIELD);
aImgResId.push_back(RID_SVXBMP_EDITBOX);
- aPossibleTypes.push_back(SID_FM_FORMATTEDFIELD);
+ aPossibleTypes.push_back(FM_COL_FORMATTEDFIELD);
aImgResId.push_back(RID_SVXBMP_FORMATTEDFIELD);
break;
}
@@ -498,7 +476,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void )
if ( ::comphelper::hasProperty(FM_PROP_ISCURRENCY, xField)
&& ::comphelper::getBOOL(xField->getPropertyValue(FM_PROP_ISCURRENCY)))
{
- aPossibleTypes.insert(aPossibleTypes.begin(), SID_FM_CURRENCYFIELD);
+ aPossibleTypes.insert(aPossibleTypes.begin(), FM_COL_CURRENCYFIELD);
aImgResId.insert(aImgResId.begin(), RID_SVXBMP_CURRENCYFIELD);
}
}
@@ -512,29 +490,33 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void )
bool bDateNTimeCol = false;
if (!aPossibleTypes.empty())
{
- sal_Int32 nPreferredType = aPossibleTypes[0];
+ OString sPreferredType = aPossibleTypes[0];
if ((m_pImpl->nDropAction == DND_ACTION_LINK) && (aPossibleTypes.size() > 1))
{
- ScopedVclPtrInstance<PopupMenu> aInsertMenu(SVX_RES(RID_SVXMNU_COLS));
- ScopedVclPtrInstance<PopupMenu> aTypeMenu;
- PopupMenu* pMenu = aInsertMenu->GetPopupMenu(SID_FM_INSERTCOL);
- for (std::vector<sal_uInt16>::const_iterator iter = aPossibleTypes.begin(), imgiter = aImgResId.begin();
+ VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/colsmenu.ui", "");
+ VclPtr<PopupMenu> aInsertMenu(aBuilder.get_menu("menu"));
+ PopupMenu* pTypeMenu = aInsertMenu->GetPopupMenu(aInsertMenu->GetItemId("insert"));
+ pTypeMenu->ShowItem(pTypeMenu->GetItemId("dateandtimefield"));
+ std::vector<OString>::const_iterator iter;
+ std::vector<sal_uInt16>::const_iterator imgiter;
+ for (iter = aPossibleTypes.begin(), imgiter = aImgResId.begin();
iter != aPossibleTypes.end(); ++iter, ++imgiter)
{
- SetMenuItem(*imgiter, *iter, pMenu, *aTypeMenu.get(), true, 0);
+ SetMenuItem(*imgiter, *iter, *pTypeMenu, true);
}
- nPreferredType = aTypeMenu->Execute(this, m_pImpl->aDropPosPixel);
+ if (pTypeMenu->Execute(this, m_pImpl->aDropPosPixel))
+ sPreferredType = pTypeMenu->GetCurItemIdent();
}
- bDateNTimeCol = nPreferredType == SID_FM_TWOFIELDS_DATE_N_TIME;
+ bDateNTimeCol = sPreferredType == "dateandtimefield";
sal_uInt16 nColCount = bDateNTimeCol ? 2 : 1;
OUString sFieldService;
while (nColCount--)
{
if (bDateNTimeCol)
- nPreferredType = nColCount ? SID_FM_DATEFIELD : SID_FM_TIMEFIELD;
+ sPreferredType = nColCount ? FM_COL_DATEFIELD : FM_COL_TIMEFIELD;
- sFieldService = FieldServiceFromId(nPreferredType);
+ sFieldService = OUString::fromUtf8(sPreferredType);
Reference< XPropertySet > xThisRoundCol;
if ( !sFieldService.isEmpty() )
xThisRoundCol = xFactory->createColumn(sFieldService);
@@ -678,21 +660,19 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
sal_uInt16 nPos = GetModelColumnPos(nColId);
bool bMarked = nColId && static_cast<FmGridControl*>(GetParent())->isColumnMarked(nColId);
- VclPtrInstance<PopupMenu> pControlMenu;
-
- PopupMenu* pMenu = rMenu.GetPopupMenu(SID_FM_INSERTCOL);
+ PopupMenu* pMenu = rMenu.GetPopupMenu(rMenu.GetItemId("insert"));
if (pMenu)
{
- SetMenuItem(RID_SVXBMP_EDITBOX, SID_FM_EDIT, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_CHECKBOX, SID_FM_CHECKBOX, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_COMBOBOX, SID_FM_COMBOBOX, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_LISTBOX, SID_FM_LISTBOX, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_DATEFIELD, SID_FM_DATEFIELD, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_TIMEFIELD, SID_FM_TIMEFIELD, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_NUMERICFIELD, SID_FM_NUMERICFIELD, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_CURRENCYFIELD, SID_FM_CURRENCYFIELD, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_PATTERNFIELD, SID_FM_PATTERNFIELD, pMenu, *pControlMenu, bDesignMode);
- SetMenuItem(RID_SVXBMP_FORMATTEDFIELD, SID_FM_FORMATTEDFIELD, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_EDITBOX, FM_COL_TEXTFIELD, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_CHECKBOX, FM_COL_CHECKBOX, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_COMBOBOX, FM_COL_COMBOBOX, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_LISTBOX, FM_COL_LISTBOX, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_DATEFIELD, FM_COL_DATEFIELD, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_TIMEFIELD, FM_COL_TIMEFIELD, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_NUMERICFIELD, FM_COL_NUMERICFIELD, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_CURRENCYFIELD, FM_COL_CURRENCYFIELD, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_PATTERNFIELD, FM_COL_PATTERNFIELD, *pMenu, bDesignMode);
+ SetMenuItem(RID_SVXBMP_FORMATTEDFIELD, FM_COL_FORMATTEDFIELD, *pMenu, bDesignMode);
}
if (pMenu && xCols.is() && nColId)
@@ -716,27 +696,30 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
}
}
- pControlMenu->EnableItem(SID_FM_EDIT + nChangeTypeOffset, bDesignMode && (nColType != TYPE_TEXTFIELD));
- pControlMenu->EnableItem(SID_FM_COMBOBOX + nChangeTypeOffset, bDesignMode && (nColType != TYPE_COMBOBOX));
- pControlMenu->EnableItem(SID_FM_LISTBOX + nChangeTypeOffset, bDesignMode && (nColType != TYPE_LISTBOX));
- pControlMenu->EnableItem(SID_FM_CHECKBOX + nChangeTypeOffset, bDesignMode && (nColType != TYPE_CHECKBOX));
- pControlMenu->EnableItem(SID_FM_DATEFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_DATEFIELD));
- pControlMenu->EnableItem(SID_FM_NUMERICFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_NUMERICFIELD));
- pControlMenu->EnableItem(SID_FM_TIMEFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_TIMEFIELD));
- pControlMenu->EnableItem(SID_FM_CURRENCYFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_CURRENCYFIELD));
- pControlMenu->EnableItem(SID_FM_PATTERNFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_PATTERNFIELD));
- pControlMenu->EnableItem(SID_FM_FORMATTEDFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_FORMATTEDFIELD));
- rMenu.SetPopupMenu(SID_FM_CHANGECOL, pControlMenu);
+ PopupMenu* pControlMenu = rMenu.GetPopupMenu(rMenu.GetItemId("change"));
+ if (pControlMenu)
+ {
+ SetMenuItem(RID_SVXBMP_EDITBOX, FM_COL_TEXTFIELD"1", *pControlMenu, bDesignMode && (nColType != TYPE_TEXTFIELD));
+ SetMenuItem(RID_SVXBMP_CHECKBOX, FM_COL_CHECKBOX"1", *pControlMenu, bDesignMode && (nColType != TYPE_CHECKBOX));
+ SetMenuItem(RID_SVXBMP_COMBOBOX, FM_COL_COMBOBOX"1", *pControlMenu, bDesignMode && (nColType != TYPE_COMBOBOX));
+ SetMenuItem(RID_SVXBMP_LISTBOX, FM_COL_LISTBOX"1", *pControlMenu, bDesignMode && (nColType != TYPE_LISTBOX));
+ SetMenuItem(RID_SVXBMP_DATEFIELD, FM_COL_DATEFIELD"1", *pControlMenu, bDesignMode && (nColType != TYPE_DATEFIELD));
+ SetMenuItem(RID_SVXBMP_TIMEFIELD, FM_COL_TIMEFIELD"1", *pControlMenu, bDesignMode && (nColType != TYPE_TIMEFIELD));
+ SetMenuItem(RID_SVXBMP_NUMERICFIELD, FM_COL_NUMERICFIELD"1", *pControlMenu, bDesignMode && (nColType != TYPE_NUMERICFIELD));
+ SetMenuItem(RID_SVXBMP_CURRENCYFIELD, FM_COL_CURRENCYFIELD"1", *pControlMenu, bDesignMode && (nColType != TYPE_CURRENCYFIELD));
+ SetMenuItem(RID_SVXBMP_PATTERNFIELD, FM_COL_PATTERNFIELD"1", *pControlMenu, bDesignMode && (nColType != TYPE_PATTERNFIELD));
+ SetMenuItem(RID_SVXBMP_FORMATTEDFIELD, FM_COL_FORMATTEDFIELD"1", *pControlMenu, bDesignMode && (nColType != TYPE_FORMATTEDFIELD));
+ }
+ rMenu.EnableItem(rMenu.GetItemId("change"), bDesignMode && bMarked && xCols.is());
}
else
- pControlMenu.disposeAndClear();
+ rMenu.EnableItem(rMenu.GetItemId("change"), false);
- rMenu.EnableItem(SID_FM_INSERTCOL, bDesignMode && xCols.is());
- rMenu.EnableItem(SID_FM_DELETECOL, bDesignMode && bMarked && xCols.is());
- rMenu.EnableItem(SID_FM_CHANGECOL, bDesignMode && bMarked && xCols.is());
- rMenu.EnableItem(SID_FM_SHOW_PROPERTY_BROWSER, bDesignMode && bMarked && xCols.is());
+ rMenu.EnableItem(rMenu.GetItemId("insert"), bDesignMode && xCols.is());
+ rMenu.EnableItem(rMenu.GetItemId("delete"), bDesignMode && bMarked && xCols.is());
+ rMenu.EnableItem(rMenu.GetItemId("column"), bDesignMode && bMarked && xCols.is());
- PopupMenu* pShowColsMenu = rMenu.GetPopupMenu(SID_FM_SHOWCOLS);
+ PopupMenu* pShowColsMenu = rMenu.GetPopupMenu(rMenu.GetItemId("show"));
sal_uInt16 nHiddenCols = 0;
if (pShowColsMenu)
{
@@ -766,8 +749,8 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
}
}
}
- pShowColsMenu->EnableItem(SID_FM_SHOWCOLS_MORE, xCols.is() && (nHiddenCols > 16));
- pShowColsMenu->EnableItem(SID_FM_SHOWALLCOLS, xCols.is() && (nHiddenCols > 0));
+ pShowColsMenu->EnableItem(pShowColsMenu->GetItemId("more"), xCols.is() && (nHiddenCols > 16));
+ pShowColsMenu->EnableItem(pShowColsMenu->GetItemId("all"), xCols.is() && (nHiddenCols > 0));
}
// allow the 'hide column' item ?
@@ -775,7 +758,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
bAllowHide = bAllowHide || (!bDesignMode && (nPos != (sal_uInt16)-1)); // OR we are in alive mode and have hit a column
bAllowHide = bAllowHide && xCols.is(); // AND we have a column container
bAllowHide = bAllowHide && (xCols->getCount()-nHiddenCols > 1); // AND there are at least two visible columns
- rMenu.EnableItem(SID_FM_HIDECOL, bAllowHide);
+ rMenu.EnableItem(rMenu.GetItemId("hide"), bAllowHide);
if (bMarked)
{
@@ -791,7 +774,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
if (eState >= SfxItemState::DEFAULT && pItem.get() != nullptr )
{
bool bChecked = dynamic_cast<const SfxBoolItem*>( pItem.get()) != nullptr && static_cast<SfxBoolItem*>(pItem.get())->GetValue();
- rMenu.CheckItem(SID_FM_SHOW_PROPERTY_BROWSER,bChecked);
+ rMenu.CheckItem(rMenu.GetItemId("column"), bChecked);
}
}
}
@@ -808,129 +791,143 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
bool bReplace = false;
InspectorAction eInspectorAction = eNone;
Reference< XPropertySet > xColumnToInspect;
- switch (nExecutionResult)
+
+ OString sExecutionResult = rMenu.GetCurItemIdent();
+ if (sExecutionResult.isEmpty())
{
- case SID_FM_DELETECOL:
- {
- Reference< XInterface > xCol(
- xCols->getByIndex(nPos), css::uno::UNO_QUERY);
- xCols->removeByIndex(nPos);
- ::comphelper::disposeComponent(xCol);
- } break;
- case SID_FM_SHOW_PROPERTY_BROWSER:
- eInspectorAction = rMenu.IsItemChecked( SID_FM_SHOW_PROPERTY_BROWSER ) ? eOpenInspector : eCloseInspector;
- xColumnToInspect.set( xCols->getByIndex( nPos ), UNO_QUERY );
- break;
- case SID_FM_EDIT + nChangeTypeOffset:
+ PopupMenu* pMenu = rMenu.GetPopupMenu(rMenu.GetItemId("insert"));
+ if (pMenu)
+ sExecutionResult = pMenu->GetCurItemIdent();
+ }
+ if (sExecutionResult.isEmpty())
+ {
+ PopupMenu* pMenu = rMenu.GetPopupMenu(rMenu.GetItemId("change"));
+ if (pMenu)
+ sExecutionResult = pMenu->GetCurItemIdent();
+ }
+ if (sExecutionResult.isEmpty())
+ {
+ PopupMenu* pMenu = rMenu.GetPopupMenu(rMenu.GetItemId("show"));
+ if (pMenu)
+ sExecutionResult = pMenu->GetCurItemIdent();
+ }
+
+ if (sExecutionResult == "delete")
+ {
+ Reference< XInterface > xCol(
+ xCols->getByIndex(nPos), css::uno::UNO_QUERY);
+ xCols->removeByIndex(nPos);
+ ::comphelper::disposeComponent(xCol);
+ }
+ else if (sExecutionResult == "hide")
+ {
+ Reference< css::beans::XPropertySet > xCurCol( xCols->getByIndex(nPos), css::uno::UNO_QUERY);
+ xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny(true));
+ }
+ else if (sExecutionResult == "column")
+ {
+ eInspectorAction = rMenu.IsItemChecked(rMenu.GetItemId("column")) ? eOpenInspector : eCloseInspector;
+ xColumnToInspect.set( xCols->getByIndex( nPos ), UNO_QUERY );
+ }
+ else if (sExecutionResult.startsWith(FM_COL_TEXTFIELD))
+ {
+ if (sExecutionResult != FM_COL_TEXTFIELD)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_EDIT:
- aFieldType = FM_COL_TEXTFIELD;
- break;
- case SID_FM_COMBOBOX + nChangeTypeOffset:
+ aFieldType = FM_COL_TEXTFIELD;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_COMBOBOX))
+ {
+ if (sExecutionResult != FM_COL_COMBOBOX)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_COMBOBOX:
- aFieldType = FM_COL_COMBOBOX;
- break;
- case SID_FM_LISTBOX + nChangeTypeOffset:
+ aFieldType = FM_COL_COMBOBOX;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_LISTBOX))
+ {
+ if (sExecutionResult != FM_COL_LISTBOX)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_LISTBOX:
- aFieldType = FM_COL_LISTBOX;
- break;
- case SID_FM_CHECKBOX + nChangeTypeOffset:
+ aFieldType = FM_COL_LISTBOX;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_CHECKBOX))
+ {
+ if (sExecutionResult != FM_COL_CHECKBOX)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_CHECKBOX:
- aFieldType = FM_COL_CHECKBOX;
- break;
- case SID_FM_DATEFIELD + nChangeTypeOffset:
+ aFieldType = FM_COL_CHECKBOX;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_DATEFIELD))
+ {
+ if (sExecutionResult != FM_COL_DATEFIELD)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_DATEFIELD:
- aFieldType = FM_COL_DATEFIELD;
- break;
- case SID_FM_TIMEFIELD + nChangeTypeOffset:
+ aFieldType = FM_COL_DATEFIELD;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_TIMEFIELD))
+ {
+ if (sExecutionResult != FM_COL_TIMEFIELD)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_TIMEFIELD:
- aFieldType = FM_COL_TIMEFIELD;
- break;
- case SID_FM_NUMERICFIELD + nChangeTypeOffset:
+ aFieldType = FM_COL_TIMEFIELD;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_NUMERICFIELD))
+ {
+ if (sExecutionResult != FM_COL_NUMERICFIELD)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_NUMERICFIELD:
- aFieldType = FM_COL_NUMERICFIELD;
- break;
- case SID_FM_CURRENCYFIELD + nChangeTypeOffset:
+ aFieldType = FM_COL_NUMERICFIELD;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_CURRENCYFIELD))
+ {
+ if (sExecutionResult != FM_COL_CURRENCYFIELD)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_CURRENCYFIELD:
- aFieldType = FM_COL_CURRENCYFIELD;
- break;
- case SID_FM_PATTERNFIELD + nChangeTypeOffset:
+ aFieldType = FM_COL_CURRENCYFIELD;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_PATTERNFIELD))
+ {
+ if (sExecutionResult != FM_COL_PATTERNFIELD)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_PATTERNFIELD:
- aFieldType = FM_COL_PATTERNFIELD;
- break;
- case SID_FM_FORMATTEDFIELD + nChangeTypeOffset:
+ aFieldType = FM_COL_PATTERNFIELD;
+ }
+ else if (sExecutionResult.startsWith(FM_COL_FORMATTEDFIELD))
+ {
+ if (sExecutionResult != FM_COL_FORMATTEDFIELD)
bReplace = true;
- SAL_FALLTHROUGH;
- case SID_FM_FORMATTEDFIELD:
- aFieldType = FM_COL_FORMATTEDFIELD;
- break;
- case SID_FM_HIDECOL:
+ aFieldType = FM_COL_FORMATTEDFIELD;
+ }
+ else if (sExecutionResult == "more")
+ {
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if(pFact)
{
- Reference< css::beans::XPropertySet > xCurCol( xCols->getByIndex(nPos), css::uno::UNO_QUERY);
- xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny(true));
+ ScopedVclPtr<AbstractFmShowColsDialog> pDlg(pFact->CreateFmShowColsDialog());
+ DBG_ASSERT(pDlg, "Dialog creation failed!");
+ pDlg->SetColumns(xCols);
+ pDlg->Execute();
}
- break;
- case SID_FM_SHOWCOLS_MORE:
- {
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if(pFact)
- {
- ScopedVclPtr<AbstractFmShowColsDialog> pDlg(pFact->CreateFmShowColsDialog());
- DBG_ASSERT(pDlg, "Dialog creation failed!");
- pDlg->SetColumns(xCols);
- pDlg->Execute();
- }
- }
- break;
- case SID_FM_SHOWALLCOLS:
+ }
+ else if (sExecutionResult == "all")
+ {
+ // just iterate through all the cols ...
+ Reference< css::beans::XPropertySet > xCurCol;
+ for (sal_Int32 i=0; i<xCols->getCount(); ++i)
{
- // just iterate through all the cols ...
- Reference< css::beans::XPropertySet > xCurCol;
- for (sal_Int32 i=0; i<xCols->getCount(); ++i)
- {
- xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
- xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny(false));
- }
- // TODO : there must be a more clever way to do this ....
- // with the above the view is updated after every single model update ...
+ xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
+ xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny(false));
}
- break;
- default:
- if (nExecutionResult>0 && nExecutionResult<=16)
- { // it was a "show column/<colname>" command (there are at most 16 such items)
- // search the nExecutionResult'th hidden col
- Reference< css::beans::XPropertySet > xCurCol;
- for (sal_Int32 i=0; i<xCols->getCount() && nExecutionResult; ++i)
+ // TODO : there must be a more clever way to do this ....
+ // with the above the view is updated after every single model update ...
+ }
+ else if (nExecutionResult>0 && nExecutionResult<=16)
+ { // it was a "show column/<colname>" command (there are at most 16 such items)
+ // search the nExecutionResult'th hidden col
+ Reference< css::beans::XPropertySet > xCurCol;
+ for (sal_Int32 i=0; i<xCols->getCount() && nExecutionResult; ++i)
+ {
+ xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
+ Any aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
+ if (::comphelper::getBOOL(aHidden))
+ if (!--nExecutionResult)
{
- xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
- Any aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
- if (::comphelper::getBOOL(aHidden))
- if (!--nExecutionResult)
- {
- xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny(false));
- break;
- }
+ xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny(false));
+ break;
}
- }
- break;
+ }
}
if ( !aFieldType.isEmpty() )
@@ -1002,7 +999,8 @@ void FmGridHeader::triggerColumnContextMenu( const ::Point& _rPreferredPos )
sal_uInt16 nColId = GetItemId( _rPreferredPos );
// the menu
- ScopedVclPtrInstance<PopupMenu> aContextMenu( SVX_RES( RID_SVXMNU_COLS ) );
+ VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/colsmenu.ui", "");
+ VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
// let derivees modify the menu
PreExecuteColumnContextMenu( nColId, *aContextMenu );
diff --git a/svx/source/fmcomp/gridctrl.src b/svx/source/fmcomp/gridctrl.src
deleted file mode 100644
index 443537dea90e..000000000000
--- a/svx/source/fmcomp/gridctrl.src
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "svx/fmresids.hrc"
-#include <svx/svxids.hrc>
-#include "fmhelp.hrc"
-#include <svx/svxcommands.h>
-
-Menu RID_SVXMNU_COLS
-{
- ItemList =
- {
- MenuItem
- {
- Identifier = SID_FM_INSERTCOL ;
- HelpId = HID_FM_INSERTCOL ;
- Text [ en-US ] = "Insert ~Column" ;
- SubMenu = Menu
- {
- ItemList =
- {
- MenuItem
- {
- Identifier = SID_FM_EDIT ;
- HelpId = CMD_SID_FM_EDIT ;
- Text [ en-US ] = "Text Box" ;
- };
- MenuItem
- {
- Identifier = SID_FM_CHECKBOX ;
- HelpId = CMD_SID_FM_CHECKBOX ;
- Text [ en-US ] = "Check Box" ;
- };
- MenuItem
- {
- Identifier = SID_FM_COMBOBOX ;
- HelpId = CMD_SID_FM_COMBOBOX ;
- Text [ en-US ] = "Combo Box" ;
- };
- MenuItem
- {
- Identifier = SID_FM_LISTBOX ;
- HelpId = CMD_SID_FM_LISTBOX ;
- Text [ en-US ] = "List Box" ;
- };
- MenuItem
- {
- Identifier = SID_FM_DATEFIELD ;
- HelpId = CMD_SID_FM_DATEFIELD ;
- Text [ en-US ] = "Date Field" ;
- };
- MenuItem
- {
- Identifier = SID_FM_TIMEFIELD ;
- HelpId = CMD_SID_FM_TIMEFIELD ;
- Text [ en-US ] = "Time Field" ;
- };
- MenuItem
- {
- Identifier = SID_FM_NUMERICFIELD ;
- HelpId = CMD_SID_FM_NUMERICFIELD ;
- Text [ en-US ] = "Numeric Field" ;
- };
- MenuItem
- {
- Identifier = SID_FM_CURRENCYFIELD ;
- HelpId = CMD_SID_FM_CURRENCYFIELD ;
- Text [ en-US ] = "Currency Field" ;
- };
- MenuItem
- {
- Identifier = SID_FM_PATTERNFIELD ;
- HelpId = CMD_SID_FM_PATTERNFIELD ;
- Text [ en-US ] = "Pattern Field" ;
- };
- MenuItem
- {
- Identifier = SID_FM_FORMATTEDFIELD ;
- HelpId = CMD_SID_FM_FORMATTEDFIELD ;
- Text [ en-US ] = "Formatted Field" ;
- };
- MenuItem
- {
- // this is a dummy which is never used herein but for copy to newly built menus
- Identifier = SID_FM_TWOFIELDS_DATE_N_TIME;
- HelpId = HID_CONTROLS_DATE_N_TIME;
- Text [ en-US ] = "Date and Time Field" ;
- Disable = True;
- };
- };
- };
- };
- MenuItem
- {
- Identifier = SID_FM_CHANGECOL ;
- HelpId = HID_FM_CHANGECOL ;
- Text [ en-US ] = "~Replace with" ;
- };
- MenuItem
- {
- Identifier = SID_FM_DELETECOL ;
- HelpId = HID_FM_DELETECOL ;
- Text [ en-US ] = "Delete Column" ;
- };
- MenuItem
- {
- Identifier = SID_FM_HIDECOL ;
- HelpId = HID_FM_HIDECOL ;
- Text [ en-US ] = "~Hide Column";
- };
- MenuItem
- {
- Identifier = SID_FM_SHOWCOLS ;
- HelpId = HID_FM_SHOWCOLS ;
- SubMenu = Menu
- {
- ItemList =
- {
- MenuItem
- {
- Identifier = SID_FM_SHOWCOLS_MORE ;
- HelpId = HID_FM_SHOWCOLS_MORE ;
- Text [ en-US ] = "~More...";
- };
- MenuItem
- {
- Separator = TRUE ;
- };
- MenuItem
- {
- Identifier = SID_FM_SHOWALLCOLS ;
- HelpId = HID_FM_SHOWALLCOLS ;
- Text [ en-US ] = "~All";
- };
- };
- };
- Text [ en-US ] = "~Show Columns";
- };
- MenuItem
- {
- Identifier = SID_FM_SHOW_PROPERTY_BROWSER ;
- HelpId = CMD_SID_FM_SHOW_PROPERTY_BROWSER ;
- Text [ en-US ] = "Column..." ;
- };
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/colsmenu.ui b/svx/uiconfig/ui/colsmenu.ui
new file mode 100644
index 000000000000..9686a30cfd65
--- /dev/null
+++ b/svx/uiconfig/ui/colsmenu.ui
@@ -0,0 +1,271 @@
+<?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="insert">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Insert _Column</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="TextField">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Text Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="CheckBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Check Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="ComboBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Combo Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="ListBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">List Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="DateField">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Date Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="TimeField">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Time Field</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="NumericField">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Numeric Field</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="CurrencyField">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Currency Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="PatternField">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Pattern Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="FormattedField">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Formatted Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="dateandtimefield">
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Date and Time Field</property>
+ <property name="visible">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="change">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Replace with</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="TextField1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Text Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="CheckBox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Check Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="ComboBox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Combo Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="ListBox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">List Box</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="DateField1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Date Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="TimeField1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Time Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="NumericField1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Numeric Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="CurrencyField1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Currency Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="PatternField1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Pattern Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="FormattedField1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Formatted Field</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="dateandtimefield1">
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Date and Time Field</property>
+ <property name="visible">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </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 column</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="hide">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Hide Column</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="show">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Show Columns</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="more">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_More~More...</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="all">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_All</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="column">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Column...</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+</interface>