summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
Diffstat (limited to 'cui')
-rw-r--r--cui/UI_cui.mk1
-rw-r--r--cui/source/customize/cfg.cxx40
-rw-r--r--cui/source/customize/cfg.hrc3
-rw-r--r--cui/source/customize/cfg.src60
-rw-r--r--cui/source/inc/cfg.hxx26
-rw-r--r--cui/uiconfig/ui/newtoolbardialog.ui (renamed from cui/uiconfig/ui/name.ui)10
6 files changed, 38 insertions, 102 deletions
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index b255d7639c32..9e3a3962ee55 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/messbox \
cui/uiconfig/ui/namedialog \
cui/uiconfig/ui/newtabledialog \
+ cui/uiconfig/ui/newtoolbardialog \
cui/uiconfig/ui/numberingformatpage \
cui/uiconfig/ui/numberingoptionspage \
cui/uiconfig/ui/numberingpositionpage \
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 20956aee716c..dd0121439d07 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -4653,24 +4653,24 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton )
SaveInData* pData =
(SaveInData*) aSaveInListBox.GetEntryData( i );
- nInsertPos = pNameDialog->aSaveInListBox.InsertEntry(
+ nInsertPos = pNameDialog->m_pSaveInListBox->InsertEntry(
aSaveInListBox.GetEntry( i ) );
- pNameDialog->aSaveInListBox.SetEntryData( nInsertPos, pData );
+ pNameDialog->m_pSaveInListBox->SetEntryData( nInsertPos, pData );
}
- pNameDialog->aSaveInListBox.SelectEntryPos(
+ pNameDialog->m_pSaveInListBox->SelectEntryPos(
aSaveInListBox.GetSelectEntryPos(), sal_True );
bool ret = pNameDialog->Execute();
if ( ret == RET_OK )
{
- pNameDialog->GetName( aNewName );
+ aNewName = pNameDialog->GetName();
- nInsertPos = pNameDialog->aSaveInListBox.GetSelectEntryPos();
+ nInsertPos = pNameDialog->m_pSaveInListBox->GetSelectEntryPos();
ToolbarSaveInData* pData = (ToolbarSaveInData*)
- pNameDialog->aSaveInListBox.GetEntryData( nInsertPos );
+ pNameDialog->m_pSaveInListBox->GetEntryData( nInsertPos );
if ( GetSaveInData() != pData )
{
@@ -4954,24 +4954,16 @@ sal_Bool SvxToolbarEntriesListBox::NotifyCopying(
return sal_False;
}
-SvxNewToolbarDialog::SvxNewToolbarDialog(
- Window* pWindow, const String& rName )
- :
- ModalDialog ( pWindow, CUI_RES( MD_NEW_TOOLBAR ) ),
- aFtDescription ( this, CUI_RES( FT_NAME ) ),
- aEdtName ( this, CUI_RES( EDT_STRING ) ),
- aSaveInText ( this, CUI_RES( TXT_SAVEIN ) ),
- aBtnOK ( this, CUI_RES( BTN_OK ) ),
- aBtnCancel ( this, CUI_RES( BTN_CANCEL ) ),
- aBtnHelp ( this, CUI_RES( BTN_HELP ) ),
- aSaveInListBox ( this, CUI_RES( LB_SAVEIN ) )
+SvxNewToolbarDialog::SvxNewToolbarDialog(Window* pWindow, const OUString& rName)
+ : ModalDialog(pWindow, "NewToolbarDialog", "cui/ui/newtoolbardialog.ui")
{
- FreeResource();
-
- aEdtName.SetText( rName );
- aEdtName.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
- ModifyHdl(&aEdtName);
- aEdtName.SetModifyHdl(LINK(this, SvxNewToolbarDialog, ModifyHdl));
+ get(m_pEdtName, "edit");
+ get(m_pBtnOK, "ok");
+ get(m_pSaveInListBox, "savein");
+ m_pEdtName->SetText( rName );
+ m_pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
+ ModifyHdl(m_pEdtName);
+ m_pEdtName->SetModifyHdl(LINK(this, SvxNewToolbarDialog, ModifyHdl));
}
IMPL_LINK(SvxNewToolbarDialog, ModifyHdl, Edit*, pEdit)
@@ -4979,7 +4971,7 @@ IMPL_LINK(SvxNewToolbarDialog, ModifyHdl, Edit*, pEdit)
(void)pEdit;
if(aCheckNameHdl.IsSet())
- aBtnOK.Enable(aCheckNameHdl.Call(this) > 0);
+ m_pBtnOK->Enable(aCheckNameHdl.Call(this) > 0);
return 0;
}
diff --git a/cui/source/customize/cfg.hrc b/cui/source/customize/cfg.hrc
index 64e0cef7b7fc..7db7f26b1e78 100644
--- a/cui/source/customize/cfg.hrc
+++ b/cui/source/customize/cfg.hrc
@@ -79,12 +79,9 @@
#define BTN_IMPORT (97 + CFG_OFFSET)
#define IMAGE_BTN_COLOR (98 + CFG_OFFSET)
-#define MD_NEW_TOOLBAR (101 + CFG_OFFSET)
-#define EDT_STRING (102 + CFG_OFFSET)
#define BTN_OK (103 + CFG_OFFSET)
#define BTN_CANCEL (104 + CFG_OFFSET)
#define BTN_HELP (105 + CFG_OFFSET)
-#define FT_NAME (106 + CFG_OFFSET)
#define FL_SEPARATOR (108 + CFG_OFFSET)
#define BTN_DELETE (109 + CFG_OFFSET)
diff --git a/cui/source/customize/cfg.src b/cui/source/customize/cfg.src
index 80a6c1d6d44e..b4a4f487d093 100644
--- a/cui/source/customize/cfg.src
+++ b/cui/source/customize/cfg.src
@@ -483,66 +483,6 @@ ModalDialog MD_MENU_ORGANISER
};
};
-// MD_NEW_TOOLBAR -------------------------------------------------
-ModalDialog MD_NEW_TOOLBAR
-{
- HelpID = "cui:ModalDialog:MD_NEW_TOOLBAR";
- OutputSize = TRUE ;
- SvLook = TRUE ;
- Size = MAP_APPFONT ( 165 , 63 ) ;
- Text [ en-US ] = "Name" ;
- Moveable = TRUE ;
- FixedText FT_NAME
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 98 , 8 ) ;
- TEXT_TOOLBAR_NAME
- WordBreak = TRUE ;
- };
- Edit EDT_STRING
- {
- HelpID = "cui:Edit:MD_NEW_TOOLBAR:EDT_STRING";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 17 ) ;
- Size = MAP_APPFONT ( 97 , 12 ) ;
- TabStop = TRUE ;
- };
- FixedText TXT_SAVEIN
- {
- Pos = MAP_APPFONT ( 6 , 35 ) ;
- Size = MAP_APPFONT ( 98 , 8 ) ;
- Group = TRUE ;
- TEXT_SAVE_IN
- };
- ListBox LB_SAVEIN
- {
- HelpID = "cui:ListBox:MD_NEW_TOOLBAR:LB_SAVEIN";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 43 ) ;
- Size = MAP_APPFONT ( 97 , 53 ) ;
- DropDown = TRUE ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 109 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 109 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 109 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-};
-
#ifndef IMAGE_STDBTN_COLOR
#define IMAGE_STDBTN_COLOR Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }
#endif
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 0dc86a57086b..790dcd654cb6 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -684,32 +684,34 @@ public:
class SvxNewToolbarDialog : public ModalDialog
{
private:
- FixedText aFtDescription;
- Edit aEdtName;
- FixedText aSaveInText;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
+ Edit* m_pEdtName;
+ OKButton* m_pBtnOK;
Link aCheckNameHdl;
DECL_LINK(ModifyHdl, Edit*);
public:
- SvxNewToolbarDialog( Window* pWindow, const String& rName );
+ SvxNewToolbarDialog(Window* pWindow, const OUString& rName);
- ListBox aSaveInListBox;
+ ListBox* m_pSaveInListBox;
- void GetName( rtl::OUString& rName ){rName = aEdtName.GetText();}
+ OUString GetName()
+ {
+ return m_pEdtName->GetText();
+ }
- void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false )
+ void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false )
{
aCheckNameHdl = rLink;
if ( bCheckImmediately )
- aBtnOK.Enable( rLink.Call( this ) > 0 );
+ m_pBtnOK->Enable( rLink.Call( this ) > 0 );
}
- void SetEditHelpId( const rtl::OString& aHelpId) {aEdtName.SetHelpId(aHelpId);}
+ void SetEditHelpId( const rtl::OString& aHelpId)
+ {
+ m_pEdtName->SetHelpId(aHelpId);
+ }
};
class SvxIconSelectorDialog : public ModalDialog
diff --git a/cui/uiconfig/ui/name.ui b/cui/uiconfig/ui/newtoolbardialog.ui
index 3e31f50766e2..2eee76d56c2f 100644
--- a/cui/uiconfig/ui/name.ui
+++ b/cui/uiconfig/ui/newtoolbardialog.ui
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkAction" id="action1"/>
<object class="GtkDialog" id="NewToolbarDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
@@ -21,6 +20,8 @@
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -87,6 +88,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Toolbar Name</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">edit</property>
</object>
<packing>
<property name="expand">False</property>
@@ -95,10 +97,11 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="entry1">
+ <object class="GtkEntry" id="edit">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
+ <property name="width_chars">26</property>
</object>
<packing>
<property name="expand">False</property>
@@ -126,6 +129,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Save In</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">savein</property>
</object>
<packing>
<property name="expand">False</property>
@@ -134,7 +138,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="comboboxtext1">
+ <object class="GtkComboBoxText" id="savein">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="entry_text_column">0</property>