diff options
-rw-r--r-- | dbaccess/UIConfig_dbaccess.mk | 1 | ||||
-rw-r--r-- | dbaccess/inc/dbaccess_helpid.hrc | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbadmin.src | 56 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/detailpages.cxx | 44 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/detailpages.hxx | 10 | ||||
-rw-r--r-- | dbaccess/uiconfig/ui/userdetailspage.ui | 240 |
6 files changed, 268 insertions, 84 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk index e30fc5296612..41567d70e479 100644 --- a/dbaccess/UIConfig_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/typeselectpage \ dbaccess/uiconfig/ui/useradmindialog \ dbaccess/uiconfig/ui/useradminpage \ + dbaccess/uiconfig/ui/userdetailspage \ )) # vim: set noet sw=4 ts=4: diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc index a64c290a1f3c..e37a493bfd35 100644 --- a/dbaccess/inc/dbaccess_helpid.hrc +++ b/dbaccess/inc/dbaccess_helpid.hrc @@ -136,7 +136,6 @@ #define HID_DOCUMENT_CREATE_REPWIZ "DBACCESS_HID_DOCUMENT_CREATE_REPWIZ" #define HID_TAB_AUTOINCREMENTVALUE "DBACCESS_HID_TAB_AUTOINCREMENTVALUE" -#define HID_DSADMIN_PAGE_USERDRIVER "DBACCESS_HID_DSADMIN_PAGE_USERDRIVER" #define HID_DSADMIN_USESSL_LDAP "DBACCESS_HID_DSADMIN_USESSL_LDAP" #define HID_DSADMIN_DBASE_PATH "DBACCESS_HID_DSADMIN_DBASE_PATH" #define HID_DSADMIN_MYSQL_DATABASE "DBACCESS_HID_DSADMIN_MYSQL_DATABASE" diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index 500341a545f0..6d729f93a8ce 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -28,62 +28,6 @@ String STR_DATABASE_TYPE_CHANGE Text [ en-US ] = "Database properties" ; }; -TabPage PAGE_USERDRIVER -{ - SVLook = TRUE ; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; - Hide = TRUE; - HelpId = HID_DSADMIN_PAGE_USERDRIVER; - - FixedText FT_HOSTNAME - { - Pos = MAP_APPFONT ( 6 , UNRELATED_CONTROLS ) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text[ en-US ] = "~Hostname"; - }; - Edit ET_HOSTNAME - { - HelpID = "dbaccess:Edit:PAGE_USERDRIVER:ET_HOSTNAME"; - TabStop = TRUE ; - Border = TRUE ; - Pos = MAP_APPFONT ( EDIT_X , UNRELATED_CONTROLS -1 ) ; - Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; - }; - - FixedText FT_PORTNUMBER - { - Pos = MAP_APPFONT ( 6 , 2*UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text[ en-US ] = "~Port number"; - }; - - NumericField NF_PORTNUMBER - { - HelpID = "dbaccess:NumericField:PAGE_USERDRIVER:NF_PORTNUMBER"; - TabStop = TRUE ; - Border = TRUE ; - NoThousandSep = TRUE; - - Pos = MAP_APPFONT ( EDIT_X , 2*UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT -1 ) ; - Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; - }; - - FixedText FT_OPTIONS - { - Pos = MAP_APPFONT ( 6 , 3*UNRELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT ) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "~Driver settings" ; - }; - Edit ET_OPTIONS - { - HelpID = "dbaccess:Edit:PAGE_USERDRIVER:ET_OPTIONS"; - Border = TRUE ; - TabStop = TRUE ; - }; - AUTO_CHARSET( 4*UNRELATED_CONTROLS+ 3*FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X) -}; - String STR_PARENTTITLE_GENERAL { Text [ en-US ] = "Data Source Properties: #" ; diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index c62789614644..c3e9088e59c0 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -369,16 +369,16 @@ namespace dbaui } // OOdbcDetailsPage OUserDriverDetailsPage::OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) - :OCommonBehaviourTabPage(pParent, PAGE_USERDRIVER, _rCoreAttrs, - CBTP_USE_CHARSET | CBTP_USE_OPTIONS ,false) - ,m_aFTHostname (this, ModuleRes(FT_HOSTNAME)) - ,m_aEDHostname (this, ModuleRes(ET_HOSTNAME)) - ,m_aPortNumber (this, ModuleRes(FT_PORTNUMBER)) - ,m_aNFPortNumber (this, ModuleRes(NF_PORTNUMBER)) - ,m_aUseCatalog (this, ModuleRes(CB_USECATALOG)) + : OCommonBehaviourTabPage(pParent, "UserDetailsPage", "dbaccess/ui/userdetailspage.ui", _rCoreAttrs, + CBTP_USE_CHARSET | CBTP_USE_OPTIONS) { - m_aUseCatalog.SetToggleHdl(getControlModifiedLink()); - FreeResource(); + get(m_pFTHostname, "hostnameft"); + get(m_pEDHostname, "hostname"); + get(m_pPortNumber, "portnumberft"); + get(m_pNFPortNumber, "portnumber"); + m_pNFPortNumber->SetUseThousandSep(false); + get(m_pUseCatalog, "usecatalog"); + m_pUseCatalog->SetToggleHdl(getControlModifiedLink()); } SfxTabPage* ODriversSettings::CreateUser( Window* pParent, const SfxItemSet* _rAttrSet ) @@ -390,24 +390,24 @@ namespace dbaui { bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); - fillInt32(*_rSet,&m_aNFPortNumber,DSID_CONN_PORTNUMBER,bChangedSomething); - fillString(*_rSet,&m_aEDHostname,DSID_CONN_HOSTNAME,bChangedSomething); - fillBool(*_rSet,&m_aUseCatalog,DSID_USECATALOG,bChangedSomething); + fillInt32(*_rSet,m_pNFPortNumber,DSID_CONN_PORTNUMBER,bChangedSomething); + fillString(*_rSet,m_pEDHostname,DSID_CONN_HOSTNAME,bChangedSomething); + fillBool(*_rSet,m_pUseCatalog,DSID_USECATALOG,bChangedSomething); return bChangedSomething; } void OUserDriverDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls(_rControlList); - _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aEDHostname)); - _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aUseCatalog)); - _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); + _rControlList.push_back(new OSaveValueWrapper<Edit>(m_pEDHostname)); + _rControlList.push_back(new OSaveValueWrapper<CheckBox>(m_pUseCatalog)); + _rControlList.push_back(new OSaveValueWrapper<NumericField>(m_pNFPortNumber)); } void OUserDriverDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows(_rControlList); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHostname)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aPortNumber)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pFTHostname)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pPortNumber)); } void OUserDriverDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { @@ -421,13 +421,13 @@ namespace dbaui if ( bValid ) { - m_aEDHostname.SetText(pHostName->GetValue()); - m_aEDHostname.ClearModifyFlag(); + m_pEDHostname->SetText(pHostName->GetValue()); + m_pEDHostname->ClearModifyFlag(); - m_aNFPortNumber.SetValue(pPortNumber->GetValue()); - m_aNFPortNumber.ClearModifyFlag(); + m_pNFPortNumber->SetValue(pPortNumber->GetValue()); + m_pNFPortNumber->ClearModifyFlag(); - m_aUseCatalog.Check(pUseCatalogItem->GetValue()); + m_pUseCatalog->Check(pUseCatalogItem->GetValue()); } OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 840c01f7f0b4..ca872815b2de 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -149,11 +149,11 @@ namespace dbaui virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; private: - FixedText m_aFTHostname; - Edit m_aEDHostname; - FixedText m_aPortNumber; - NumericField m_aNFPortNumber; - CheckBox m_aUseCatalog; + FixedText* m_pFTHostname; + Edit* m_pEDHostname; + FixedText* m_pPortNumber; + NumericField* m_pNFPortNumber; + CheckBox* m_pUseCatalog; }; // OMySQLODBCDetailsPage diff --git a/dbaccess/uiconfig/ui/userdetailspage.ui b/dbaccess/uiconfig/ui/userdetailspage.ui new file mode 100644 index 000000000000..38e24aca149e --- /dev/null +++ b/dbaccess/uiconfig/ui/userdetailspage.ui @@ -0,0 +1,240 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkBox" id="UserDetailsPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="hostnameft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Hostname</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">hostname</property> + <property name="ellipsize">end</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="GtkLabel" id="portnumberft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Port number</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">portnumber</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="GtkEntry" id="hostname"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="portnumber"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="usecatalog"> + <property name="label" translatable="yes">_Use catalog</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="optionslabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Driver settings</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">options</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="GtkEntry" id="options"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Connection Settings</property> + <attributes> + <attribute name="weight" value="semibold"/> + </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="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="charsetlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Character set</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">charset</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="dbulo-CharSetListBox" id="charset"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="charsetheader"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Data conversion</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <widgets> + <widget name="hostnameft"/> + <widget name="portnumberft"/> + <widget name="optionslabel"/> + <widget name="charsetlabel"/> + </widgets> + </object> +</interface> |