summaryrefslogtreecommitdiff
path: root/extensions/source/abpilot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-08 16:29:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-08 16:32:27 +0100
commit8a6b647990ba435a1b0b169d321d4f50550e567d (patch)
tree2f68e2c49f716ae605cdc7fec1c8931578dd8786 /extensions/source/abpilot
parent58ff85ffe5d82268489e1b1e3dc030826c28773b (diff)
convert table selection page to .ui
Change-Id: Id54d2c6e9cb2f32f90e60d6348fc768e00e5c704
Diffstat (limited to 'extensions/source/abpilot')
-rw-r--r--extensions/source/abpilot/abpresid.hrc4
-rw-r--r--extensions/source/abpilot/abspilot.src29
-rw-r--r--extensions/source/abpilot/tableselectionpage.cxx26
-rw-r--r--extensions/source/abpilot/tableselectionpage.hxx3
4 files changed, 13 insertions, 49 deletions
diff --git a/extensions/source/abpilot/abpresid.hrc b/extensions/source/abpilot/abpresid.hrc
index cc8f18b2b0c7..2e4b02c1992a 100644
--- a/extensions/source/abpilot/abpresid.hrc
+++ b/extensions/source/abpilot/abpresid.hrc
@@ -45,7 +45,6 @@
// tab pages
#define RID_PAGE_ADMININVOKATION ( RID_PAGE_START + 1 )
-#define RID_PAGE_TABLESELECTION_AB ( RID_PAGE_START + 2 )
#define RID_PAGE_FINAL ( RID_PAGE_START + 4 )
// please adjust RID_PAGE_END (below) when adding new tab pages
@@ -131,7 +130,6 @@
#define FT_ADMINEXPLANATION 3
#define FT_NAME_EXPL 4
#define FT_ERROR 5
-#define FL_TOOMUCHTABLES 6
#define FT_FINISH_EXPL 9
#define FT_DUPLICATENAME 10
#define FT_LOCATION 11
@@ -141,8 +139,6 @@
#define PB_INVOKE_ADMIN_DIALOG 1
#define PB_BROWSE 3
-#define LB_TABLELIST 1
-
#define CB_REGISTER_DS 1
#define CBB_LOCATION 1
diff --git a/extensions/source/abpilot/abspilot.src b/extensions/source/abpilot/abspilot.src
index ddc17c39d182..f3f65bc21b18 100644
--- a/extensions/source/abpilot/abspilot.src
+++ b/extensions/source/abpilot/abspilot.src
@@ -93,35 +93,6 @@ TabPage RID_PAGE_ADMININVOKATION
};
};
-
-TabPage RID_PAGE_TABLESELECTION_AB
-{
- HelpID = "extensions:TabPage:RID_PAGE_TABLESELECTION_AB";
- SVLook = TRUE ;
- Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ;
-
- FixedText FL_TOOMUCHTABLES
- {
- Pos = MAP_APPFONT ( BORDER_X, 9 ) ;
- Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 24 ) ;
- WordBreak = TRUE;
-
- Text [ en-US ] = "The external data source you have chosen contains more than one address book.\nPlease select the one you mainly want to work with:";
- };
-
- ListBox LB_TABLELIST
- {
- HelpID = "extensions:ListBox:RID_PAGE_TABLESELECTION_AB:LB_TABLELIST";
- Pos = MAP_APPFONT ( BORDER_X, 36 ) ;
- Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 50 ) ;
- SVLook = TRUE;
- Sort = TRUE;
- DropDown = FALSE;
- AutoHScroll = TRUE;
- Border = TRUE;
- };
-};
-
TabPage RID_PAGE_FINAL
{
HelpID = "extensions:TabPage:RID_PAGE_FINAL";
diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx
index 4b66b830dd7e..61ac27d8f1ce 100644
--- a/extensions/source/abpilot/tableselectionpage.cxx
+++ b/extensions/source/abpilot/tableselectionpage.cxx
@@ -33,14 +33,12 @@ namespace abp
TableSelectionPage::TableSelectionPage( OAddessBookSourcePilot* _pParent )
- :AddressBookSourcePage(_pParent, ModuleRes(RID_PAGE_TABLESELECTION_AB))
- ,m_aLabel ( this, ModuleRes( FL_TOOMUCHTABLES ) )
- ,m_aTableList ( this, ModuleRes( LB_TABLELIST ) )
+ :AddressBookSourcePage(_pParent, "SelectTablePage",
+ "modules/sabpilot/ui/selecttablepage.ui")
{
- FreeResource();
-
- m_aTableList.SetSelectHdl( LINK( this, TableSelectionPage, OnTableSelected ) );
- m_aTableList.SetDoubleClickHdl( LINK( this, TableSelectionPage, OnTableDoubleClicked ) );
+ get(m_pTableList, "table");
+ m_pTableList->SetSelectHdl( LINK( this, TableSelectionPage, OnTableSelected ) );
+ m_pTableList->SetDoubleClickHdl( LINK( this, TableSelectionPage, OnTableDoubleClicked ) );
}
@@ -48,7 +46,7 @@ namespace abp
{
AddressBookSourcePage::ActivatePage();
- m_aTableList.GrabFocus();
+ m_pTableList->GrabFocus();
}
@@ -64,7 +62,7 @@ namespace abp
const AddressSettings& rSettings = getSettings();
- m_aTableList.Clear();
+ m_pTableList->Clear();
// get the table names
const StringBag& aTableNames = getDialog()->getDataSource().getTableNames();
@@ -76,16 +74,16 @@ namespace abp
aTables != aTableNames.end();
++aTables
)
- m_aTableList.InsertEntry( *aTables );
+ m_pTableList->InsertEntry( *aTables );
// initially select the proper table
- m_aTableList.SelectEntry( rSettings.sSelectedTable );
+ m_pTableList->SelectEntry( rSettings.sSelectedTable );
}
IMPL_LINK( TableSelectionPage, OnTableDoubleClicked, void*, /*NOTINTERESTEDIN*/ )
{
- if ( 1 == m_aTableList.GetSelectEntryCount() )
+ if ( 1 == m_pTableList->GetSelectEntryCount() )
getDialog()->travelNext();
return 0L;
@@ -105,7 +103,7 @@ namespace abp
return false;
AddressSettings& rSettings = getSettings();
- rSettings.sSelectedTable = m_aTableList.GetSelectEntry();
+ rSettings.sSelectedTable = m_pTableList->GetSelectEntry();
return true;
}
@@ -114,7 +112,7 @@ namespace abp
bool TableSelectionPage::canAdvance() const
{
return AddressBookSourcePage::canAdvance()
- && ( 0 < m_aTableList.GetSelectEntryCount() );
+ && ( 0 < m_pTableList->GetSelectEntryCount() );
}
diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx
index bf201a3578cf..c9fcd755920d 100644
--- a/extensions/source/abpilot/tableselectionpage.hxx
+++ b/extensions/source/abpilot/tableselectionpage.hxx
@@ -34,8 +34,7 @@ namespace abp
class TableSelectionPage : public AddressBookSourcePage
{
protected:
- FixedText m_aLabel;
- ListBox m_aTableList;
+ ListBox* m_pTableList;
public:
TableSelectionPage( OAddessBookSourcePilot* _pParent );