Kaydet (Commit) 910638a5 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert select type address book page to .ui

Change-Id: I94c0ed3385e64f854875f62c32adaa066d3b1ead
üst 00d001c6
......@@ -21,6 +21,7 @@ $(eval $(call gb_Module_add_l10n_targets,extensions,\
AllLangResTarget_abp \
AllLangResTarget_scn \
AllLangResTarget_upd \
UIConfig_sabpilot \
))
ifneq ($(filter-out IOS ANDROID,$(OS)),)
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UIConfig_UIConfig,modules/sabpilot))
$(eval $(call gb_UIConfig_add_uifiles,modules/sabpilot,\
extensions/uiconfig/sabpilot/ui/selecttypepage \
))
# vim: set noet sw=4 ts=4:
......@@ -45,7 +45,6 @@
// tab pages
#define RID_PAGE_SELECTABTYPE ( RID_PAGE_START + 0 )
#define RID_PAGE_ADMININVOKATION ( RID_PAGE_START + 1 )
#define RID_PAGE_TABLESELECTION_AB ( RID_PAGE_START + 2 )
#define RID_PAGE_FIELDMAPPING ( RID_PAGE_START + 3 )
......@@ -148,19 +147,6 @@
#define FT_LOCATION 11
#define RB_MORK 1
#define RB_THUNDERBIRD 2
#define RB_EVOLUTION 3
#define RB_KAB 4
#define RB_MACAB 5
#define RB_LDAP 6
#define RB_OUTLOOK 7
#define RB_OUTLOOKEXPRESS 8
#define RB_OTHER 9
#define RB_EVOLUTION_GROUPWISE 10
#define RB_EVOLUTION_LDAP 11
#define ET_DATASOURCENAME 1
......
......@@ -58,99 +58,6 @@ ModalDialog RID_DLG_ADDRESSBOOKSOURCEPILOT
};
};
TabPage RID_PAGE_SELECTABTYPE
{
HelpID = "extensions:TabPage:RID_PAGE_SELECTABTYPE";
SVLook = TRUE ;
Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ;
FixedText FT_TYPE_HINTS
{
Pos = MAP_APPFONT ( BORDER_X, 9 ) ;
Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 40 ) ;
WordBreak = TRUE;
Text [ en-US ] = "%PRODUCTNAME lets you access address data already present in your system. To do this, a %PRODUCTNAME data source will be created in which your address data is available in tabular form.\n\nThis wizard helps you create the data source.";
};
FixedLine FL_TYPE
{
Pos = MAP_APPFONT ( 7, 56 ) ;
Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 8 ) ;
Text [ en-US ] = "Please select the type of your external address book:";
};
RadioButton RB_EVOLUTION
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_EVOLUTION";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Evolution";
};
RadioButton RB_EVOLUTION_GROUPWISE
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_EVOLUTION_GROUPWISE";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Groupwise";
};
RadioButton RB_EVOLUTION_LDAP
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_EVOLUTION_LDAP";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Evolution LDAP";
};
RadioButton RB_MORK
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_MORK";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Mozilla / Netscape";
};
RadioButton RB_THUNDERBIRD
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_THUNDERBIRD";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Thunderbird/Icedove";
};
RadioButton RB_KAB
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_KAB";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "KDE address book";
};
RadioButton RB_MACAB
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_MACAB";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Mac OS X address book";
};
RadioButton RB_LDAP
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_LDAP";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "LDAP address data";
};
RadioButton RB_OUTLOOK
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_OUTLOOK";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Outlook address book";
};
RadioButton RB_OUTLOOKEXPRESS
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_OUTLOOKEXPRESS";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Windows system address book";
};
RadioButton RB_OTHER
{
HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_OTHER";
Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ;
Text [ en-US ] = "Other external data source";
};
};
TabPage RID_PAGE_ADMININVOKATION
{
HelpID = "extensions:TabPage:RID_PAGE_ADMININVOKATION";
......
......@@ -32,26 +32,20 @@ namespace abp
// TypeSelectionPage
TypeSelectionPage::TypeSelectionPage( OAddessBookSourcePilot* _pParent )
:AddressBookSourcePage(_pParent, ModuleRes(RID_PAGE_SELECTABTYPE))
,m_aHint (this, ModuleRes(FT_TYPE_HINTS))
,m_aTypeSep (this, ModuleRes(FL_TYPE))
,m_aEvolution (this, ModuleRes(RB_EVOLUTION))
,m_aEvolutionGroupwise (this, ModuleRes(RB_EVOLUTION_GROUPWISE))
,m_aEvolutionLdap (this, ModuleRes(RB_EVOLUTION_LDAP))
,m_aMORK (this, ModuleRes(RB_MORK))
,m_aThunderbird (this, ModuleRes(RB_THUNDERBIRD))
,m_aKab (this, ModuleRes(RB_KAB))
,m_aMacab (this, ModuleRes(RB_MACAB))
,m_aLDAP (this, ModuleRes(RB_LDAP))
,m_aOutlook (this, ModuleRes(RB_OUTLOOK))
,m_aOE (this, ModuleRes(RB_OUTLOOKEXPRESS))
,m_aOther (this, ModuleRes(RB_OTHER))
: AddressBookSourcePage(_pParent, "SelectTypePage",
"modules/sabpilot/ui/selecttypepage.ui")
{
FreeResource();
Point aTopLeft( LogicToPixel( Point( 15, 68 ), MAP_APPFONT ) );
Size aItemSize( LogicToPixel( Size( 0, 8 ), MAP_APPFONT ) );
aItemSize.Width() = GetOutputSizePixel().Width() - 30;
get(m_pEvolution, "evolution");
get(m_pEvolutionGroupwise, "groupwise");
get(m_pEvolutionLdap, "evoldap");
get(m_pMORK, "firefox");
get(m_pThunderbird, "thunderbird");
get(m_pKab, "kde");
get(m_pMacab, "macosx");
get(m_pLDAP, "ldap");
get(m_pOutlook, "outlook");
get(m_pOE, "windows");
get(m_pOther, "other");
//TODO: For now, try to keep offering the same choices like before the
// Mozilla/MORK cleanup, even if the status of what driver actually
......@@ -127,25 +121,19 @@ namespace abp
#endif
// Items are displayed in list order
m_aAllTypes.push_back( ButtonItem( &m_aEvolution, AST_EVOLUTION, bHaveEvolution ) );
m_aAllTypes.push_back( ButtonItem( &m_aEvolutionGroupwise, AST_EVOLUTION_GROUPWISE, bHaveEvolution ) );
m_aAllTypes.push_back( ButtonItem( &m_aEvolutionLdap, AST_EVOLUTION_LDAP, bHaveEvolution ) );
m_aAllTypes.push_back( ButtonItem( &m_aMORK, AST_MORK, bWithMozilla || bWithMork) );
m_aAllTypes.push_back( ButtonItem( &m_aThunderbird, AST_THUNDERBIRD, bWithMozilla || bWithMork) );
m_aAllTypes.push_back( ButtonItem( &m_aKab, AST_KAB, bHaveKab ) );
m_aAllTypes.push_back( ButtonItem( &m_aMacab, AST_MACAB, bHaveMacab ) );
m_aAllTypes.push_back( ButtonItem( &m_aLDAP, AST_LDAP, bWithMozilla ) );
m_aAllTypes.push_back( ButtonItem( &m_aOutlook, AST_OUTLOOK, bWithMozilla ) );
m_aAllTypes.push_back( ButtonItem( &m_aOE, AST_OE, bWithMozilla ) );
m_aAllTypes.push_back( ButtonItem( &m_aOther, AST_OTHER, true ) );
m_aAllTypes.push_back( ButtonItem( m_pEvolution, AST_EVOLUTION, bHaveEvolution ) );
m_aAllTypes.push_back( ButtonItem( m_pEvolutionGroupwise, AST_EVOLUTION_GROUPWISE, bHaveEvolution ) );
m_aAllTypes.push_back( ButtonItem( m_pEvolutionLdap, AST_EVOLUTION_LDAP, bHaveEvolution ) );
m_aAllTypes.push_back( ButtonItem( m_pMORK, AST_MORK, bWithMozilla || bWithMork) );
m_aAllTypes.push_back( ButtonItem( m_pThunderbird, AST_THUNDERBIRD, bWithMozilla || bWithMork) );
m_aAllTypes.push_back( ButtonItem( m_pKab, AST_KAB, bHaveKab ) );
m_aAllTypes.push_back( ButtonItem( m_pMacab, AST_MACAB, bHaveMacab ) );
m_aAllTypes.push_back( ButtonItem( m_pLDAP, AST_LDAP, bWithMozilla ) );
m_aAllTypes.push_back( ButtonItem( m_pOutlook, AST_OUTLOOK, bWithMozilla ) );
m_aAllTypes.push_back( ButtonItem( m_pOE, AST_OE, bWithMozilla ) );
m_aAllTypes.push_back( ButtonItem( m_pOther, AST_OTHER, true ) );
Link aTypeSelectionHandler = LINK(this, TypeSelectionPage, OnTypeSelected );
const Size aSpacing( LogicToPixel( Size( 0, 3 ), MAP_APPFONT ) );
if ( ! m_aAllTypes.empty() )
{
ButtonItem aItem = m_aAllTypes[0];
aItem.m_pItem->SetStyle( aItem.m_pItem->GetStyle() | WB_GROUP );
}
for ( ::std::vector< ButtonItem >::const_iterator loop = m_aAllTypes.begin();
loop != m_aAllTypes.end(); ++loop )
{
......@@ -154,8 +142,6 @@ namespace abp
aItem.m_pItem->Hide();
else
{
aItem.m_pItem->SetPosPixel( aTopLeft );
aTopLeft.Y() += aItemSize.Height() + aSpacing.Height();
aItem.m_pItem->SetClickHdl( aTypeSelectionHandler );
aItem.m_pItem->Show();
}
......
......@@ -35,19 +35,17 @@ namespace abp
class TypeSelectionPage : public AddressBookSourcePage
{
protected:
FixedText m_aHint;
FixedLine m_aTypeSep;
RadioButton m_aEvolution;
RadioButton m_aEvolutionGroupwise;
RadioButton m_aEvolutionLdap;
RadioButton m_aMORK;
RadioButton m_aThunderbird;
RadioButton m_aKab;
RadioButton m_aMacab;
RadioButton m_aLDAP;
RadioButton m_aOutlook;
RadioButton m_aOE;
RadioButton m_aOther;
RadioButton* m_pEvolution;
RadioButton* m_pEvolutionGroupwise;
RadioButton* m_pEvolutionLdap;
RadioButton* m_pMORK;
RadioButton* m_pThunderbird;
RadioButton* m_pKab;
RadioButton* m_pMacab;
RadioButton* m_pLDAP;
RadioButton* m_pOutlook;
RadioButton* m_pOE;
RadioButton* m_pOther;
struct ButtonItem {
RadioButton *m_pItem;
......
This diff is collapsed.
......@@ -498,6 +498,7 @@ UI_FILELIST(dbtdata, "UIConfig/modules/dbtdata.filelist")
#endif
UI_FILELIST(desktop, "UIConfig/desktop.filelist")
UI_FILELIST(filter, "UIConfig/filter.filelist")
UI_FILELIST(sabpilot, "UIConfig/modules/sabpilot.filelist")
#ifdef DBCONNECTIVITY
UI_FILELIST(sbibliography, "UIConfig/modules/sbibliography.filelist")
UI_FILELIST(spropctrlr, "UIConfig/modules/spropctrlr.filelist")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment