diff options
author | Andras Timar <atimar@suse.com> | 2013-03-07 21:31:46 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-03-07 21:36:46 +0100 |
commit | 4d1285166cbc2fe1acd18e53e056c21145b60be1 (patch) | |
tree | 527704d873797f05c14c4f3367b28319748351e4 /desktop | |
parent | f932a3f1195290f9aa37b593190bd4c6ac5fe2f6 (diff) |
fdo#34540 convert 'soffice --help' dialog on Windows to .ui
Change-Id: I4b3dc66534d1e0cfec371588840aa1c168e36f83
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/UI_deployment.mk | 1 | ||||
-rw-r--r-- | desktop/source/app/cmdlinehelp.cxx | 22 | ||||
-rw-r--r-- | desktop/source/app/cmdlinehelp.hxx | 9 | ||||
-rw-r--r-- | desktop/source/app/desktop.hrc | 8 | ||||
-rw-r--r-- | desktop/source/app/desktop.src | 42 | ||||
-rw-r--r-- | desktop/uiconfig/ui/cmdlinehelp.ui | 138 |
6 files changed, 153 insertions, 67 deletions
diff --git a/desktop/UI_deployment.mk b/desktop/UI_deployment.mk index 4aeb42c73d35..cf680891a625 100644 --- a/desktop/UI_deployment.mk +++ b/desktop/UI_deployment.mk @@ -10,6 +10,7 @@ $(eval $(call gb_UI_UI,desktop)) $(eval $(call gb_UI_add_uifiles,desktop,\ + desktop/uiconfig/ui/cmdlinehelp \ desktop/uiconfig/ui/extensionmanager \ )) diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx index 84a5159e8a39..0680804a1e08 100644 --- a/desktop/source/app/cmdlinehelp.cxx +++ b/desktop/source/app/cmdlinehelp.cxx @@ -167,10 +167,10 @@ namespace desktop CmdlineHelpDialog aDlg; String head = aHelpMessage_version; head.Append(aHelpMessage_head); - aDlg.m_ftHead.SetText(head); - aDlg.m_ftLeft.SetText(aHelpMessage_left); - aDlg.m_ftRight.SetText(aHelpMessage_right); - aDlg.m_ftBottom.SetText(aHelpMessage_bottom); + aDlg.m_pftHead->SetText(head); + aDlg.m_pftLeft->SetText(aHelpMessage_left); + aDlg.m_pftRight->SetText(aHelpMessage_right); + aDlg.m_pftBottom->SetText(aHelpMessage_bottom); aDlg.Execute(); #endif } @@ -184,21 +184,19 @@ namespace desktop #else // Just re-use the help dialog for now. CmdlineHelpDialog aDlg; - aDlg.m_ftHead.SetText(aVersionMsg); + aDlg.m_pftHead->SetText(aVersionMsg); aDlg.Execute(); #endif } #ifndef UNX CmdlineHelpDialog::CmdlineHelpDialog (void) - : ModalDialog( NULL, DesktopResId( DLG_CMDLINEHELP ) ) - , m_ftHead( this, DesktopResId( TXT_DLG_CMDLINEHELP_HEADER ) ) - , m_ftLeft( this, DesktopResId( TXT_DLG_CMDLINEHELP_LEFT ) ) - , m_ftRight( this, DesktopResId( TXT_DLG_CMDLINEHELP_RIGHT ) ) - , m_ftBottom( this, DesktopResId( TXT_DLG_CMDLINEHELP_BOTTOM ) ) - , m_btOk( this, DesktopResId( BTN_DLG_CMDLINEHELP_OK ) ) + : ModalDialog( NULL, "CmdLineHelp", "desktop/ui/cmdlinehelp.ui" ) { - FreeResource(); + get(m_pftHead, "header"); + get(m_pftLeft, "left"); + get(m_pftRight, "right"); + get(m_pftBottom, "bottom"); } #endif } diff --git a/desktop/source/app/cmdlinehelp.hxx b/desktop/source/app/cmdlinehelp.hxx index f7c7dcd545fc..15dafb653c6c 100644 --- a/desktop/source/app/cmdlinehelp.hxx +++ b/desktop/source/app/cmdlinehelp.hxx @@ -31,11 +31,10 @@ namespace desktop public: CmdlineHelpDialog ( void ); - FixedText m_ftHead; - FixedText m_ftLeft; - FixedText m_ftRight; - FixedText m_ftBottom; - OKButton m_btOk; + FixedText* m_pftHead; + FixedText* m_pftLeft; + FixedText* m_pftRight; + FixedText* m_pftBottom; }; #endif } diff --git a/desktop/source/app/desktop.hrc b/desktop/source/app/desktop.hrc index 7321fc659352..f820560c30d2 100644 --- a/desktop/source/app/desktop.hrc +++ b/desktop/source/app/desktop.hrc @@ -27,14 +27,6 @@ #define QBX_USERDATALOCKED (RID_DESKTOP_DIALOG_START+100) -#define DLG_CMDLINEHELP (RID_DESKTOP_DIALOG_START+101) -#define TXT_DLG_CMDLINEHELP_HEADER (RID_DESKTOP_DIALOG_START+102) -#define TXT_DLG_CMDLINEHELP_LEFT (RID_DESKTOP_DIALOG_START+103) -#define TXT_DLG_CMDLINEHELP_RIGHT (RID_DESKTOP_DIALOG_START+104) -#define TXT_DLG_CMDLINEHELP_BOTTOM (RID_DESKTOP_DIALOG_START+105) -#define BTN_DLG_CMDLINEHELP_OK (RID_DESKTOP_DIALOG_START+106) - - #define EBX_ERR_PRINTDISABLED (RID_DESKTOP_DIALOG_START+190) #define STR_RECOVER_QUERY (RID_DESKTOP_STRING_START+0) diff --git a/desktop/source/app/desktop.src b/desktop/source/app/desktop.src index 35d56c944a68..3c1356186249 100644 --- a/desktop/source/app/desktop.src +++ b/desktop/source/app/desktop.src @@ -141,48 +141,6 @@ String STR_TITLE_USERDATALOCKED Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION"; }; -ModalDialog DLG_CMDLINEHELP -{ - HelpID = "desktop:ModalDialog:DLG_CMDLINEHELP"; - Text [ en-US ] = "Help Message..."; - Size = MAP_APPFONT(250, 365); - Border = True; - SVLook = True; - Moveable = True; - - FixedText TXT_DLG_CMDLINEHELP_HEADER - { - Size = MAP_APPFONT(240, 50); - Pos = MAP_APPFONT(5, 5); - Text = "HEADER"; - }; - FixedText TXT_DLG_CMDLINEHELP_LEFT - { - Size = MAP_APPFONT(50, 150); - Pos = MAP_APPFONT(5, 50); - Text = "LEFT"; - }; - FixedText TXT_DLG_CMDLINEHELP_RIGHT - { - Size = MAP_APPFONT(190, 150); - Pos = MAP_APPFONT(60, 50); - Text = "RIGHT"; - }; - FixedText TXT_DLG_CMDLINEHELP_BOTTOM - { - Size = MAP_APPFONT(240, 145); - Pos = MAP_APPFONT(5, 200); - Text = "BOTTOM"; - }; - OKButton BTN_DLG_CMDLINEHELP_OK - { - Size = MAP_APPFONT ( 50 , 14 ) ; - Pos = MAP_APPFONT(95, 345); - TabStop = TRUE ; - DefButton = TRUE ; - }; -}; - ErrorBox EBX_ERR_PRINTDISABLED { Buttons = WB_OK ; diff --git a/desktop/uiconfig/ui/cmdlinehelp.ui b/desktop/uiconfig/ui/cmdlinehelp.ui new file mode 100644 index 000000000000..a21e9ba24e21 --- /dev/null +++ b/desktop/uiconfig/ui/cmdlinehelp.ui @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="CmdLineHelp"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Help Message</property> + <property name="destroy_with_parent">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</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="xalign">0</property> + <property name="xpad">10</property> + <property name="label">HEADER</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <child> + <object class="GtkLabel" id="left"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="xpad">10</property> + <property name="label">LEFT</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="GtkLabel" id="right"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="xpad">10</property> + <property name="label">RIGHT</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> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="bottom"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="xpad">10</property> + <property name="label">BOTTOM</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="layout_style">center</property> + <child> + <object class="GtkButton" id="button1"> + <property name="label">gtk-close</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="halign">center</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">button1</action-widget> + </action-widgets> + </object> +</interface> |