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

convert TP_PREPARE to .ui

Change-Id: Iad0c94ffd08117f79cba5d5305f03c836ac6ada9
üst 81fb15d3
......@@ -27,6 +27,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/indexdesigndialog \
dbaccess/uiconfig/ui/joindialog \
dbaccess/uiconfig/ui/password \
dbaccess/uiconfig/ui/preparepage \
dbaccess/uiconfig/ui/queryfilterdialog \
dbaccess/uiconfig/ui/querypropertiesdialog \
dbaccess/uiconfig/ui/relationdialog \
......
......@@ -38,7 +38,6 @@
//= tab pages
#define TP_PREPARE ( RID_DBMM_TAPPAGE_START + 0 )
#define TP_SAVE_DBDOC_AS ( RID_DBMM_TAPPAGE_START + 1 )
#define TP_MIGRATE ( RID_DBMM_TAPPAGE_START + 2 )
#define TP_SUMMARY ( RID_DBMM_TAPPAGE_START + 3 )
......
......@@ -47,7 +47,6 @@
//... fixed texts .......................................................
#define FT_HEADER 1
#define FT_INTRODUCTION 2
#define FT_EXPLANATION 3
#define FT_SAVE_AS_LABEL 4
#define FT_START_MIGRATION 5
......
......@@ -51,55 +51,6 @@ ModalDialog DLG_MACRO_MIGRATION
};
};
//= PreparationPage
TabPage TP_PREPARE
{
HelpID = "dbaccess:TabPage:TP_PREPARE";
Pos = MAP_APPFONT( 40, 130 );
Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT );
Hide = TRUE;
FixedText FT_HEADER
{
Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN, TAB_PAGE_CONTENT_MARGIN );
Size = MAP_APPFONT( TAB_PAGE_WIDTH - 2 * TAB_PAGE_CONTENT_MARGIN, FIXED_TEXT_HEIGHT );
Text [ en-US ] = "Welcome to the Database Macro Migration Wizard";
};
FixedText FT_INTRODUCTION
{
Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN, CONTENT_POS_X );
Size = MAP_APPFONT( TAB_PAGE_WIDTH - 2 * TAB_PAGE_CONTENT_MARGIN,
TAB_PAGE_HEIGHT - CONTENT_POS_X - TAB_PAGE_CONTENT_MARGIN - ( 2 * FIXED_TEXT_HEIGHT - SPACING_UNRELATED ) );
WordBreak = TRUE;
Text [ en-US ] = "This wizard will guide you through the task of migrating your macros.\n\n"
"After you finished it, all macros which were formerly embedded into the forms and reports of "
"the current database document will have been moved to the document itself. In this course, "
"libraries will be renamed as needed.\n\n"
"If your forms and reports contain references to those macros, they will be adjusted, where "
"possible.\n\n"
"Before the migration can start, all forms, reports, queries and tables belonging to the document must be closed. "
"Press 'Next' to do so.";
};
FixedText FT_CLOSE_DOC_ERROR
{
Pos = MAP_APPFONT ( TAB_PAGE_CONTENT_MARGIN,
TAB_PAGE_HEIGHT - TAB_PAGE_CONTENT_MARGIN - ( 2 * FIXED_TEXT_HEIGHT - SPACING_UNRELATED ) );
Size = MAP_APPFONT( TAB_PAGE_WIDTH - 2 * TAB_PAGE_CONTENT_MARGIN,
2 * FIXED_TEXT_HEIGHT - SPACING_UNRELATED );
Text [ en-US ] = "Not all objects could be closed. Please close them manually, and re-start the wizard.";
hide = TRUE;
};
};
//= SaveDBDocPage
TabPage TP_SAVE_DBDOC_AS
......
......@@ -48,15 +48,22 @@ namespace dbmm
// MacroMigrationPage
MacroMigrationPage::MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes )
:MacroMigrationPage_Base( &_rParentDialog, _rRes )
,m_aHeader( this, MacroMigrationResId( FT_HEADER ) )
{
Font aFont( m_aHeader.GetFont() );
m_pHeader = new FixedText(this, MacroMigrationResId(FT_HEADER));
Font aFont( m_pHeader->GetFont() );
aFont.SetWeight( WEIGHT_BOLD );
m_aHeader.SetFont( aFont );
m_pHeader->SetFont( aFont );
}
MacroMigrationPage::MacroMigrationPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription)
: MacroMigrationPage_Base(pParent, rID, rUIXMLDescription)
, m_pHeader(0) //remove when upper ctor is removed
{
}
MacroMigrationPage::~MacroMigrationPage()
{
delete m_pHeader;
}
const MacroMigrationDialog& MacroMigrationPage::getDialog() const
......@@ -70,22 +77,20 @@ namespace dbmm
}
// PreparationPage
PreparationPage::PreparationPage( MacroMigrationDialog& _rParentDialog )
:MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_PREPARE ) )
,m_aIntroduction ( this, MacroMigrationResId( FT_INTRODUCTION ) )
,m_aCloseDocError( this, MacroMigrationResId( FT_CLOSE_DOC_ERROR ) )
PreparationPage::PreparationPage(Window *pParent)
: MacroMigrationPage(pParent, "PreparePage" ,"dbaccess/ui/preparepage.ui")
{
FreeResource();
get(m_pCloseDocError, "closedocerror");
}
void PreparationPage::showCloseDocsError( bool _bShow )
{
m_aCloseDocError.Show( _bShow );
m_pCloseDocError->Show( _bShow );
}
TabPage* PreparationPage::Create( ::svt::RoadmapWizard& _rParentDialog )
{
return new PreparationPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) );
return new PreparationPage(&_rParentDialog);
}
// SaveDBDocPage
......
......@@ -46,6 +46,7 @@ namespace dbmm
{
public:
MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes );
MacroMigrationPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription);
virtual ~MacroMigrationPage();
protected:
......@@ -53,23 +54,22 @@ namespace dbmm
MacroMigrationDialog& getDialog() ;
protected:
FixedText m_aHeader;
FixedText* m_pHeader;
};
// PreparationPage
class PreparationPage : public MacroMigrationPage
{
public:
PreparationPage( MacroMigrationDialog& _rParentDialog );
PreparationPage(Window *pParent);
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
public:
void showCloseDocsError( bool _bShow );
void showCloseDocsError(bool _bShow);
protected:
FixedText m_aIntroduction;
FixedText m_aCloseDocError;
FixedText* m_pCloseDocError;
};
// SaveDBDocPage
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkGrid" id="PreparePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="border_width">6</property>
<property name="row_spacing">24</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Welcome to the Database Macro Migration Wizard</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</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="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">This wizard will guide you through the task of migrating your macros.
After you finished it, all macros which were formerly embedded into the forms and reports of the current database document will have been moved to the document itself. In this course, libraries will be renamed as needed.
If your forms and reports contain references to those macros, they will be adjusted, where possible.
Before the migration can start, all forms, reports, queries and tables belonging to the document must be closed. Press 'Next' to do so.</property>
<property name="wrap">True</property>
<property name="max_width_chars">64</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="GtkLabel" id="closedocerror">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Not all objects could be closed. Please close them manually, and re-start the wizard.</property>
<property name="wrap">True</property>
<property name="max_width_chars">64</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>
</object>
</interface>
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