summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/UIConfig_basicide.mk3
-rw-r--r--basctl/inc/helpid.hrc2
-rw-r--r--basctl/source/dlged/managelang.cxx104
-rw-r--r--basctl/source/dlged/managelang.hrc3
-rw-r--r--basctl/source/dlged/managelang.src75
-rw-r--r--basctl/source/inc/dlgresid.hrc1
-rw-r--r--basctl/source/inc/managelang.hxx19
-rw-r--r--basctl/uiconfig/basicide/ui/defaultlanguage.ui218
-rw-r--r--extras/source/glade/libreoffice-catalog.xml.in8
-rw-r--r--svx/source/dialog/langbox.cxx10
10 files changed, 274 insertions, 169 deletions
diff --git a/basctl/UIConfig_basicide.mk b/basctl/UIConfig_basicide.mk
index 21e52ee864bb..ad9b52231973 100644
--- a/basctl/UIConfig_basicide.mk
+++ b/basctl/UIConfig_basicide.mk
@@ -30,8 +30,9 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/BasicIDE,\
$(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\
basctl/uiconfig/basicide/ui/basicmacrodialog \
- basctl/uiconfig/basicide/ui/gotolinedialog \
+ basctl/uiconfig/basicide/ui/defaultlanguage \
basctl/uiconfig/basicide/ui/exportdialog \
+ basctl/uiconfig/basicide/ui/gotolinedialog \
basctl/uiconfig/basicide/ui/importlibdialog \
basctl/uiconfig/basicide/ui/managebreakpoints \
basctl/uiconfig/basicide/ui/newlibdialog \
diff --git a/basctl/inc/helpid.hrc b/basctl/inc/helpid.hrc
index 75aca8fbe564..3a48ef34738e 100644
--- a/basctl/inc/helpid.hrc
+++ b/basctl/inc/helpid.hrc
@@ -48,9 +48,7 @@
#define HID_BASICIDE_STACKWINDOW_LIST "BASCTL_HID_BASICIDE_STACKWINDOW_LIST"
#define HID_BASICIDE_MANAGE_LANGUAGE "BASCTL_HID_BASICIDE_MANAGE_LANGUAGE"
-#define HID_BASICIDE_SETDEFAULT_LANGUAGE "BASCTL_HID_BASICIDE_SETDEFAULT_LANGUAGE"
#define HID_BASICIDE_ADDNEW_LANGUAGE "BASCTL_HID_BASICIDE_ADDNEW_LANGUAGE"
-#define HID_BASICIDE_ADDNEW_CONTROL "BASCTL_HID_BASICIDE_ADDNEW_CONTROL"
#endif
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index de1a5715d6f2..21632c4db9d7 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -80,7 +80,7 @@ namespace {
}
}
-ManageLanguageDialog::ManageLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> _pLMgr ) :
+ManageLanguageDialog::ManageLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> xLMgr ) :
ModalDialog( pParent, IDEResId( RID_DLG_MANAGE_LANGUAGE ) ),
m_aLanguageFT ( this, IDEResId( FT_LANGUAGE ) ),
m_aLanguageLB ( this, IDEResId( LB_LANGUAGE ) ),
@@ -91,7 +91,7 @@ ManageLanguageDialog::ManageLanguageDialog( Window* pParent, boost::shared_ptr<L
m_aBtnLine ( this, IDEResId( FL_BUTTONS ) ),
m_aHelpBtn ( this, IDEResId( PB_HELP ) ),
m_aCloseBtn ( this, IDEResId( PB_CLOSE ) ),
- m_pLocalizationMgr ( _pLMgr ),
+ m_xLocalizationMgr ( xLMgr ),
m_sDefLangStr (IDE_RESSTR(STR_DEF_LANG)),
m_sDeleteStr (IDE_RESSTR(STR_DELETE)),
m_sCreateLangStr (IDE_RESSTR(STR_CREATE_LANG))
@@ -158,13 +158,13 @@ void ManageLanguageDialog::CalcInfoSize()
void ManageLanguageDialog::FillLanguageBox()
{
- DBG_ASSERT( m_pLocalizationMgr, "ManageLanguageDialog::FillLanguageBox(): no localization manager" );
+ DBG_ASSERT( m_xLocalizationMgr, "ManageLanguageDialog::FillLanguageBox(): no localization manager" );
- if ( m_pLocalizationMgr->isLibraryLocalized() )
+ if ( m_xLocalizationMgr->isLibraryLocalized() )
{
SvtLanguageTable aLangTable;
- Locale aDefaultLocale = m_pLocalizationMgr->getStringResourceManager()->getDefaultLocale();
- Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales();
+ Locale aDefaultLocale = m_xLocalizationMgr->getStringResourceManager()->getDefaultLocale();
+ Sequence< Locale > aLocaleSeq = m_xLocalizationMgr->getStringResourceManager()->getLocales();
const Locale* pLocale = aLocaleSeq.getConstArray();
sal_Int32 i, nCount = aLocaleSeq.getLength();
for ( i = 0; i < nCount; ++i )
@@ -197,12 +197,12 @@ void ManageLanguageDialog::ClearLanguageBox()
IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
{
- SetDefaultLanguageDialog aDlg( this, m_pLocalizationMgr );
+ SetDefaultLanguageDialog aDlg( this, m_xLocalizationMgr );
if ( RET_OK == aDlg.Execute() )
{
// add new locales
Sequence< Locale > aLocaleSeq = aDlg.GetLocales();
- m_pLocalizationMgr->handleAddLocales( aLocaleSeq );
+ m_xLocalizationMgr->handleAddLocales( aLocaleSeq );
// update listbox
ClearLanguageBox();
FillLanguageBox();
@@ -230,7 +230,7 @@ IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl)
if ( pEntry )
aLocaleSeq[i] = pEntry->m_aLocale;
}
- m_pLocalizationMgr->handleRemoveLocales( aLocaleSeq );
+ m_xLocalizationMgr->handleRemoveLocales( aLocaleSeq );
// update listbox
ClearLanguageBox();
FillLanguageBox();
@@ -251,7 +251,7 @@ IMPL_LINK_NOARG(ManageLanguageDialog, MakeDefHdl)
if ( pSelectEntry && !pSelectEntry->m_bIsDefault )
{
// set new default entry
- m_pLocalizationMgr->handleSetDefaultLocale( pSelectEntry->m_aLocale );
+ m_xLocalizationMgr->handleSetDefaultLocale( pSelectEntry->m_aLocale );
// update Listbox
ClearLanguageBox();
FillLanguageBox();
@@ -279,39 +279,34 @@ IMPL_LINK_NOARG(ManageLanguageDialog, SelectHdl)
// class SetDefaultLanguageDialog -----------------------------------------------
-SetDefaultLanguageDialog::SetDefaultLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> _pLMgr ) :
-
- ModalDialog( pParent, IDEResId( RID_DLG_SETDEF_LANGUAGE ) ),
- m_aLanguageFT ( this, IDEResId( FT_DEF_LANGUAGE ) ),
- m_pLanguageLB ( new SvxLanguageBox( this, IDEResId( LB_DEF_LANGUAGE ) ) ),
- m_pCheckLangLB ( NULL ),
- m_aInfoFT ( this, IDEResId( FT_DEF_INFO ) ),
- m_aBtnLine ( this, IDEResId( FL_DEF_BUTTONS ) ),
- m_aOKBtn ( this, IDEResId( PB_DEF_OK ) ),
- m_aCancelBtn ( this, IDEResId( PB_DEF_CANCEL ) ),
- m_aHelpBtn ( this, IDEResId( PB_DEF_HELP ) ),
- m_pLocalizationMgr( _pLMgr )
+SetDefaultLanguageDialog::SetDefaultLanguageDialog(Window* pParent, boost::shared_ptr<LocalizationMgr> xLMgr)
+ : ModalDialog(pParent, "DefaultLanguageDialog", "modules/BasicIDE/ui/defaultlanguage.ui")
+ , m_pCheckLangLB(NULL)
+ , m_xLocalizationMgr(xLMgr)
{
- if ( m_pLocalizationMgr->isLibraryLocalized() )
+ get(m_pLanguageLB, "entries");
+ get(m_pCheckLangLB, "checkedentries");
+ get(m_pDefinedFT, "defined");
+ get(m_pAddedFT, "added");
+ get(m_pLanguageFT, "defaultlabel");
+ get(m_pCheckLangFT, "checkedlabel");
+
+ m_pLanguageLB->set_height_request(m_pLanguageLB->GetTextHeight() * 10);
+ m_pCheckLangLB->set_height_request(m_pCheckLangLB->GetTextHeight() * 10);
+
+ if (m_xLocalizationMgr->isLibraryLocalized())
{
// change to "Add Interface Language" mode
- SetHelpId( HID_BASICIDE_ADDNEW_LANGUAGE );
- m_pCheckLangLB = new SvxCheckListBox( this, IDEResId( LB_ADD_LANGUAGE ) );
- SetText( IDE_RESSTR(STR_ADDLANG_TITLE) );
- m_aLanguageFT.SetText( IDE_RESSTR(STR_ADDLANG_LABEL) );
- m_aInfoFT.SetText( IDE_RESSTR(STR_ADDLANG_INFO) );
+ m_pLanguageLB->Hide();
+ m_pCheckLangLB->Show();
+ SetText(get<FixedText>("alttitle")->GetText());
+ m_pLanguageFT->Hide();
+ m_pCheckLangFT->Show();
+ m_pDefinedFT->Hide();
+ m_pAddedFT->Show();
}
- FreeResource();
-
FillLanguageBox();
- CalcInfoSize();
-}
-
-SetDefaultLanguageDialog::~SetDefaultLanguageDialog()
-{
- delete m_pLanguageLB;
- delete m_pCheckLangLB;
}
void SetDefaultLanguageDialog::FillLanguageBox()
@@ -319,14 +314,14 @@ void SetDefaultLanguageDialog::FillLanguageBox()
// fill list with all languages
m_pLanguageLB->SetLanguageList( LANG_LIST_ALL, false );
// remove the already localized languages
- Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales();
+ Sequence< Locale > aLocaleSeq = m_xLocalizationMgr->getStringResourceManager()->getLocales();
const Locale* pLocale = aLocaleSeq.getConstArray();
sal_Int32 i, nCount = aLocaleSeq.getLength();
for ( i = 0; i < nCount; ++i )
m_pLanguageLB->RemoveLanguage( LanguageTag::convertToLanguageType( pLocale[i] ) );
// fill checklistbox if not in default mode
- if ( m_pLocalizationMgr->isLibraryLocalized() )
+ if ( m_xLocalizationMgr->isLibraryLocalized() )
{
sal_uInt16 j, nCount_ = m_pLanguageLB->GetEntryCount();
for ( j = 0; j < nCount_; ++j )
@@ -334,7 +329,6 @@ void SetDefaultLanguageDialog::FillLanguageBox()
m_pCheckLangLB->InsertEntry(
m_pLanguageLB->GetEntry(j), LISTBOX_APPEND, m_pLanguageLB->GetEntryData(j) );
}
- delete m_pLanguageLB;
m_pLanguageLB = NULL;
}
else
@@ -342,37 +336,9 @@ void SetDefaultLanguageDialog::FillLanguageBox()
m_pLanguageLB->SelectLanguage( Application::GetSettings().GetUILanguageTag().getLanguageType() );
}
-void SetDefaultLanguageDialog::CalcInfoSize()
-{
- OUString sInfoStr = m_aInfoFT.GetText();
- long nInfoWidth = m_aInfoFT.GetSizePixel().Width();
- long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT );
- long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord;
- long nLines = ( nTxtWidth / nInfoWidth ) + 1;
- if ( nLines > INFO_LINES_COUNT )
- {
- Size aFTSize = m_aLanguageFT.GetSizePixel();
- Size aSize = m_aInfoFT.GetSizePixel();
- long nNewHeight = aFTSize.Height() * nLines;
- long nDelta = nNewHeight - aSize.Height();
- aSize.Height() = nNewHeight;
- m_aInfoFT.SetSizePixel( aSize );
-
- Window* pWin = ( m_pLanguageLB != NULL ) ? dynamic_cast< Window* >( m_pLanguageLB )
- : dynamic_cast< Window* >( m_pCheckLangLB );
- aSize = pWin->GetSizePixel();
- aSize.Height() -= nDelta;
- pWin->SetSizePixel( aSize );
-
- Point aNewPos = m_aInfoFT.GetPosPixel();
- aNewPos.Y() -= nDelta;
- m_aInfoFT.SetPosPixel( aNewPos );
- }
-}
-
Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const
{
- bool bNotLocalized = !m_pLocalizationMgr->isLibraryLocalized();
+ bool bNotLocalized = !m_xLocalizationMgr->isLibraryLocalized();
sal_Int32 nSize = bNotLocalized ? 1 : m_pCheckLangLB->GetCheckedEntryCount();
Sequence< Locale > aLocaleSeq( nSize );
if ( bNotLocalized )
diff --git a/basctl/source/dlged/managelang.hrc b/basctl/source/dlged/managelang.hrc
index 9154f645c933..929aee86e5e9 100644
--- a/basctl/source/dlged/managelang.hrc
+++ b/basctl/source/dlged/managelang.hrc
@@ -47,9 +47,6 @@
#define PB_DEF_OK 6
#define PB_DEF_CANCEL 7
#define PB_DEF_HELP 8
-#define STR_ADDLANG_TITLE 9
-#define STR_ADDLANG_LABEL 10
-#define STR_ADDLANG_INFO 11
// Metrics -----------------------------------------------------------------------
diff --git a/basctl/source/dlged/managelang.src b/basctl/source/dlged/managelang.src
index 079503597cd9..d38a43d66e69 100644
--- a/basctl/source/dlged/managelang.src
+++ b/basctl/source/dlged/managelang.src
@@ -115,79 +115,4 @@ QueryBox RID_QRYBOX_LANGUAGE
DEFBUTTON = WB_DEF_CANCEL ;
};
-ModalDialog RID_DLG_SETDEF_LANGUAGE
-{
- HelpId = HID_BASICIDE_SETDEFAULT_LANGUAGE ;
- OutputSize = TRUE ;
- Size = MAP_APPFONT ( SETDEF_DLG_WIDTH , SETDEF_DLG_HEIGHT ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "Set Default User Interface Language" ;
- FixedText FT_DEF_LANGUAGE
- {
- Pos = MAP_APPFONT ( SETDEF_COL1 , SETDEF_ROW1 ) ;
- Size = MAP_APPFONT ( SETDEF_LB_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "Default language" ;
- };
- ListBox LB_DEF_LANGUAGE
- {
- HelpID = "basctl:ListBox:RID_DLG_SETDEF_LANGUAGE:LB_DEF_LANGUAGE";
- Pos = MAP_APPFONT ( SETDEF_COL1 , SETDEF_ROW2 ) ;
- Size = MAP_APPFONT ( SETDEF_LB_WIDTH , SETDEF_LB_HEIGHT ) ;
- Border = TRUE;
- AutoHScroll = TRUE ;
- };
- Control LB_ADD_LANGUAGE
- {
- HelpId = HID_BASICIDE_ADDNEW_CONTROL ;
- Pos = MAP_APPFONT ( SETDEF_COL1 , SETDEF_ROW2 ) ;
- Size = MAP_APPFONT ( SETDEF_LB_WIDTH , SETDEF_LB_HEIGHT ) ;
- };
- FixedText FT_DEF_INFO
- {
- Pos = MAP_APPFONT ( SETDEF_COL1 , SETDEF_ROW3 ) ;
- Size = MAP_APPFONT ( SETDEF_LB_WIDTH, INFO_LINES_COUNT*RSC_CD_FIXEDTEXT_HEIGHT ) ;
- WordBreak = TRUE ;
- Text [ en-US ] = "Select a language to define the default user interface language. All currently present strings will be assigned to the resources created for the selected language." ;
- };
- FixedLine FL_DEF_BUTTONS
- {
- Pos = MAP_APPFONT ( 0 , SETDEF_ROW4 ) ;
- Size = MAP_APPFONT ( SETDEF_DLG_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ) ;
- };
- OKButton PB_DEF_OK
- {
- Pos = MAP_APPFONT ( SETDEF_COL2 , SETDEF_ROW5 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_DEF_CANCEL
- {
- Pos = MAP_APPFONT ( SETDEF_COL3 , SETDEF_ROW5 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- };
- HelpButton PB_DEF_HELP
- {
- Pos = MAP_APPFONT ( SETDEF_COL4 , SETDEF_ROW5 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- };
- String STR_ADDLANG_TITLE
- {
- Text [ en-US ] = "Add User Interface Languages" ;
- };
- String STR_ADDLANG_LABEL
- {
- Text [ en-US ] = "Available Languages" ;
- };
- String STR_ADDLANG_INFO
- {
- Text [ en-US ] = "Select languages to be added. Resources for these languages will be created in the library. Strings of the current default user interface language will be copied to these new resources by default." ;
- };
-};
-
-// -----------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/inc/dlgresid.hrc b/basctl/source/inc/dlgresid.hrc
index 980bbde8f71d..04163e4e7463 100644
--- a/basctl/source/inc/dlgresid.hrc
+++ b/basctl/source/inc/dlgresid.hrc
@@ -60,7 +60,6 @@
#define RID_DLG_MANAGE_LANGUAGE ( RID_DLG_START + 70 )
#define RID_QRYBOX_LANGUAGE ( RID_DLG_START + 71 )
-#define RID_DLG_SETDEF_LANGUAGE ( RID_DLG_START + 72 )
// -----------------------------------------------------------------------
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
index 0cd940be775f..86f5a7cb0fab 100644
--- a/basctl/source/inc/managelang.hxx
+++ b/basctl/source/inc/managelang.hxx
@@ -63,7 +63,7 @@ private:
HelpButton m_aHelpBtn;
OKButton m_aCloseBtn;
- boost::shared_ptr<LocalizationMgr> m_pLocalizationMgr;
+ boost::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
OUString m_sDefLangStr;
OUString m_sDeleteStr;
@@ -87,24 +87,19 @@ public:
class SetDefaultLanguageDialog : public ModalDialog
{
private:
- FixedText m_aLanguageFT;
+ FixedText* m_pLanguageFT;
SvxLanguageBox* m_pLanguageLB;
+ FixedText* m_pCheckLangFT;
SvxCheckListBox* m_pCheckLangLB;
- FixedText m_aInfoFT;
-
- FixedLine m_aBtnLine;
- OKButton m_aOKBtn;
- CancelButton m_aCancelBtn;
- HelpButton m_aHelpBtn;
+ FixedText* m_pDefinedFT;
+ FixedText* m_pAddedFT;
- boost::shared_ptr<LocalizationMgr> m_pLocalizationMgr;
+ boost::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
void FillLanguageBox();
- void CalcInfoSize();
public:
- SetDefaultLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> _pLMgr );
- ~SetDefaultLanguageDialog();
+ SetDefaultLanguageDialog(Window* pParent, boost::shared_ptr<LocalizationMgr> xLMgr);
::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > GetLocales() const;
};
diff --git a/basctl/uiconfig/basicide/ui/defaultlanguage.ui b/basctl/uiconfig/basicide/ui/defaultlanguage.ui
new file mode 100644
index 000000000000..3473b869f46c
--- /dev/null
+++ b/basctl/uiconfig/basicide/ui/defaultlanguage.ui
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Fri Jan 3 21:18:53 2014 -->
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkDialog" id="DefaultLanguageDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Set Default User Interface Language</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <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>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <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>
+ <child>
+ <object class="GtkLabel" id="defaultlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Default language</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entries:border</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxcorelo-SvxLanguageBox" id="entries:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="dropdown">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxcorelo-SvxCheckListBox" id="checkedentries:border">
+ <property name="can_focus">True</property>
+ <property name="no_show_all">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Check List Box-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="checkedlabel">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Available Languages</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">checkedentries:border</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="defined">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select a language to define the default user interface language. All currently present strings will be assigned to the resources created for the selected language.</property>
+ <property name="wrap">True</property>
+ <property name="wrap_mode">word-char</property>
+ <property name="max_width_chars">72</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="added">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select languages to be added. Resources for these languages will be created in the library. Strings of the current default user interface language will be copied to these new resources by default.</property>
+ <property name="wrap">True</property>
+ <property name="wrap_mode">word-char</property>
+ <property name="max_width_chars">72</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="alttitle">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Add User Interface Languages</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 766e0729731d..2b36eb163818 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -187,10 +187,6 @@
</properties>
</glade-widget-class>
- <glade-widget-class title="Language ListBox" name="svxcorelo-SvxLanguageBox"
- generic-name="LanguageBox" parent="GtkComboBox"
- icon-name="widget-gtk-combobox"/>
-
<glade-widget-class title="Font ListBox" name="svtlo-FontStyleBox"
generic-name="FontStyleBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
@@ -496,6 +492,10 @@
generic-name="NumFormatListBox" parent="VclComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
+ <glade-widget-class title="Language ListBox" name="svxcorelo-SvxLanguageBox"
+ generic-name="LanguageBox" parent="VclComboBoxText"
+ icon-name="widget-gtk-combobox"/>
+
<glade-widget-class title="Reference Button" name="foruilo-RefButton"
generic-name="Reference Button" parent="GtkButton"
icon-name="widget-gtk-button"/>
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 3b3eca6e8f65..501a2fe615d2 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -136,9 +136,15 @@ SvxLanguageBox::SvxLanguageBox( Window* pParent, WinBits nBits, sal_Bool bCheck
Init();
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxLanguageBox(Window *pParent, VclBuilder::stringmap &)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxLanguageBox(Window *pParent, VclBuilder::stringmap &rMap)
{
- SvxLanguageBox *pListBox = new SvxLanguageBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
+ WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
+ bool bDropdown = VclBuilder::extractDropdown(rMap);
+ if (bDropdown)
+ nBits |= WB_DROPDOWN;
+ else
+ nBits |= WB_BORDER;
+ SvxLanguageBox *pListBox = new SvxLanguageBox(pParent, nBits);
pListBox->EnableAutoSize(true);
return pListBox;
}