diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 16:21:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 16:38:42 +0000 |
commit | 85f1c4a2cb1b54aabcb5249cf3c0b07182e8c434 (patch) | |
tree | 0b6d7df26a2839e93d9d847760b8ba897be00fca | |
parent | 3e8622e563046cf17329d3ad8ab6745574d2e309 (diff) |
convert advanced db settings dialog to .ui format
Change-Id: Ia3152b7cc5edd89f37c78841e10bb5feacc6fc12
-rw-r--r-- | dbaccess/UIConfig_dbaccess.mk | 1 | ||||
-rw-r--r-- | dbaccess/inc/dbaccess_helpid.hrc | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/UserAdminDlg.src | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/advancedsettings.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/advancedsettings.hrc | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/advancedsettings.src | 30 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbadmin.src | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbadminsetup.src | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbu_resource.hrc | 1 | ||||
-rw-r--r-- | dbaccess/uiconfig/ui/advancedsettingsdialog.ui | 120 |
10 files changed, 131 insertions, 46 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk index 258975f79f96..702b9a20d83c 100644 --- a/dbaccess/UIConfig_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -10,6 +10,7 @@ $(eval $(call gb_UIConfig_UIConfig,dbaccess)) $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ + dbaccess/uiconfig/ui/advancedsettingsdialog \ dbaccess/uiconfig/ui/colwidthdialog \ dbaccess/uiconfig/ui/directsqldialog \ dbaccess/uiconfig/ui/fielddialog \ diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc index f7488c6ed491..2f0e3b4b1a3d 100644 --- a/dbaccess/inc/dbaccess_helpid.hrc +++ b/dbaccess/inc/dbaccess_helpid.hrc @@ -34,7 +34,6 @@ #define HID_DSADMIN_DIALOG "DBACCESS_HID_DSADMIN_DIALOG" -#define HID_DSADMIN_TABCONTROL "DBACCESS_HID_DSADMIN_TABCONTROL" #define HID_DSADMIN_PAGE_GENERAL "DBACCESS_HID_DSADMIN_PAGE_GENERAL" #define HID_DSADMIN_PAGE_DBASE "DBACCESS_HID_DSADMIN_PAGE_DBASE" #define HID_DSADMIN_PAGE_JDBC "DBACCESS_HID_DSADMIN_PAGE_JDBC" @@ -272,7 +271,6 @@ #define HID_DSADMIN_PAGE_MSACCESS "DBACCESS_HID_DSADMIN_PAGE_MSACCESS" #define HID_DSADMIN_FLAT_PATH "DBACCESS_HID_DSADMIN_FLAT_PATH" #define HID_DSADMIN_CALC_PATH "DBACCESS_HID_DSADMIN_CALC_PATH" -#define HID_DSADMIN_ADVANCED "DBACCESS_HID_DSADMIN_ADVANCED" #define HID_DSADMIN_BOOLEANCOMPARISON "DBACCESS_HID_DSADMIN_BOOLEANCOMPARISON" #define HID_DSADMIN_ORACLE_DATABASE "DBACCESS_HID_DSADMIN_ORACLE_DATABASE" #define HID_DSADMIN_MAXROWSCAN "DBACCESS_HID_DSADMIN_MAXROWSCAN" diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.src b/dbaccess/source/ui/dlg/UserAdminDlg.src index 3a683bcedd41..dc26bf858632 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.src +++ b/dbaccess/source/ui/dlg/UserAdminDlg.src @@ -33,7 +33,6 @@ TabDialog DLG_DATABASE_USERADMIN TabControl 1 { OutputSize = TRUE ; - HelpId = HID_DSADMIN_TABCONTROL; }; String STR_PAGETITLE_USERADMIN { diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 84088c7c3ce3..fcc0bf2b2de3 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -429,7 +429,8 @@ namespace dbaui // AdvancedSettingsDialog AdvancedSettingsDialog::AdvancedSettingsDialog( Window* _pParent, SfxItemSet* _pItems, const Reference< XComponentContext >& _rxContext, const Any& _aDataSourceName ) - :SfxTabDialog(_pParent, ModuleRes(DLG_DATABASE_ADVANCED), _pItems) + : SfxTabDialog(_pParent, "AdvancedSettingsDialog", + "dbaccess/ui/advancedsettingsdialog.ui", _pItems) { m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext,_pParent,this)); m_pImpl->setDataSourceOrName(_aDataSourceName); @@ -446,16 +447,19 @@ namespace dbaui const FeatureSet& rFeatures( aMeta.getFeatureSet() ); // auto-generated values? - if ( rFeatures.supportsGeneratedValues() ) - AddTabPage( PAGE_GENERATED_VALUES, OUString( ModuleRes( STR_GENERATED_VALUE ) ), ODriversSettings::CreateGeneratedValuesPage, NULL ); + if (rFeatures.supportsGeneratedValues()) + AddTabPage("generated", ODriversSettings::CreateGeneratedValuesPage, NULL); + else + RemoveTabPage("generated"); // any "special settings"? - if ( rFeatures.supportsAnySpecialSetting() ) - AddTabPage( PAGE_ADVANCED_SETTINGS_SPECIAL, OUString( ModuleRes( STR_DS_BEHAVIOUR ) ), ODriversSettings::CreateSpecialSettingsPage, NULL ); + if (rFeatures.supportsAnySpecialSetting()) + AddTabPage("special", ODriversSettings::CreateSpecialSettingsPage, NULL); + else + RemoveTabPage("special"); // remove the reset button - it's meaning is much too ambiguous in this dialog RemoveResetButton(); - FreeResource(); } AdvancedSettingsDialog::~AdvancedSettingsDialog() diff --git a/dbaccess/source/ui/dlg/advancedsettings.hrc b/dbaccess/source/ui/dlg/advancedsettings.hrc index 25c784837108..2df13e8ba3ca 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hrc +++ b/dbaccess/source/ui/dlg/advancedsettings.hrc @@ -32,9 +32,6 @@ /* bottom space */ START_Y -#define STR_GENERATED_VALUE 1 -#define STR_DS_BEHAVIOUR 2 - #define FL_SEPARATORAUTO 1 #define FL_DATAHANDLING 2 diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src index 0f7158e9f08d..d09b5a88644c 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.src +++ b/dbaccess/source/ui/dlg/advancedsettings.src @@ -358,34 +358,4 @@ TabPage PAGE_ADVANCED_SETTINGS_SPECIAL AUTO_MAXROWSCAN( 18*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) }; -//------------------------------------------------------------------------- - -TabDialog DLG_DATABASE_ADVANCED -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; - HelpId = HID_DSADMIN_ADVANCED; - - TabControl 1 - { - OutputSize = TRUE ; - HelpId = HID_DSADMIN_TABCONTROL; - }; - - String STR_GENERATED_VALUE - { - Text [ en-US ] = "Generated Values"; - }; - - String STR_DS_BEHAVIOUR - { - Text [ en-US ] = "Special Settings"; - }; - - Text [ en-US ] = "Advanced Settings" ; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index 5d695b6917da..0fb28e85ca37 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -90,7 +90,6 @@ TabDialog DLG_DATABASE_ADMINISTRATION TabControl 1 { OutputSize = TRUE ; - HelpId = HID_DSADMIN_TABCONTROL; }; //......................................................................... @@ -123,7 +122,6 @@ ModalDialog DLG_DATABASE_TYPE_CHANGE TabControl 1 { OutputSize = TRUE ; - HelpId = HID_DSADMIN_TABCONTROL; }; Text [ en-US ] = "Database properties" ; }; diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index 488493f1f9a4..9680a0899dbb 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -41,7 +41,6 @@ ModalDialog DLG_DATABASE_WIZARD TabControl 1 { OutputSize = TRUE ; - HelpId = HID_DSADMIN_TABCONTROL; }; String STR_DBWIZARDTITLE diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index dad4a1c8feb1..2905821f7dba 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -94,7 +94,6 @@ #define DLG_DATABASE_USERADMIN RID_DIALOG_START + 21 // FREE #define DLG_PASSWORD RID_DIALOG_START + 23 -#define DLG_DATABASE_ADVANCED RID_DIALOG_START + 26 #define DLG_COLLECTION_VIEW RID_DIALOG_START + 27 #define DLG_DATABASE_TYPE_CHANGE RID_DIALOG_START + 28 #define DLG_DATABASE_WIZARD RID_DIALOG_START + 29 diff --git a/dbaccess/uiconfig/ui/advancedsettingsdialog.ui b/dbaccess/uiconfig/ui/advancedsettingsdialog.ui new file mode 100644 index 000000000000..aeb85b484691 --- /dev/null +++ b/dbaccess/uiconfig/ui/advancedsettingsdialog.ui @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.0 on Mon Jan 20 16:15:12 2014 --> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="AdvancedSettingsDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Advanced Settings</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="GtkNotebook" id="tabcontrol"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="generated"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Generated Values</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="special"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0.4699999988079071</property> + <property name="label" translatable="yes">Special Settings</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</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> |