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

convert invoke admin page to .ui

Change-Id: I63eda1792b5bc749dd01a85732cac6047be1a522
üst 25106908
......@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,modules/sabpilot))
$(eval $(call gb_UIConfig_add_uifiles,modules/sabpilot,\
extensions/uiconfig/sabpilot/ui/datasourcepage \
extensions/uiconfig/sabpilot/ui/fieldassignpage \
extensions/uiconfig/sabpilot/ui/invokeadminpage \
extensions/uiconfig/sabpilot/ui/selecttablepage \
extensions/uiconfig/sabpilot/ui/selecttypepage \
))
......
......@@ -41,15 +41,6 @@
#define RID_DIALOG_END RID_DLG_ADDRESSBOOKSOURCEPILOT
// tab pages
#define RID_PAGE_ADMININVOKATION ( RID_PAGE_START + 1 )
// please adjust RID_PAGE_END (below) when adding new tab pages
#define RID_PAGE_END RID_PAGE_ADMININVOKATION
// strings
#define RID_STR_DEFAULT_NAME ( RID_STRING_START + 0 )
......@@ -103,9 +94,6 @@
#if RID_DIALOG_END > RID_ABP_END
#error "please adjust the resource id ranges!!"
#endif
#if RID_PAGE_END > RID_ABP_END
#error "please adjust the resource id ranges!!"
#endif
#if RID_STRING_END > RID_ABP_END
#error "please adjust the resource id ranges!!"
#endif
......@@ -126,11 +114,7 @@
// local resource ids
#define FL_SEPARATOR 1
#define FT_ADMINEXPLANATION 3
#define FT_NAME_EXPL 4
#define FT_ERROR 5
#define PB_INVOKE_ADMIN_DIALOG 1
#define STR_SELECT_ABTYPE 1
#define STR_INVOKE_ADMIN_DIALOG 2
......
......@@ -58,41 +58,6 @@ ModalDialog RID_DLG_ADDRESSBOOKSOURCEPILOT
};
};
TabPage RID_PAGE_ADMININVOKATION
{
HelpID = "extensions:TabPage:RID_PAGE_ADMININVOKATION";
SVLook = TRUE ;
Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ;
FixedText FT_ADMINEXPLANATION
{
Pos = MAP_APPFONT ( BORDER_X, 9 ) ;
Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 48 ) ;
WordBreak = TRUE;
Text [ en-US ] = "To set up the new data source, additional information is required.\n\nClick the following button to open another dialog in which you then enter the necessary information.";
};
PushButton PB_INVOKE_ADMIN_DIALOG
{
HelpID = "extensions:PushButton:RID_PAGE_ADMININVOKATION:PB_INVOKE_ADMIN_DIALOG";
Pos = MAP_APPFONT ( ( WINDOW_SIZE_X - BUTTON_SIZE_X ) / 2, 60 ) ;
Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ) ;
Text [ en-US ] = "Settings";
};
FixedText FT_ERROR
{
Pos = MAP_APPFONT ( BORDER_X, WINDOW_SIZE_Y - HEADER_SIZE_Y - 7 - 48 ) ;
Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 48 ) ;
WordBreak = TRUE;
Hide = TRUE;
Text [ en-US ] = "The connection to the data source could not be established.\nBefore you proceed, please check the settings made, or (on the previous page) choose another address data source type.";
};
};
ErrorBox RID_ERR_NEEDTYPESELECTION
{
Buttons = WB_OK;
......
......@@ -22,49 +22,38 @@
#include "admininvokationimpl.hxx"
#include "comphelper/processfactory.hxx"
namespace abp
{
//= AdminDialogInvokationPage
AdminDialogInvokationPage::AdminDialogInvokationPage( OAddessBookSourcePilot* _pParent )
:AddressBookSourcePage(_pParent, ModuleRes(RID_PAGE_ADMININVOKATION))
,m_aExplanation (this, ModuleRes(FT_ADMINEXPLANATION))
,m_aInvokeAdminDialog (this, ModuleRes(PB_INVOKE_ADMIN_DIALOG))
,m_aErrorMessage (this, ModuleRes(FT_ERROR))
,m_bSuccessfullyExecutedDialog(false)
: AddressBookSourcePage(_pParent, "InvokeAdminPage",
"modules/sabpilot/ui/invokeadminpage.ui")
, m_bSuccessfullyExecutedDialog(false)
{
FreeResource();
m_aInvokeAdminDialog.SetClickHdl( LINK(this, AdminDialogInvokationPage, OnInvokeAdminDialog) );
get(m_pInvokeAdminDialog, "settings");
get(m_pErrorMessage, "warning");
m_pInvokeAdminDialog->SetClickHdl( LINK(this, AdminDialogInvokationPage, OnInvokeAdminDialog) );
}
void AdminDialogInvokationPage::ActivatePage()
{
AddressBookSourcePage::ActivatePage();
m_aInvokeAdminDialog.GrabFocus();
m_pInvokeAdminDialog->GrabFocus();
}
void AdminDialogInvokationPage::implUpdateErrorMessage()
{
const bool bIsConnected = getDialog()->getDataSource().isConnected();
m_aErrorMessage.Show( !bIsConnected );
m_pErrorMessage->Show( !bIsConnected );
}
void AdminDialogInvokationPage::initializePage()
{
AddressBookSourcePage::initializePage();
m_aErrorMessage.Hide();
m_pErrorMessage->Hide();
// if we're entering this page, we assume we had no connection trial with this data source
}
void AdminDialogInvokationPage::implTryConnect()
{
getDialog()->connectToDataSource( true );
......@@ -80,13 +69,11 @@ namespace abp
getDialog()->travelNext();
}
bool AdminDialogInvokationPage::canAdvance() const
{
return AddressBookSourcePage::canAdvance() && getDialog()->getDataSource().isConnected();
}
IMPL_LINK( AdminDialogInvokationPage, OnInvokeAdminDialog, void*, /*NOTINTERESTEDIN*/ )
{
OAdminDialogInvokation aInvokation( getORB(), getDialog()->getDataSource().getDataSource(), getDialog() );
......@@ -99,8 +86,6 @@ namespace abp
return 0L;
}
} // namespace abp
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -25,17 +25,12 @@
namespace abp
{
//= AdminDialogInvokationPage
class AdminDialogInvokationPage : public AddressBookSourcePage
{
protected:
FixedText m_aExplanation;
PushButton m_aInvokeAdminDialog;
FixedText m_aErrorMessage;
PushButton* m_pInvokeAdminDialog;
FixedText* m_pErrorMessage;
bool m_bSuccessfullyExecutedDialog;
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkGrid" id="InvokeAdminPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">To set up the new data source, additional information is required.
Click the following button to open another dialog in which you then enter the necessary information.</property>
<property name="wrap">True</property>
<property name="max_width_chars">90</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="GtkButton" id="settings">
<property name="label" translatable="yes">Settings</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</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="warning">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">The connection to the data source could not be established.
Before you proceed, please check the settings made, or (on the previous page) choose another address data source type.</property>
<property name="wrap">True</property>
<property name="max_width_chars">90</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