summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2017-07-28 17:11:28 +0300
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-09-04 22:39:45 +0200
commitd69f9436b59e249af8dcac88ccadf09b920b1bab (patch)
treee88f365c22ef94ad59e1a8d171f96d0093128299 /cui
parent690d7bd3174fb5ccb4c6c2467626ee119eea0453 (diff)
Convert UI of Customize Dialog to the new design
* Elements of the old design have been removed from both the .ui file and the .cxx/.hxx files. * New elements for the new design have been added to the .ui file. * Menu, Toolbar and Context menu tabs now resemble the new design Change-Id: Ib602e0a4b9419d16adaa4ff6aa23b74097a3b88d Reviewed-on: https://gerrit.libreoffice.org/40468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
Diffstat (limited to 'cui')
-rw-r--r--cui/inc/strings.hrc2
-rw-r--r--cui/source/customize/SvxMenuConfigPage.cxx242
-rw-r--r--cui/source/customize/SvxToolbarConfigPage.cxx580
-rw-r--r--cui/source/customize/cfg.cxx66
-rw-r--r--cui/source/inc/SvxMenuConfigPage.hxx8
-rw-r--r--cui/source/inc/SvxToolbarConfigPage.hxx11
-rw-r--r--cui/source/inc/cfg.hxx27
-rw-r--r--cui/uiconfig/ui/customizedialog.ui14
-rw-r--r--cui/uiconfig/ui/menuassignpage.ui783
9 files changed, 365 insertions, 1368 deletions
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 2a82447321d3..74b0bcb4f80e 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -59,7 +59,7 @@
#define RID_SVXSTR_PRODUCTNAME_TOOLBARS NC_("RID_SVXSTR_PRODUCTNAME_TOOLBARS", "%PRODUCTNAME %MODULENAME Toolbars")
#define RID_SVXSTR_PRODUCTNAME_CONTEXTMENUS NC_("RID_SVXSTR_PRODUCTNAME_CONTEXTMENUS", "%PRODUCTNAME %MODULENAME Context Menus")
#define RID_SVXSTR_TOOLBAR NC_("RID_SVXSTR_TOOLBAR", "Toolbar")
-#define RID_SVXSTR_TOOLBAR_CONTENT NC_("RID_SVXSTR_TOOLBAR_CONTENT", "Toolbar Content")
+//#define RID_SVXSTR_TOOLBAR_CONTENT NC_("RID_SVXSTR_TOOLBAR_CONTENT", "Toolbar Content")
#define RID_SVXSTR_COMMANDS NC_("RID_SVXSTR_COMMANDS", "Commands")
#define RID_SXVSTR_CONFIRM_DELETE_TOOLBAR NC_("RID_SXVSTR_CONFIRM_DELETE_TOOLBAR", "There are no more commands on the toolbar. Do you want to delete the toolbar?")
/* Translators: Do not translate %SAVE IN SELECTION% It is a placeholder
diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx
index 71fd43c1391d..5b6afcce5353 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -113,8 +113,12 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe
m_pContentsListBox->set_vexpand(true);
m_pContentsListBox->Show();
- m_pAddSubmenuButton->Enable();
- m_pAddSubmenuButton->Show();
+ m_pFunctionsListBox = VclPtr<SvxMenuEntriesListBox>::Create(m_pFunctions, this);
+ m_pFunctionsListBox->set_grid_left_attach(0);
+ m_pFunctionsListBox->set_grid_top_attach(0);
+ m_pFunctionsListBox->set_hexpand(true);
+ m_pFunctionsListBox->set_vexpand(true);
+ m_pFunctionsListBox->Show();
m_pTopLevelListBox->SetSelectHdl(
LINK( this, SvxMenuConfigPage, SelectMenu ) );
@@ -124,43 +128,6 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe
m_pMoveUpButton->SetClickHdl ( LINK( this, SvxConfigPage, MoveHdl) );
m_pMoveDownButton->SetClickHdl ( LINK( this, SvxConfigPage, MoveHdl) );
-
- m_pNewTopLevelButton->SetClickHdl (
- LINK( this, SvxMenuConfigPage, NewMenuHdl ) );
-
- m_pAddCommandsButton->SetClickHdl (
- LINK( this, SvxMenuConfigPage, AddCommandsHdl ) );
-
- m_pAddSeparatorButton->SetClickHdl (
- LINK( this, SvxMenuConfigPage, AddSeparatorHdl ) );
-
- m_pAddSubmenuButton->SetClickHdl (
- LINK( this, SvxMenuConfigPage, AddSubmenuHdl ) );
-
- m_pDeleteCommandButton->SetClickHdl (
- LINK( this, SvxMenuConfigPage, DeleteCommandHdl ) );
-
- PopupMenu* pMenu = m_pModifyTopLevelButton->GetPopupMenu();
- pMenu->SetMenuFlags(
- pMenu->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
-
- m_pModifyTopLevelButton->SetSelectHdl(
- LINK( this, SvxMenuConfigPage, MenuSelectHdl ) );
-
- PopupMenu* pEntry = m_pModifyCommandButton->GetPopupMenu();
- pEntry->SetMenuFlags(
- pEntry->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
-
- m_pModifyCommandButton->SetSelectHdl(
- LINK( this, SvxMenuConfigPage, EntrySelectHdl ) );
-
- if ( !bIsMenuBar )
- {
- m_pTopLevel->set_label( CuiResId( RID_SVXSTR_PRODUCTNAME_CONTEXTMENUS ) );
- m_pNewTopLevelButton->Hide();
- pMenu->HideItem( pMenu->GetItemId( "move" ) );
- pMenu->HideItem( pMenu->GetItemId( "menuitem3" ) );
- }
}
SvxMenuConfigPage::~SvxMenuConfigPage()
@@ -199,7 +166,6 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, SelectMenuEntry, SvTreeListBox *, void )
void SvxMenuConfigPage::UpdateButtonStates()
{
- PopupMenu* pPopup = m_pModifyCommandButton->GetPopupMenu();
// Disable Up and Down buttons depending on current selection
SvTreeListEntry* selection = m_pContentsListBox->GetCurEntry();
@@ -208,9 +174,6 @@ void SvxMenuConfigPage::UpdateButtonStates()
{
m_pMoveUpButton->Enable( false );
m_pMoveDownButton->Enable( false );
- m_pDeleteCommandButton->Enable(false);
-
- pPopup->EnableItem( "modrename", false );
m_pDescriptionField->SetText("");
@@ -228,20 +191,10 @@ void SvxMenuConfigPage::UpdateButtonStates()
if ( pEntryData->IsSeparator() )
{
- pPopup->EnableItem( "modrename", false );
-
m_pDescriptionField->SetText("");
-
- m_pAddSeparatorButton->Enable( false );
- m_pDeleteCommandButton->Enable();
}
else
{
- pPopup->EnableItem( "modrename" );
-
- m_pDeleteCommandButton->Enable();
- m_pAddSeparatorButton->Enable();
-
m_pDescriptionField->SetText(pEntryData->GetHelpText());
}
}
@@ -313,19 +266,9 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, SelectMenu, ListBox&, void )
m_pContentsListBox->Clear();
SvxConfigEntry* pMenuData = GetTopLevelSelection();
- m_pModifyTopLevelButton->Enable( pMenuData != nullptr );
- m_pModifyCommandButton->Enable( pMenuData != nullptr );
- m_pAddCommandsButton->Enable( pMenuData != nullptr );
- m_pAddSeparatorButton->Enable( pMenuData != nullptr );
- m_pAddSubmenuButton->Enable( pMenuData != nullptr );
- PopupMenu* pPopup = m_pModifyTopLevelButton->GetPopupMenu();
if ( pMenuData )
{
- pPopup->EnableItem( "delete", pMenuData->IsDeletable() );
- pPopup->EnableItem( "rename", pMenuData->IsRenamable() );
- pPopup->EnableItem( "move", pMenuData->IsMovable() );
-
SvxEntries* pEntries = pMenuData->GetEntries();
SvxEntries::const_iterator iter = pEntries->begin();
@@ -339,179 +282,6 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, SelectMenu, ListBox&, void )
UpdateButtonStates();
}
-IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton, void )
-{
- OString sIdent = pButton->GetCurItemIdent();
-
- if (sIdent == "delete")
- {
- DeleteSelectedTopLevel();
- }
- else if (sIdent == "rename")
- {
- SvxConfigEntry* pMenuData = GetTopLevelSelection();
-
- OUString aNewName( SvxConfigPageHelper::stripHotKey( pMenuData->GetName() ) );
- OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME );
-
- VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
- pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU );
- pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_MENU ) );
-
- if ( pNameDialog->Execute() == RET_OK ) {
- pNameDialog->GetName( aNewName );
- pMenuData->SetName( aNewName );
-
- ReloadTopLevelListBox();
-
- GetSaveInData()->SetModified();
- }
- }
- else if (sIdent == "move")
- {
- SvxConfigEntry* pMenuData = GetTopLevelSelection();
-
- VclPtr<SvxMainMenuOrganizerDialog> pDialog(
- VclPtr<SvxMainMenuOrganizerDialog>::Create( this,
- GetSaveInData()->GetEntries(), pMenuData ));
-
- if ( pDialog->Execute() == RET_OK )
- {
- GetSaveInData()->SetEntries( pDialog->GetEntries() );
-
- ReloadTopLevelListBox( pDialog->GetSelectedEntry() );
-
- GetSaveInData()->SetModified();
- }
- }
-}
-
-IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
-{
- OString sIdent = pButton->GetCurItemIdent();
- if (sIdent == "modrename")
- {
- SvTreeListEntry* pActEntry = m_pContentsListBox->GetCurEntry();
- SvxConfigEntry* pEntry =
- static_cast<SvxConfigEntry*>(pActEntry->GetUserData());
-
- OUString aNewName( SvxConfigPageHelper::stripHotKey( pEntry->GetName() ) );
- OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME );
-
- VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
- pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM );
- pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_MENU ) );
-
- if ( pNameDialog->Execute() == RET_OK ) {
- pNameDialog->GetName(aNewName);
-
- pEntry->SetName( aNewName );
- m_pContentsListBox->SetEntryText( pActEntry, aNewName );
-
- GetSaveInData()->SetModified();
- GetTopLevelSelection()->SetModified();
- }
- }
- else
- {
- return;
- }
-
- if ( GetSaveInData()->IsModified() )
- {
- UpdateButtonStates();
- }
-}
-
-IMPL_LINK_NOARG( SvxMenuConfigPage, AddFunctionHdl, SvxScriptSelectorDialog&, void )
-{
- AddFunction();
-}
-
-IMPL_LINK_NOARG( SvxMenuConfigPage, NewMenuHdl, Button *, void )
-{
- VclPtrInstance<SvxMainMenuOrganizerDialog> pDialog(
- nullptr, GetSaveInData()->GetEntries(), nullptr, true );
-
- if ( pDialog->Execute() == RET_OK )
- {
- GetSaveInData()->SetEntries( pDialog->GetEntries() );
- ReloadTopLevelListBox( pDialog->GetSelectedEntry() );
- GetSaveInData()->SetModified();
- }
-}
-
-IMPL_LINK_NOARG( SvxMenuConfigPage, AddCommandsHdl, Button *, void )
-{
- if ( m_pSelectorDlg == nullptr )
- {
- // Create Script Selector which also shows builtin commands
- m_pSelectorDlg = VclPtr<SvxScriptSelectorDialog>::Create( this, true, m_xFrame );
-
- m_pSelectorDlg->SetAddHdl(
- LINK( this, SvxMenuConfigPage, AddFunctionHdl ) );
-
- m_pSelectorDlg->SetDialogDescription( CuiResId( RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION ) );
- }
-
- // Position the Script Selector over the Add button so it is
- // beside the menu contents list and does not obscure it
- m_pSelectorDlg->SetPosPixel( m_pAddCommandsButton->GetPosPixel() );
-
- m_pSelectorDlg->SetImageProvider( GetSaveInData() );
-
- m_pSelectorDlg->Execute();
-}
-
-IMPL_LINK_NOARG( SvxMenuConfigPage, AddSeparatorHdl, Button *, void )
-{
- SvxConfigEntry* pNewEntryData = new SvxConfigEntry;
- pNewEntryData->SetUserDefined();
- InsertEntry( pNewEntryData );
-
- if ( GetSaveInData()->IsModified() )
- {
- UpdateButtonStates();
- }
-}
-
-IMPL_LINK_NOARG( SvxMenuConfigPage, AddSubmenuHdl, Button *, void )
-{
- OUString aNewName;
- OUString aDesc = CuiResId( RID_SVXSTR_SUBMENU_NAME );
-
- VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
- pNameDialog->SetHelpId( HID_SVX_CONFIG_NAME_SUBMENU );
- pNameDialog->SetText( CuiResId( RID_SVXSTR_ADD_SUBMENU ) );
-
- if ( pNameDialog->Execute() == RET_OK )
- {
- pNameDialog->GetName(aNewName);
-
- SvxConfigEntry* pNewEntryData =
- new SvxConfigEntry( aNewName, aNewName, true );
- pNewEntryData->SetName( aNewName );
- pNewEntryData->SetUserDefined();
-
- InsertEntry( pNewEntryData );
-
- ReloadTopLevelListBox();
-
- GetSaveInData()->SetModified();
-
- UpdateButtonStates();
- }
-}
-
-IMPL_LINK_NOARG( SvxMenuConfigPage, DeleteCommandHdl, Button *, void )
-{
- DeleteSelectedContent();
- if ( GetSaveInData()->IsModified() )
- {
- UpdateButtonStates();
- }
-}
-
SaveInData* SvxMenuConfigPage::CreateSaveInData(
const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index 90995f40ae3e..9f8968120d6a 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -104,8 +104,6 @@
SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSet& rSet)
: SvxConfigPage(pParent, rSet)
- , m_pMenu(get_menu("modifymenu"))
- , m_pEntry(get_menu("contentmenu"))
{
SetHelpId( HID_SVX_CONFIG_TOOLBAR );
@@ -116,68 +114,25 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
m_pContentsListBox->set_vexpand(true);
m_pContentsListBox->Show();
+ m_pFunctionsListBox = VclPtr<SvxToolbarEntriesListBox>::Create(m_pFunctions, this);
+ m_pFunctionsListBox->set_grid_left_attach(0);
+ m_pFunctionsListBox->set_grid_top_attach(0);
+ m_pFunctionsListBox->set_hexpand(true);
+ m_pFunctionsListBox->set_vexpand(true);
+ m_pFunctionsListBox->Show();
+
m_pTopLevelListBox->SetHelpId ( HID_SVX_TOPLEVELLISTBOX );
- m_pIconsOnlyRB->SetHelpId ( HID_SVX_ICONSONLY );
- m_pTextOnlyRB->SetHelpId ( HID_SVX_TEXTONLY );
- m_pIconsAndTextRB->SetHelpId ( HID_SVX_ICONSANDTEXT );
m_pContentsListBox->SetHelpId( HID_SVX_CONFIG_TOOLBAR_CONTENTS );
- m_pNewTopLevelButton->SetHelpId( HID_SVX_NEW_TOOLBAR );
- m_pModifyTopLevelButton->SetHelpId( HID_SVX_MODIFY_TOOLBAR );
- m_pAddCommandsButton->SetHelpId( HID_SVX_NEW_TOOLBAR_ITEM );
- m_pAddSeparatorButton->SetHelpId ( HID_SVX_ADD_SEPARATOR );
- m_pModifyCommandButton->SetHelpId( HID_SVX_MODIFY_TOOLBAR_ITEM );
- m_pDeleteCommandButton->SetHelpId ( HID_SVX_REMOVEBUTTON );
- m_pResetTopLevelButton->SetHelpId ( HID_SVX_RESETBUTTON );
m_pSaveInListBox->SetHelpId( HID_SVX_SAVE_IN );
m_pMoveUpButton->SetHelpId( HID_SVX_UP_TOOLBAR_ITEM );
m_pMoveDownButton->SetHelpId( HID_SVX_DOWN_TOOLBAR_ITEM );
m_pDescriptionField->SetHelpId ( HID_SVX_DESCFIELD );
- m_pTopLevel->set_label(CuiResId(RID_SVXSTR_PRODUCTNAME_TOOLBARS));
-
- m_pTopLevelLabel->SetText( CuiResId( RID_SVXSTR_TOOLBAR ) );
- m_pModifyTopLevelButton->SetText( CuiResId( RID_SVXSTR_TOOLBAR ) );
- m_pContents->set_label(CuiResId(RID_SVXSTR_TOOLBAR_CONTENT));
- m_pContentsLabel->SetText( CuiResId( RID_SVXSTR_COMMANDS ) );
-
- // The reset button will be used in the toolbar config tab
- m_pResetTopLevelButton->Show();
- // These radio buttons will be used in the toolbar config tab
- m_pIconsOnlyRB->Enable();
- m_pTextOnlyRB->Enable();
- m_pIconsAndTextRB->Enable();
- m_pIconsOnlyRB->Show();
- m_pTextOnlyRB->Show();
- m_pIconsAndTextRB->Show();
- m_pToolbarStyleLabel->Show();
-
m_pTopLevelListBox->SetSelectHdl(
LINK( this, SvxToolbarConfigPage, SelectToolbar ) );
m_pContentsListBox->SetSelectHdl(
LINK( this, SvxToolbarConfigPage, SelectToolbarEntry ) );
- m_pIconsOnlyRB->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, StyleChangeHdl ) );
- m_pTextOnlyRB->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, StyleChangeHdl ) );
- m_pIconsAndTextRB->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, StyleChangeHdl ) );
-
- m_pNewTopLevelButton->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, NewToolbarHdl ) );
-
- m_pAddCommandsButton->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, AddCommandsHdl ) );
-
- m_pAddSeparatorButton->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, AddSeparatorHdl ) );
-
- m_pDeleteCommandButton->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, DeleteCommandHdl ) );
-
- m_pResetTopLevelButton->SetClickHdl (
- LINK( this, SvxToolbarConfigPage, ResetTopLevelHdl ) );
-
m_pMoveUpButton->SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) );
m_pMoveDownButton->SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) );
// Always enable Up and Down buttons
@@ -185,20 +140,6 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
m_pMoveDownButton->Enable();
m_pMoveUpButton->Enable();
- m_pMenu->SetMenuFlags(
- m_pMenu->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
-
- m_pModifyTopLevelButton->SetPopupMenu( m_pMenu );
- m_pModifyTopLevelButton->SetSelectHdl(
- LINK( this, SvxToolbarConfigPage, ToolbarSelectHdl ) );
-
- m_pEntry->SetMenuFlags(
- m_pEntry->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
-
- m_pModifyCommandButton->SetPopupMenu(m_pEntry);
- m_pModifyCommandButton->SetSelectHdl(
- LINK( this, SvxToolbarConfigPage, EntrySelectHdl ) );
-
// default toolbar to select is standardbar unless a different one
// has been passed in
m_aURLToSelect = ITEM_TOOLBAR_URL;
@@ -233,9 +174,6 @@ void SvxToolbarConfigPage::dispose()
}
m_pSaveInListBox->Clear();
- m_pEntry.clear();
- m_pMenu.clear();
-
SvxConfigPage::dispose();
}
@@ -330,285 +268,6 @@ void SvxToolbarConfigPage::MoveEntry( bool bMoveUp )
}
}
-IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton, void )
-{
- sal_Int32 nSelectionPos = m_pTopLevelListBox->GetSelectEntryPos();
-
- SvxConfigEntry* pToolbar =
- static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( nSelectionPos ));
-
- ToolbarSaveInData* pSaveInData = static_cast<ToolbarSaveInData*>( GetSaveInData() );
-
- OString sCommand = m_pMenu->GetItemIdent(pButton->GetCurItemId());
-
- if (sCommand == "modtooldelete")
- {
- DeleteSelectedTopLevel();
- UpdateButtonStates();
- }
- else if (sCommand == "modtoolrename")
- {
- OUString aNewName( SvxConfigPageHelper::stripHotKey( pToolbar->GetName() ) );
- OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME );
-
- VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
- pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR );
- pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_TOOLBAR ) );
-
- if ( pNameDialog->Execute() == RET_OK )
- {
- pNameDialog->GetName(aNewName);
-
- pToolbar->SetName( aNewName );
- pSaveInData->ApplyToolbar( pToolbar );
-
- // have to use remove and insert to change the name
- m_pTopLevelListBox->RemoveEntry( nSelectionPos );
- nSelectionPos =
- m_pTopLevelListBox->InsertEntry( aNewName, nSelectionPos );
- m_pTopLevelListBox->SetEntryData( nSelectionPos, pToolbar );
- m_pTopLevelListBox->SelectEntryPos( nSelectionPos );
- }
- }
-}
-
-IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
-{
- bool bNeedsApply = false;
-
- // get currently selected toolbar
- SvxConfigEntry* pToolbar = GetTopLevelSelection();
-
- OString sCommand = m_pEntry->GetItemIdent(pButton->GetCurItemId());
-
- if (sCommand == "toolrename")
- {
- SvTreeListEntry* pActEntry = m_pContentsListBox->GetCurEntry();
- SvxConfigEntry* pEntry =
- static_cast<SvxConfigEntry*>(pActEntry->GetUserData());
-
- OUString aNewName( SvxConfigPageHelper::stripHotKey( pEntry->GetName() ) );
- OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME );
-
- VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
- pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM );
- pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_TOOLBAR ) );
-
- if ( pNameDialog->Execute() == RET_OK ) {
- pNameDialog->GetName(aNewName);
-
- if( aNewName.isEmpty() ) //tdf#80758 - Accelerator character ("~") is passed as
- pEntry->SetName( "~" ); // the button name in case of empty values.
- else
- pEntry->SetName( aNewName );
-
- m_pContentsListBox->SetEntryText( pActEntry, aNewName );
- bNeedsApply = true;
- }
- }
- else if (sCommand == "toolrestore")
- {
- SvTreeListEntry* pActEntry = m_pContentsListBox->GetCurEntry();
- SvxConfigEntry* pEntry =
- static_cast<SvxConfigEntry*>(pActEntry->GetUserData());
-
- sal_uInt16 nSelectionPos = 0;
-
- // find position of entry within the list
- for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i )
- {
- if ( m_pContentsListBox->GetEntry( nullptr, i ) == pActEntry )
- {
- nSelectionPos = i;
- break;
- }
- }
-
- ToolbarSaveInData* pSaveInData =
- static_cast<ToolbarSaveInData*>( GetSaveInData() );
-
- OUString aSystemName =
- pSaveInData->GetSystemUIName( pEntry->GetCommand() );
-
- if ( !pEntry->GetName().equals( aSystemName ) )
- {
- pEntry->SetName( aSystemName );
- m_pContentsListBox->SetEntryText(
- pActEntry, SvxConfigPageHelper::stripHotKey( aSystemName ) );
- bNeedsApply = true;
- }
-
- css::uno::Sequence<OUString> aURLSeq { pEntry->GetCommand() };
-
- try
- {
- GetSaveInData()->GetImageManager()->removeImages(
- SvxConfigPageHelper::GetImageType(), aURLSeq );
-
- // reset backup in entry
- pEntry->SetBackupGraphic(
- css::uno::Reference< css::graphic::XGraphic >() );
-
- GetSaveInData()->PersistChanges(
- GetSaveInData()->GetImageManager() );
-
- m_pContentsListBox->GetModel()->Remove( pActEntry );
-
- SvTreeListEntry* pNewLBEntry =
- InsertEntryIntoUI( pEntry, nSelectionPos );
-
- m_pContentsListBox->SetCheckButtonState( pNewLBEntry,
- pEntry->IsVisible() ?
- SvButtonState::Checked : SvButtonState::Unchecked );
-
- m_pContentsListBox->Select( pNewLBEntry );
- m_pContentsListBox->MakeVisible( pNewLBEntry );
-
- bNeedsApply = true;
- }
- catch ( css::uno::Exception& )
- {
- SAL_WARN("cui.customize", "Error restoring image");
- }
- }
- else if (sCommand == "toolchange")
- {
- SvTreeListEntry* pActEntry = m_pContentsListBox->GetCurEntry();
- SvxConfigEntry* pEntry =
- static_cast<SvxConfigEntry*>(pActEntry->GetUserData());
-
- sal_uInt16 nSelectionPos = 0;
-
- // find position of entry within the list
- for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i )
- {
- if ( m_pContentsListBox->GetEntry( nullptr, i ) == pActEntry )
- {
- nSelectionPos = i;
- break;
- }
- }
-
- ScopedVclPtr<SvxIconSelectorDialog> pIconDialog(
- VclPtr<SvxIconSelectorDialog>::Create( nullptr,
- GetSaveInData()->GetImageManager(),
- GetSaveInData()->GetParentImageManager() ));
-
- if ( pIconDialog->Execute() == RET_OK )
- {
- css::uno::Reference< css::graphic::XGraphic > newgraphic =
- pIconDialog->GetSelectedIcon();
-
- if ( newgraphic.is() )
- {
- css::uno::Sequence< css::uno::Reference< css::graphic::XGraphic > >
- aGraphicSeq( 1 );
-
- css::uno::Sequence<OUString> aURLSeq { pEntry->GetCommand() };
-
- if ( !pEntry->GetBackupGraphic().is() )
- {
- css::uno::Reference< css::graphic::XGraphic > backup;
- backup = SvxConfigPageHelper::GetGraphic(
- GetSaveInData()->GetImageManager(), aURLSeq[ 0 ] );
-
- if ( backup.is() )
- {
- pEntry->SetBackupGraphic( backup );
- }
- }
-
- aGraphicSeq[ 0 ] = newgraphic;
- try
- {
- GetSaveInData()->GetImageManager()->replaceImages(
- SvxConfigPageHelper::GetImageType(), aURLSeq, aGraphicSeq );
-
- m_pContentsListBox->GetModel()->Remove( pActEntry );
- SvTreeListEntry* pNewLBEntry =
- InsertEntryIntoUI( pEntry, nSelectionPos );
-
- m_pContentsListBox->SetCheckButtonState( pNewLBEntry,
- pEntry->IsVisible() ?
- SvButtonState::Checked : SvButtonState::Unchecked );
-
- m_pContentsListBox->Select( pNewLBEntry );
- m_pContentsListBox->MakeVisible( pNewLBEntry );
-
- GetSaveInData()->PersistChanges(
- GetSaveInData()->GetImageManager() );
- }
- catch ( css::uno::Exception& )
- {
- SAL_WARN("cui.customize", "Error replacing image");
- }
- }
- }
- }
- else if (sCommand == "toolreset")
- {
- SvTreeListEntry* pActEntry = m_pContentsListBox->GetCurEntry();
- SvxConfigEntry* pEntry =
- static_cast<SvxConfigEntry*>(pActEntry->GetUserData());
-
- sal_uInt16 nSelectionPos = 0;
-
- // find position of entry within the list
- for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i )
- {
- if ( m_pContentsListBox->GetEntry( nullptr, i ) == pActEntry )
- {
- nSelectionPos = i;
- break;
- }
- }
-
- css::uno::Reference< css::graphic::XGraphic > backup =
- pEntry->GetBackupGraphic();
-
- css::uno::Sequence< css::uno::Reference< css::graphic::XGraphic > >
- aGraphicSeq( 1 );
- aGraphicSeq[ 0 ] = backup;
-
- css::uno::Sequence<OUString> aURLSeq { pEntry->GetCommand() };
-
- try
- {
- GetSaveInData()->GetImageManager()->replaceImages(
- SvxConfigPageHelper::GetImageType(), aURLSeq, aGraphicSeq );
-
- m_pContentsListBox->GetModel()->Remove( pActEntry );
-
- SvTreeListEntry* pNewLBEntry =
- InsertEntryIntoUI( pEntry, nSelectionPos );
-
- m_pContentsListBox->SetCheckButtonState( pNewLBEntry,
- pEntry->IsVisible() ?
- SvButtonState::Checked : SvButtonState::Unchecked );
-
- m_pContentsListBox->Select( pNewLBEntry );
- m_pContentsListBox->MakeVisible( pNewLBEntry );
-
- // reset backup in entry
- pEntry->SetBackupGraphic(
- css::uno::Reference< css::graphic::XGraphic >() );
-
- GetSaveInData()->PersistChanges(
- GetSaveInData()->GetImageManager() );
- }
- catch ( css::uno::Exception& )
- {
- SAL_WARN("cui.customize", "Error resetting image");
- }
- }
-
- if ( bNeedsApply )
- {
- static_cast<ToolbarSaveInData*>( GetSaveInData())->ApplyToolbar( pToolbar );
- UpdateButtonStates();
- }
-}
-
void SvxToolbarConfigPage::Init()
{
// ensure that the UI is cleared before populating it
@@ -658,15 +317,6 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectToolbarEntry, SvTreeListBox *, void
void SvxToolbarConfigPage::UpdateButtonStates()
{
- PopupMenu* pPopup = m_pModifyCommandButton->GetPopupMenu();
- pPopup->EnableItem(pPopup->GetItemId("toolrename"), false);
- pPopup->EnableItem(pPopup->GetItemId("toolrestore"), false);
- pPopup->EnableItem(pPopup->GetItemId("toolchange"), false);
- pPopup->EnableItem(pPopup->GetItemId("toolreset"), false);
-
- m_pDeleteCommandButton->Enable( false );
- m_pAddSeparatorButton->Enable( false );
-
m_pDescriptionField->SetText("");
SvTreeListEntry* selection = m_pContentsListBox->GetCurEntry();
@@ -676,24 +326,8 @@ void SvxToolbarConfigPage::UpdateButtonStates()
}
SvxConfigEntry* pEntryData = static_cast<SvxConfigEntry*>(selection->GetUserData());
- if ( pEntryData->IsSeparator() )
- {
- m_pDeleteCommandButton->Enable();
- }
- else
+ if ( !pEntryData->IsSeparator() )
{
- pPopup->EnableItem(pPopup->GetItemId("toolrename"));
- pPopup->EnableItem(pPopup->GetItemId("toolchange"));
-
- m_pDeleteCommandButton->Enable();
- m_pAddSeparatorButton->Enable();
-
- if ( !pEntryData->IsUserDefined() )
- pPopup->EnableItem(pPopup->GetItemId("toolrestore"));
-
- if ( pEntryData->IsIconModified() )
- pPopup->EnableItem(pPopup->GetItemId("toolreset"));
-
m_pDescriptionField->SetText(pEntryData->GetHelpText());
}
}
@@ -719,52 +353,10 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectToolbar, ListBox&, void )
SvxConfigEntry* pToolbar = GetTopLevelSelection();
if ( pToolbar == nullptr )
{
- m_pModifyTopLevelButton->Enable( false );
- m_pModifyCommandButton->Enable( false );
- m_pAddCommandsButton->Enable( false );
- m_pAddSeparatorButton->Enable( false );
- m_pDeleteCommandButton->Enable( false );
- m_pResetTopLevelButton->Enable( false );
- m_pIconsOnlyRB->Enable( false );
- m_pTextOnlyRB->Enable( false );
- m_pIconsAndTextRB->Enable( false );
-
+ //TODO: Disable related buttons
return;
}
- m_pModifyTopLevelButton->Enable();
- m_pModifyCommandButton->Enable();
- m_pAddCommandsButton->Enable();
- m_pResetTopLevelButton->Enable( !pToolbar->IsRenamable() );
-
- m_pIconsOnlyRB->Enable();
- m_pTextOnlyRB->Enable();
- m_pIconsAndTextRB->Enable();
-
- PopupMenu* pPopup = m_pModifyTopLevelButton->GetPopupMenu();
-
- pPopup->EnableItem(m_pMenu->GetItemId("modtooldelete"), pToolbar->IsDeletable());
- pPopup->EnableItem(m_pMenu->GetItemId("modtoolrename"), pToolbar->IsRenamable());
-
- switch( pToolbar->GetStyle() )
- {
- case 0:
- {
- m_pIconsOnlyRB->Check();
- break;
- }
- case 1:
- {
- m_pTextOnlyRB->Check();
- break;
- }
- case 2:
- {
- m_pIconsAndTextRB->Check();
- break;
- }
- }
-
SvxEntries* pEntries = pToolbar->GetEntries();
SvxEntries::const_iterator iter = pEntries->begin();
@@ -792,160 +384,6 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectToolbar, ListBox&, void )
UpdateButtonStates();
}
-IMPL_LINK( SvxToolbarConfigPage, StyleChangeHdl, Button*, pButton, void )
-{
- sal_Int32 nSelectionPos = m_pTopLevelListBox->GetSelectEntryPos();
-
- SvxConfigEntry* pToolbar =
- static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( nSelectionPos ));
-
- ToolbarSaveInData* pSaveInData = static_cast<ToolbarSaveInData*>( GetSaveInData() );
-
- if (pButton == m_pIconsOnlyRB)
- {
- pToolbar->SetStyle( 0 );
- pSaveInData->SetSystemStyle( m_xFrame, pToolbar->GetCommand(), 0 );
-
- m_pTopLevelListBox->GetSelectHdl().Call( *m_pTopLevelListBox );
- }
- else if (pButton == m_pTextOnlyRB)
- {
- pToolbar->SetStyle( 1 );
- pSaveInData->SetSystemStyle( m_xFrame, pToolbar->GetCommand(), 1 );
-
- m_pTopLevelListBox->GetSelectHdl().Call( *m_pTopLevelListBox );
- }
- else if (pButton == m_pIconsAndTextRB)
- {
- pToolbar->SetStyle( 2 );
- pSaveInData->SetSystemStyle( m_xFrame, pToolbar->GetCommand(), 2 );
-
- m_pTopLevelListBox->GetSelectHdl().Call( *m_pTopLevelListBox );
- }
-}
-
-IMPL_LINK_NOARG( SvxToolbarConfigPage, NewToolbarHdl, Button *, void )
-{
- OUString prefix = CuiResId( RID_SVXSTR_NEW_TOOLBAR );
-
- OUString aNewName =
- SvxConfigPageHelper::generateCustomName( prefix, GetSaveInData()->GetEntries() );
-
- OUString aNewURL =
- SvxConfigPageHelper::generateCustomURL( GetSaveInData()->GetEntries() );
-
- VclPtrInstance< SvxNewToolbarDialog > pNameDialog( nullptr, aNewName );
-
- for ( sal_Int32 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i )
- {
- SaveInData* pData =
- static_cast<SaveInData*>(m_pSaveInListBox->GetEntryData( i ));
-
- const sal_Int32 nInsertPos = pNameDialog->m_pSaveInListBox->InsertEntry(
- m_pSaveInListBox->GetEntry( i ) );
-
- pNameDialog->m_pSaveInListBox->SetEntryData( nInsertPos, pData );
- }
-
- pNameDialog->m_pSaveInListBox->SelectEntryPos(
- m_pSaveInListBox->GetSelectEntryPos() );
-
- if ( pNameDialog->Execute() == RET_OK )
- {
- aNewName = pNameDialog->GetName();
-
- sal_Int32 nInsertPos = pNameDialog->m_pSaveInListBox->GetSelectEntryPos();
-
- ToolbarSaveInData* pData = static_cast<ToolbarSaveInData*>(
- pNameDialog->m_pSaveInListBox->GetEntryData( nInsertPos ));
-
- if ( GetSaveInData() != pData )
- {
- m_pSaveInListBox->SelectEntryPos( nInsertPos );
- m_pSaveInListBox->GetSelectHdl().Call(*m_pSaveInListBox);
- }
-
- SvxConfigEntry* pToolbar =
- new SvxConfigEntry( aNewName, aNewURL, true );
-
- pToolbar->SetUserDefined();
- pToolbar->SetMain();
-
- pData->CreateToolbar( pToolbar );
-
- nInsertPos = m_pTopLevelListBox->InsertEntry( pToolbar->GetName() );
- m_pTopLevelListBox->SetEntryData( nInsertPos, pToolbar );
- m_pTopLevelListBox->SelectEntryPos( nInsertPos );
- m_pTopLevelListBox->GetSelectHdl().Call(*m_pTopLevelListBox);
-
- pData->SetModified();
- }
-}
-
-IMPL_LINK_NOARG( SvxToolbarConfigPage, AddCommandsHdl, Button *, void )
-{
- if ( m_pSelectorDlg == nullptr )
- {
- // Create Script Selector which shows slot commands
- m_pSelectorDlg = VclPtr<SvxScriptSelectorDialog>::Create( this, true, m_xFrame );
-
- // Position the Script Selector over the Add button so it is
- // beside the menu contents list and does not obscure it
- m_pSelectorDlg->SetPosPixel( m_pAddCommandsButton->GetPosPixel() );
-
- m_pSelectorDlg->SetAddHdl(
- LINK( this, SvxToolbarConfigPage, AddFunctionHdl ) );
- }
-
- m_pSelectorDlg->SetImageProvider( GetSaveInData() );
-
- m_pSelectorDlg->Execute();
-}
-
-IMPL_LINK_NOARG( SvxToolbarConfigPage, AddSeparatorHdl, Button *, void )
-{
- // get currently selected toolbar
- SvxConfigEntry* pToolbar = GetTopLevelSelection();
-
- SvxConfigEntry* pNewEntryData = new SvxConfigEntry;
- pNewEntryData->SetUserDefined();
-
- SvTreeListEntry* pNewLBEntry = InsertEntry( pNewEntryData );
-
- m_pContentsListBox->SetCheckButtonInvisible( pNewLBEntry );
- m_pContentsListBox->SetCheckButtonState(
- pNewLBEntry, SvButtonState::Tristate );
-
- static_cast<ToolbarSaveInData*>( GetSaveInData())->ApplyToolbar( pToolbar );
- UpdateButtonStates();
-}
-
-IMPL_LINK_NOARG( SvxToolbarConfigPage, DeleteCommandHdl, Button *, void )
-{
- DeleteSelectedContent();
-}
-
-IMPL_LINK_NOARG( SvxToolbarConfigPage, ResetTopLevelHdl, Button *, void )
-{
- sal_Int32 nSelectionPos = m_pTopLevelListBox->GetSelectEntryPos();
-
- SvxConfigEntry* pToolbar =
- static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( nSelectionPos ));
-
- ScopedVclPtrInstance<MessageDialog> qbox(this,
- CuiResId(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VclButtonsType::YesNo);
-
- if ( qbox->Execute() == RET_YES )
- {
- ToolbarSaveInData* pSaveInData_ =
- static_cast<ToolbarSaveInData*>(GetSaveInData());
-
- pSaveInData_->RestoreToolbar( pToolbar );
-
- m_pTopLevelListBox->GetSelectHdl().Call( *m_pTopLevelListBox );
- }
-}
-
IMPL_LINK_NOARG( SvxToolbarConfigPage, AddFunctionHdl, SvxScriptSelectorDialog&, void )
{
AddFunction();
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 72d08f21d265..676f5cdcec14 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -214,17 +214,17 @@ SvxConfigDialog::SvxConfigDialog(vcl::Window * pParent, const SfxItemSet* pInSet
: SfxTabDialog(pParent, "CustomizeDialog",
"cui/ui/customizedialog.ui", pInSet)
, m_nMenusPageId(0)
+ , m_nToolbarsPageId(0)
, m_nContextMenusPageId(0)
, m_nKeyboardPageId(0)
- , m_nToolbarsPageId(0)
, m_nEventsPageId(0)
{
SvxConfigPageHelper::InitImageType();
m_nMenusPageId = AddTabPage("menus", CreateSvxMenuConfigPage, nullptr);
+ m_nToolbarsPageId = AddTabPage("toolbars", CreateSvxToolbarConfigPage, nullptr);
m_nContextMenusPageId = AddTabPage("contextmenus", CreateSvxContextMenuConfigPage, nullptr);
m_nKeyboardPageId = AddTabPage("keyboard", CreateKeyboardConfigPage, nullptr);
- m_nToolbarsPageId = AddTabPage("toolbars", CreateSvxToolbarConfigPage, nullptr);
m_nEventsPageId = AddTabPage("events", CreateSvxEventConfigPage, nullptr);
const SfxPoolItem* pItem =
@@ -1131,52 +1131,26 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet)
, bInitialised(false)
, pCurrentSaveInData(nullptr)
, m_pContentsListBox(nullptr)
+ , m_pFunctionsListBox(nullptr)
, m_pSelectorDlg(nullptr)
{
- get(m_pTopLevel, "toplevel");
- get(m_pTopLevelLabel, "toplevelft");
get(m_pTopLevelListBox, "toplevellist");
- get(m_pNewTopLevelButton, "toplevelbutton");
- get(m_pModifyTopLevelButton, "menuedit");
- get(m_pToolbarStyleLabel, "toolbarstyleft");
- get(m_pIconsOnlyRB, "iconsrb");
- get(m_pTextOnlyRB, "textrb");
- get(m_pIconsAndTextRB, "iconsandtextrb");
get(m_pContents, "contents");
- get(m_pContentsLabel, "contentslabel");
- get(m_pAddCommandsButton, "add");
- get(m_pAddSeparatorButton, "addseparatorbtn");
- get(m_pAddSubmenuButton, "addsubmenubtn");
- get(m_pModifyCommandButton, "modify");
- get(m_pDeleteCommandButton, "deletebtn");
- get(m_pResetTopLevelButton, "resetbtn");
get(m_pMoveUpButton, "up");
get(m_pMoveDownButton, "down");
get(m_pSaveInListBox, "savein");
get(m_pDescriptionField, "desc");
m_pDescriptionField->set_height_request(m_pDescriptionField->GetTextHeight()*4);
get(m_pEntries, "entries");
+ get(m_pFunctions, "functions");
Size aSize(LogicToPixel(Size(108, 115), MapUnit::MapAppFont));
m_pEntries->set_height_request(aSize.Height());
m_pEntries->set_width_request(aSize.Width());
+ m_pFunctions->set_height_request(aSize.Height());
+ m_pFunctions->set_width_request(aSize.Width());
m_pDescriptionField->SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() );
m_pDescriptionField->EnableCursor( false );
-
- // This button is applicable only for the toolbar config tab
- m_pResetTopLevelButton->Enable( false );
- m_pResetTopLevelButton->Hide();
- // These radio buttons are applicable only for the toolbar config tab
- m_pIconsOnlyRB->Enable( false );
- m_pTextOnlyRB->Enable( false );
- m_pIconsAndTextRB->Enable( false );
- m_pIconsOnlyRB->Hide();
- m_pTextOnlyRB->Hide();
- m_pIconsAndTextRB->Hide();
- m_pToolbarStyleLabel->Hide();
- // This button is applicable only for the Menus and Context Menus tabs
- m_pAddSubmenuButton->Disable();
- m_pAddSubmenuButton->Hide();
}
SvxConfigPage::~SvxConfigPage()
@@ -1186,24 +1160,10 @@ SvxConfigPage::~SvxConfigPage()
void SvxConfigPage::dispose()
{
- m_pTopLevel.clear();
- m_pTopLevelLabel.clear();
m_pTopLevelListBox.clear();
- m_pNewTopLevelButton.clear();
- m_pModifyTopLevelButton.clear();
- m_pToolbarStyleLabel.clear();
- m_pIconsOnlyRB.clear();
- m_pTextOnlyRB.clear();
- m_pIconsAndTextRB.clear();
m_pContents.clear();
- m_pContentsLabel.clear();
m_pEntries.clear();
- m_pAddCommandsButton.clear();
- m_pAddSeparatorButton.clear();
- m_pAddSubmenuButton.clear();
- m_pModifyCommandButton.clear();
- m_pDeleteCommandButton.clear();
- m_pResetTopLevelButton.clear();
+ m_pFunctions.clear();
m_pMoveUpButton.clear();
m_pMoveDownButton.clear();
m_pSaveInListBox.clear();
@@ -1211,6 +1171,7 @@ void SvxConfigPage::dispose()
m_pSelectorDlg.disposeAndClear();
m_pContentsListBox.disposeAndClear();
+ m_pFunctionsListBox.disposeAndClear();
SfxTabPage::dispose();
}
@@ -1239,17 +1200,6 @@ void SvxConfigPage::Reset( const SfxItemSet* )
css::frame::ModuleManager::create( xContext ));
OUString aModuleName = SvxConfigPageHelper::GetUIModuleName( aModuleId, xModuleManager );
- OUString title = m_pTopLevel->get_label();
- OUString aSearchString("%MODULENAME" );
- sal_Int32 index = title.indexOf( aSearchString );
-
- if ( index != -1 )
- {
- title = title.replaceAt(
- index, aSearchString.getLength(), aModuleName );
- m_pTopLevel->set_label(title);
- }
-
uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier >
xModuleCfgSupplier( css::ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
diff --git a/cui/source/inc/SvxMenuConfigPage.hxx b/cui/source/inc/SvxMenuConfigPage.hxx
index c604150afcaf..72796b8b2235 100644
--- a/cui/source/inc/SvxMenuConfigPage.hxx
+++ b/cui/source/inc/SvxMenuConfigPage.hxx
@@ -53,14 +53,6 @@ private:
bool m_bIsMenuBar;
DECL_LINK( SelectMenu, ListBox&, void );
DECL_LINK( SelectMenuEntry, SvTreeListBox *, void );
- DECL_LINK( NewMenuHdl, Button *, void );
- DECL_LINK( MenuSelectHdl, MenuButton *, void );
- DECL_LINK( EntrySelectHdl, MenuButton *, void );
- DECL_LINK( AddCommandsHdl, Button *, void );
- DECL_LINK( AddSeparatorHdl, Button *, void );
- DECL_LINK( AddSubmenuHdl, Button *, void );
- DECL_LINK( DeleteCommandHdl, Button *, void );
- DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog&, void );
void Init() override;
void UpdateButtonStates() override;
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx
index 099dd8e2175c..02a23979865e 100644
--- a/cui/source/inc/SvxToolbarConfigPage.hxx
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -53,14 +53,6 @@ private:
DECL_LINK( SelectToolbar, ListBox&, void );
DECL_LINK( SelectToolbarEntry, SvTreeListBox*, void );
- DECL_LINK( ToolbarSelectHdl, MenuButton *, void );
- DECL_LINK( EntrySelectHdl, MenuButton *, void );
- DECL_LINK( StyleChangeHdl, Button *, void );
- DECL_LINK( NewToolbarHdl, Button *, void );
- DECL_LINK( AddCommandsHdl, Button *, void );
- DECL_LINK( AddSeparatorHdl, Button *, void );
- DECL_LINK( DeleteCommandHdl, Button *, void );
- DECL_LINK( ResetTopLevelHdl, Button *, void );
DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog&, void );
DECL_LINK( MoveHdl, Button *, void );
@@ -70,9 +62,6 @@ private:
void DeleteSelectedContent() override;
void DeleteSelectedTopLevel() override;
- VclPtr<PopupMenu> m_pMenu;
- VclPtr<PopupMenu> m_pEntry;
-
public:
SvxToolbarConfigPage( vcl::Window *pParent, const SfxItemSet& rItemSet );
virtual ~SvxToolbarConfigPage() override;
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index f75f4d6f90d2..626445602213 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -81,9 +81,9 @@ class SvxConfigDialog : public SfxTabDialog
private:
css::uno::Reference< css::frame::XFrame > m_xFrame;
sal_uInt16 m_nMenusPageId;
+ sal_uInt16 m_nToolbarsPageId;
sal_uInt16 m_nContextMenusPageId;
sal_uInt16 m_nKeyboardPageId;
- sal_uInt16 m_nToolbarsPageId;
sal_uInt16 m_nEventsPageId;
public:
@@ -383,31 +383,18 @@ protected:
// the top section of the tab page where top level menus and toolbars
// are displayed in a listbox
- VclPtr<VclFrame> m_pTopLevel;
- VclPtr<FixedText> m_pTopLevelLabel;
VclPtr<ListBox> m_pTopLevelListBox;
- VclPtr<PushButton> m_pNewTopLevelButton;
- VclPtr<MenuButton> m_pModifyTopLevelButton;
-
- VclPtr<FixedText> m_pToolbarStyleLabel;
- VclPtr<RadioButton> m_pIconsOnlyRB;
- VclPtr<RadioButton> m_pTextOnlyRB;
- VclPtr<RadioButton> m_pIconsAndTextRB;
// the contents section where the contents of the selected
// menu or toolbar are displayed
VclPtr<VclFrame> m_pContents;
- VclPtr<FixedText> m_pContentsLabel;
VclPtr<VclContainer> m_pEntries;
VclPtr<SvTreeListBox> m_pContentsListBox;
- VclPtr<PushButton> m_pAddCommandsButton;
- VclPtr<PushButton> m_pAddSeparatorButton;
- VclPtr<PushButton> m_pAddSubmenuButton;
- VclPtr<MenuButton> m_pModifyCommandButton;
- VclPtr<PushButton> m_pDeleteCommandButton;
- // Resets the top level toolbar to default settings
- VclPtr<PushButton> m_pResetTopLevelButton;
+ // the functions section where functions in the
+ // selected category will be displayed
+ VclPtr<VclContainer> m_pFunctions;
+ VclPtr<SvTreeListBox> m_pFunctionsListBox;
VclPtr<PushButton> m_pMoveUpButton;
VclPtr<PushButton> m_pMoveDownButton;
@@ -525,10 +512,6 @@ public:
SvxConfigEntry* GetSelectedEntry();
};
-//SvxToolbarEntriesListBox class was here
-
-//SvxToolbarConfigPage class was here
-
class ToolbarSaveInData : public SaveInData
{
private:
diff --git a/cui/uiconfig/ui/customizedialog.ui b/cui/uiconfig/ui/customizedialog.ui
index aaa25c399643..e96808d2844c 100644
--- a/cui/uiconfig/ui/customizedialog.ui
+++ b/cui/uiconfig/ui/customizedialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.19.0 -->
+<!-- Generated with glade 3.20.0 -->
<interface domain="cui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="CustomizeDialog">
@@ -106,10 +106,10 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="contextmenus">
+ <object class="GtkLabel" id="toolbars">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="customizedialog|contextmenus">Context Menus</property>
+ <property name="label" translatable="yes" context="customizedialog|toolbars">Toolbars</property>
</object>
<packing>
<property name="position">1</property>
@@ -120,10 +120,10 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="keyboard">
+ <object class="GtkLabel" id="contextmenus">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="customizedialog|keyboard">Keyboard</property>
+ <property name="label" translatable="yes" context="customizedialog|contextmenus">Context Menus</property>
</object>
<packing>
<property name="position">2</property>
@@ -134,10 +134,10 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="toolbars">
+ <object class="GtkLabel" id="keyboard">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="customizedialog|toolbars">Toolbars</property>
+ <property name="label" translatable="yes" context="customizedialog|keyboard">Keyboard</property>
</object>
<packing>
<property name="position">3</property>
diff --git a/cui/uiconfig/ui/menuassignpage.ui b/cui/uiconfig/ui/menuassignpage.ui
index 1213719c2f3c..4e46e29e8690 100644
--- a/cui/uiconfig/ui/menuassignpage.ui
+++ b/cui/uiconfig/ui/menuassignpage.ui
@@ -2,48 +2,6 @@
<!-- Generated with glade 3.20.0 -->
<interface domain="cui">
<requires lib="gtk+" version="3.10"/>
- <object class="GtkMenu" id="contentmenu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="toolrename">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|toolrename">Rename...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="toolrestore">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|toolrestore">Restore Default Command</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="toolchange">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|toolchange">Change Icon...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="toolreset">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|toolreset">Reset Icon</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -54,6 +12,16 @@
<property name="can_focus">False</property>
<property name="stock">gtk-go-down</property>
</object>
+ <object class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-forward</property>
+ </object>
+ <object class="GtkImage" id="image4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-back</property>
+ </object>
<object class="GtkBox" id="MenuAssignPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -63,107 +31,229 @@
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="toplevel">
+ <object class="GtkFrame" id="contents">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment6">
+ <object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkGrid" id="grid4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkLabel" id="toplevelft">
+ <object class="GtkGrid" id="grid5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|toplevelft">Menu</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">toplevellist</property>
- <property name="xalign">0</property>
+ <property name="valign">center</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkButton" id="up">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image1</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="down">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image2</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="height">2</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="toplevellist">
+ <object class="GtkGrid" id="entries">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_right">36</property>
<property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="toolbarstyleft">
+ <object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">6</property>
- <property name="label" translatable="yes" context="menuassignpage|toolbarstyleft">Style</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">toplevellist</property>
- <property name="xalign">0</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
+ <property name="hexpand">True</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">Insert</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">Modify</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">Reset</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_right">36</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">6</property>
+ <property name="margin_bottom">5</property>
<property name="hexpand">True</property>
<child>
- <object class="GtkRadioButton" id="iconsandtextrb">
- <property name="label" translatable="yes" context="menuassignpage|iconsandtextrb">Icons &amp; Text</property>
+ <object class="GtkComboBoxText" id="savein">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">center</property>
- <property name="margin_left">12</property>
- <property name="margin_right">12</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">iconsrb</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_right">5</property>
+ <property name="hexpand">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="iconsrb">
- <property name="label" translatable="yes" context="menuassignpage|iconsrb">Icons</property>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">Function</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="receives_default">True</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_bottom">5</property>
+ <child>
+ <object class="GtkComboBoxText" id="toplevellist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">36</property>
+ <property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -171,16 +261,26 @@
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="textrb">
- <property name="label" translatable="yes" context="menuassignpage|textrb">Text</property>
+ <object class="GtkButton" id="add1">
+ <property name="label" translatable="yes">+</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="hexpand">True</property>
+ <property name="always_show_image">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="remove1">
+ <property name="label" translatable="yes">-</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">end</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">iconsrb</property>
+ <property name="receives_default">True</property>
+ <property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -193,45 +293,23 @@
<property name="top_attach">1</property>
</packing>
</child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButtonBox" id="buttonbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="layout_style">start</property>
<child>
- <object class="GtkButton" id="toplevelbutton">
- <property name="label" translatable="yes" context="menuassignpage|toplevelbutton">New...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <object class="GtkButton" id="menuedit:menu">
- <property name="label" translatable="yes" context="menuassignpage|menuedit">Menu</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
</child>
</object>
<packing>
@@ -239,52 +317,8 @@
<property name="top_attach">0</property>
</packing>
</child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label26">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|label26">%PRODUCTNAME %MODULENAME Menus</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="contents">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="column_spacing">12</property>
<child>
- <object class="GtkGrid" id="grid4">
+ <object class="GtkGrid" id="grid6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@@ -292,57 +326,67 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkComboBoxText" id="savein">
+ <object class="GtkLabel" id="descriptionlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label33">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|label33">_Save In</property>
+ <property name="label" translatable="yes" context="menuassignpage|label33">_Description</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">savein</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="contentslabel">
+ <object class="GtkLabel" id="functionslabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
- <property name="label" translatable="yes" context="menuassignpage|contentslabel">Entries</property>
+ <property name="label" translatable="yes" context="menuassignpage|contentslabel">Function:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entries</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkGrid" id="grid5">
+ <object class="GtkGrid" id="grid7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkButton" id="up">
+ <object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image1</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="add">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="hexpand">True</property>
+ <property name="image">image3</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Add</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -350,11 +394,33 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="down">
+ <object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image2</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="remove">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="hexpand">True</property>
+ <property name="image">image4</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Remove</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -364,12 +430,12 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">2</property>
<property name="height">2</property>
</packing>
</child>
<child>
- <object class="GtkGrid" id="entries">
+ <object class="GtkGrid" id="functions">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@@ -404,81 +470,66 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">2</property>
</packing>
</child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
- <object class="GtkButtonBox" id="buttonbox5">
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="layout_style">start</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkButton" id="resetbtn">
- <property name="label" translatable="yes" context="menuassignpage|resetbtn">Reset</property>
+ <object class="GtkTextView" id="desc:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="editable">False</property>
+ <property name="cursor_visible">False</property>
+ <property name="accepts_tab">False</property>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
</object>
<packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="searchlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="margin_bottom">5</property>
+ <property name="label" translatable="yes" context="menuassignpage|contentslabel">Search:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entries</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkButtonBox" id="buttonbox4">
+ <object class="GtkEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="margin_bottom">5</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="categorylabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_bottom">24</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="modify:modmenu">
- <property name="label" translatable="yes" context="menuassignpage|modify">Modify</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="deletebtn">
- <property name="label" translatable="yes" context="menuassignpage|deletebtn">Remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="valign">start</property>
+ <property name="margin_bottom">5</property>
+ <property name="label" translatable="yes" context="menuassignpage|contentslabel">Category:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entries</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -486,64 +537,26 @@
</packing>
</child>
<child>
- <object class="GtkButtonBox" id="buttonbox3">
+ <object class="GtkComboBoxText" id="toplevellist1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_bottom">24</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="add">
- <property name="label" translatable="yes" context="menuassignpage|add">Add Command</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="addseparatorbtn">
- <property name="label" translatable="yes" context="menuassignpage|addseparatorbtn">Add Separator</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="addsubmenubtn">
- <property name="label" translatable="yes" context="menuassignpage|addsubmenubtn">Add Submenu</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="margin_bottom">5</property>
+ <property name="hexpand">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
@@ -552,13 +565,9 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label27">
- <property name="visible">True</property>
+ <object class="GtkLabel">
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|label27">Menu Content</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <property name="label" translatable="yes">label</property>
</object>
</child>
</object>
@@ -568,141 +577,7 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkFrame" id="frame8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTextView" id="desc:border">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="cursor_visible">False</property>
- <property name="accepts_tab">False</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label28">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|label28">_Description</property>
- <property name="use_underline">True</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <object class="GtkSizeGroup" id="sizegroup1">
- <widgets>
- <widget name="toplevelbutton"/>
- <widget name="menuedit:menu"/>
- <widget name="add"/>
- <widget name="modify:modmenu"/>
- <widget name="deletebtn"/>
- <widget name="resetbtn"/>
- <widget name="addsubmenubtn"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup" id="sizegroup2">
- <widgets>
- <widget name="toplevelft"/>
- <widget name="label33"/>
- <widget name="contentslabel"/>
- </widgets>
- </object>
- <object class="GtkMenu" id="menu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="move">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|move">Move...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="rename">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|rename">Rename...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem3">
- <property name="visible">True</property>
- <property name="can_focus">False</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" context="menuassignpage|delete">Delete...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
- <object class="GtkMenu" id="modifymenu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="modtoolrename">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|modtoolrename">Rename...</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="modtooldelete">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|modtooldelete">Delete</property>
- </object>
- </child>
- </object>
- <object class="GtkMenu" id="modmenu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="modrename">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|modrename">Rename...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1"/>
+ <object class="GtkSizeGroup" id="sizegroup2"/>
</interface>