summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2014-07-29 14:00:32 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-01 14:38:40 +0000
commitca1897ede3faaf71d263ab2efaf975c74c46f8b5 (patch)
tree928adee46684f97ebcf2fc9404b8f9d76ebb153c
parent4b2c5a943dc43f9da6e690f103945abd8999fa46 (diff)
Convert 5 tabpages to .ui
I convert PAGE_DBWIZARD_ADO, PAGE_DBWIZARD_DBASE, PAGE_DBWIZARD_MSACCESS, PAGE_DBWIZARD_ODBC, PAGE_DBWIZARD_USERDEFINED Conflicts: dbaccess/source/ui/inc/dbu_resource.hrc Change-Id: Id5efedb2016011a25c037b7d2bc15b20ddd73800 Reviewed-on: https://gerrit.libreoffice.org/10607 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--dbaccess/UIConfig_dbaccess.mk1
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx20
-rw-r--r--dbaccess/source/ui/dlg/dbadminsetup.hrc8
-rw-r--r--dbaccess/source/ui/dlg/dbadminsetup.src97
-rw-r--r--dbaccess/source/ui/inc/dbu_dlg.hrc14
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc21
-rw-r--r--dbaccess/uiconfig/ui/connectionpage.ui123
7 files changed, 171 insertions, 113 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index d227222b4dda..ae211dfd0a4e 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/choosedatasourcedialog \
dbaccess/uiconfig/ui/collectionviewdialog \
dbaccess/uiconfig/ui/colwidthdialog \
+ dbaccess/uiconfig/ui/connectionpage \
dbaccess/uiconfig/ui/copytablepage \
dbaccess/uiconfig/ui/dbaseindexdialog \
dbaccess/uiconfig/ui/dbwizmysqlintropage \
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 682080374afd..2c2d3fbe94e9 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -68,37 +68,27 @@ namespace dbaui
OGenericAdministrationPage* OConnectionTabPageSetup::CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_DBASE, _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE);
- oDBWizardPage->FreeResource();
- return oDBWizardPage;
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateMSAccessTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_MSACCESS, _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE);
- oDBWizardPage->FreeResource();
- return oDBWizardPage;
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateADOTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_ADO, _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL);
- oDBWizardPage->FreeResource();
- return oDBWizardPage;
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateODBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_ODBC, _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE);
- oDBWizardPage->FreeResource();
- return oDBWizardPage;
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_USERDEFINED, _rAttrSet, USHRT_MAX, USHRT_MAX, STR_COMMONURL);
- oDBWizardPage->FreeResource();
- return oDBWizardPage;
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, USHRT_MAX, USHRT_MAX, STR_COMMONURL);
}
// OConnectionTabPageSetup
diff --git a/dbaccess/source/ui/dlg/dbadminsetup.hrc b/dbaccess/source/ui/dlg/dbadminsetup.hrc
index c483d3a35d4d..6571f91a25be 100644
--- a/dbaccess/source/ui/dlg/dbadminsetup.hrc
+++ b/dbaccess/source/ui/dlg/dbadminsetup.hrc
@@ -24,21 +24,13 @@
#include "dbu_dlg.hrc"
#include "browserids.hxx"
-#define STR_DBASE_HELPTEXT 28
-#define STR_MSACCESS_HELPTEXT 29
// FREE
-#define STR_ADO_HELPTEXT 32
#define STR_JDBC_HELPTEXT 33
-#define STR_ODBC_HELPTEXT 34
#define STR_MYSQLJDBC_HELPTEXT 35
// FREE
#define STR_ORACLE_HELPTEXT 40
-#define STR_DBASE_HEADERTEXT 41
-#define STR_MSACCESS_HEADERTEXT 42
// FREE
-#define STR_ADO_HEADERTEXT 45
#define STR_JDBC_HEADERTEXT 46
-#define STR_ODBC_HEADERTEXT 47
#define STR_MYSQLJDBC_HEADERTEXT 48
// FREE
#define STR_ORACLE_HEADERTEXT 54
diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src
index 32552223100e..5f4be24e4606 100644
--- a/dbaccess/source/ui/dlg/dbadminsetup.src
+++ b/dbaccess/source/ui/dlg/dbadminsetup.src
@@ -221,27 +221,15 @@ TabPage PAGE_DBWIZARD_MYSQL_NATIVE
};
};
-TabPage PAGE_DBWIZARD_DBASE
+String STR_DBASE_HEADERTEXT
{
- HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_DBASE";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
- Hide = TRUE ;
-
- String STR_DBASE_HEADERTEXT
- {
- Text[ en-US ] = "Set up a connection to dBASE files" ;
- };
-
- String STR_DBASE_HELPTEXT
- {
- Text[ en-US ] = "Select the folder where the dBASE files are stored." ;
- };
-
- AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION,HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION)
+ Text[ en-US ] = "Set up a connection to dBASE files" ;
};
+String STR_DBASE_HELPTEXT
+{
+ Text[ en-US ] = "Select the folder where the dBASE files are stored." ;
+};
String STR_TEXT_HEADERTEXT
{
@@ -258,25 +246,14 @@ String STR_TEXT_PATH_OR_FILE
Text[ en-US ] = "Path to text files";
};
-TabPage PAGE_DBWIZARD_MSACCESS
+String STR_MSACCESS_HEADERTEXT
{
- HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MSACCESS";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
- Hide = TRUE ;
-
- String STR_MSACCESS_HEADERTEXT
- {
- Text[ en-US ] = "Set up a connection to a Microsoft Access database" ;
- };
-
- String STR_MSACCESS_HELPTEXT
- {
- Text[ en-US ] = "Please select the Microsoft Access file you want to access.";
- };
+ Text[ en-US ] = "Set up a connection to a Microsoft Access database" ;
+};
- AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION, HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION)
+String STR_MSACCESS_HELPTEXT
+{
+ Text[ en-US ] = "Please select the Microsoft Access file you want to access.";
};
TabPage PAGE_DBWIZARD_LDAP
@@ -319,55 +296,23 @@ TabPage PAGE_DBWIZARD_LDAP
};
};
-TabPage PAGE_DBWIZARD_ADO
+String STR_ADO_HEADERTEXT
{
- HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADO";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
- Hide = TRUE ;
-
- String STR_ADO_HEADERTEXT
- {
- Text[ en-US ] = "Set up a connection to an ADO database" ;
- };
-
- String STR_ADO_HELPTEXT{
- Text[ en-US ] = "Please enter the URL of the ADO data source you want to connect to.\nClick 'Browse' to configure provider-specific settings.\nPlease contact your system administrator if you are unsure about the following settings." ;
- };
-
- AUTO_HELP_BROWSECONTROLGROUP(5, HID_PAGE_DBWIZARD_ADO_ET_ADOURL, HID_PAGE_DBWIZARD_ADO_PB_ADOURL)
+ Text[ en-US ] = "Set up a connection to an ADO database" ;
};
-TabPage PAGE_DBWIZARD_ODBC
+String STR_ADO_HELPTEXT
{
- HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ODBC";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
- Hide = TRUE ;
-
- String STR_ODBC_HEADERTEXT
- {
- Text[ en-US ] = "Set up a connection to an ODBC database" ;
- };
-
- String STR_ODBC_HELPTEXT{
- Text[ en-US ] = "Enter the name of the ODBC database you want to connect to.\nClick 'Browse...' to select an ODBC database that is already registered in %PRODUCTNAME.\nPlease contact your system administrator if you are unsure about the following settings." ;
- };
-
- AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE, HID_PAGE_DBWIZARD_ODBC_PB_NAMEOFODBCDATASOURCE)
+ Text[ en-US ] = "Please enter the URL of the ADO data source you want to connect to.\nClick 'Browse' to configure provider-specific settings.\nPlease contact your system administrator if you are unsure about the following settings." ;
};
-TabPage PAGE_DBWIZARD_USERDEFINED
+String STR_ODBC_HEADERTEXT
{
- HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_USERDEFINED";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
- Hide = TRUE ;
+ Text[ en-US ] = "Set up a connection to an ODBC database" ;
+};
- AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE, HID_PAGE_DBWIZARD_USERDEFINED_BROWSE)
+String STR_ODBC_HELPTEXT{
+ Text[ en-US ] = "Enter the name of the ODBC database you want to connect to.\nClick 'Browse...' to select an ODBC database that is already registered in %PRODUCTNAME.\nPlease contact your system administrator if you are unsure about the following settings." ;
};
TabPage PAGE_DBWIZARD_JDBC
diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc
index 77f34a7acb28..1bae53e0c359 100644
--- a/dbaccess/source/ui/inc/dbu_dlg.hrc
+++ b/dbaccess/source/ui/inc/dbu_dlg.hrc
@@ -125,9 +125,21 @@
#define STR_PAGETITLE_MYSQL_NATIVE RID_STR_DLG_START + 81
#define STR_PAGETITLE_FINAL RID_STR_DLG_START + 82
+#define STR_DBASE_HEADERTEXT RID_STR_DLG_START + 83
+#define STR_DBASE_HELPTEXT RID_STR_DLG_START + 84
+
+#define STR_MSACCESS_HEADERTEXT RID_STR_DLG_START + 85
+#define STR_MSACCESS_HELPTEXT RID_STR_DLG_START + 86
+
+#define STR_ADO_HEADERTEXT RID_STR_DLG_START + 87
+#define STR_ADO_HELPTEXT RID_STR_DLG_START + 88
+
+#define STR_ODBC_HEADERTEXT RID_STR_DLG_START + 89
+#define STR_ODBC_HELPTEXT RID_STR_DLG_START + 90
+
// please adjust checking before insert new strings
-#define LAST_STR_HERE RID_STR_DLG_START + 83
+#define LAST_STR_HERE RID_STR_DLG_START + 91
#if LAST_STR_HERE > RID_STR_DLG_END
#error Resource-Id Overflow in #file, #line
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 41b98fb89022..4d5e5b1c2f6d 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -45,28 +45,28 @@
#define RID_STR_CONTROL_END RID_STR_CONTROL_START + 30 // 40 - 69
#define RID_STR_DLG_START RID_STR_CONTROL_END
-#define RID_STR_DLG_END RID_STR_DLG_START + 95 // 70 - 164
+#define RID_STR_DLG_END RID_STR_DLG_START + 103 // 70 - 172
#define RID_STR_MISC_START RID_STR_DLG_END
-#define RID_STR_MISC_END RID_STR_MISC_START + 20 // 165 - 184
+#define RID_STR_MISC_END RID_STR_MISC_START + 20 // 173 - 192
#define RID_STR_QRY_START RID_STR_MISC_END
-#define RID_STR_QRY_END RID_STR_QRY_START + 80 // 185 - 264
+#define RID_STR_QRY_END RID_STR_QRY_START + 80 // 193 - 272
#define RID_STR_TBL_START RID_STR_QRY_END
-#define RID_STR_TBL_END RID_STR_TBL_START + 80 // 265 - 344
+#define RID_STR_TBL_END RID_STR_TBL_START + 80 // 273 - 352
#define RID_STR_REL_START RID_STR_TBL_END
-#define RID_STR_REL_END RID_STR_REL_START + 10 // 345 - 364
+#define RID_STR_REL_END RID_STR_REL_START + 10 // 353 - 372
#define RID_STR_UNO_START RID_STR_REL_END
-#define RID_STR_UNO_END RID_STR_UNO_START + 20 // 365 - 384
+#define RID_STR_UNO_END RID_STR_UNO_START + 20 // 373 - 392
#define RID_STR_GEN_START RID_STR_UNO_END
-#define RID_STR_GEN_END RID_STR_GEN_START + 56 // 385 - 440
+#define RID_STR_GEN_END RID_STR_GEN_START + 56 // 393 - 448
#define RID_STR_APP_START RID_STR_GEN_END
-#define RID_STR_APP_END RID_STR_APP_START + 40 // 441 - 480
+#define RID_STR_APP_END RID_STR_APP_START + 40 // 449 - 488
#if RID_STR_GEN_END > RID_DBACCESS_END
#error Resource-Id Ueberlauf in #file, #line
@@ -114,18 +114,13 @@
#define PAGE_ORACLE_JDBC RID_PAGE_START + 27
#define PAGE_TABLESUBSCRIPTION RID_PAGE_START + 28
-#define PAGE_DBWIZARD_DBASE RID_PAGE_START + 41
// FREE
-#define PAGE_DBWIZARD_MSACCESS RID_PAGE_START + 43
#define PAGE_DBWIZARD_LDAP RID_PAGE_START + 44
// FREE
#define PAGE_DBWIZARD_ORACLE RID_PAGE_START + 48
#define PAGE_DBWIZARD_JDBC RID_PAGE_START + 49
-#define PAGE_DBWIZARD_ADO RID_PAGE_START + 50
-#define PAGE_DBWIZARD_ODBC RID_PAGE_START + 51
#define PAGE_DBWIZARD_AUTHENTIFICATION RID_PAGE_START + 53
#define PAGE_DBWIZARD_MYSQL_JDBC RID_PAGE_START + 54
-#define PAGE_DBWIZARD_USERDEFINED RID_PAGE_START + 56
#define PAGE_DBWIZARD_MYSQL_NATIVE RID_PAGE_START + 57
// error boxes
diff --git a/dbaccess/uiconfig/ui/connectionpage.ui b/dbaccess/uiconfig/ui/connectionpage.ui
new file mode 100644
index 000000000000..0a79549643d6
--- /dev/null
+++ b/dbaccess/uiconfig/ui/connectionpage.ui
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkBox" id="ConnectionPage">
+ <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">6</property>
+ <child>
+ <object class="GtkLabel" id="header">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_bottom">12</property>
+ <property name="label" translatable="yes">label</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="helptext">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_bottom">6</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">60</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="browseurllabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Path to the dBASE files</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="dbulo-ConnectionURLEdit" id="browseurl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</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="GtkButton" id="create">
+ <property name="label" translatable="yes">_Create New</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">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="GtkButton" id="browse">
+ <property name="label" translatable="yes">_Browse</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>