diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 13:55:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 16:45:26 +0100 |
commit | e932500e2342752106140c642203f97b592c7a9c (patch) | |
tree | 8d9209bc90371017e8f0bfa78ff3304156e67219 /desktop | |
parent | db83365b3b0f0e50148af30af67e01e985e21295 (diff) |
convert RID_QUERYBOX_INSTALL_FOR_ALL with custom buttons to .ui
Change-Id: If7ac491cb6f256af22b48f681590adb1484350d0
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/UIConfig_deployment.mk | 1 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui.hrc | 3 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog.src | 10 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 21 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.src | 7 | ||||
-rw-r--r-- | desktop/uiconfig/ui/installforalldialog.ui | 83 |
6 files changed, 87 insertions, 38 deletions
diff --git a/desktop/UIConfig_deployment.mk b/desktop/UIConfig_deployment.mk index 4bc03a552436..d5cb72c10910 100644 --- a/desktop/UIConfig_deployment.mk +++ b/desktop/UIConfig_deployment.mk @@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,desktop,\ desktop/uiconfig/ui/cmdlinehelp \ desktop/uiconfig/ui/dependenciesdialog \ desktop/uiconfig/ui/extensionmanager \ + desktop/uiconfig/ui/installforalldialog \ desktop/uiconfig/ui/licensedialog \ desktop/uiconfig/ui/showlicensedialog \ desktop/uiconfig/ui/updatedialog \ diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 134df341bd21..a9e469dc67d9 100644 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -23,7 +23,6 @@ #include "deployment.hrc" #include "helpid.hrc" -#define RID_QUERYBOX_INSTALL_FOR_ALL (RID_DEPLOYMENT_GUI_START + 2) #define RID_WARNINGBOX_VERSION_LESS (RID_DEPLOYMENT_GUI_START + 3) #define RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES (RID_DEPLOYMENT_GUI_START + 4) #define RID_WARNINGBOX_VERSION_EQUAL (RID_DEPLOYMENT_GUI_START + 5) @@ -77,8 +76,6 @@ #define RID_STR_DISABLING_PACKAGES (RID_DEPLOYMENT_GUI_START+88) #define RID_STR_ACCEPT_LICENSE (RID_DEPLOYMENT_GUI_START+89) -#define RID_STR_INSTALL_FOR_ALL (RID_DEPLOYMENT_GUI_START+90) -#define RID_STR_INSTALL_FOR_ME (RID_DEPLOYMENT_GUI_START+91) #define RID_STR_ERROR_UNKNOWN_STATUS (RID_DEPLOYMENT_GUI_START+92) #define RID_STR_CLOSE_BTN (RID_DEPLOYMENT_GUI_START+93) #define RID_STR_EXIT_BTN (RID_DEPLOYMENT_GUI_START+94) diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src index caa23d282f9d..e328acee0de7 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog.src +++ b/desktop/source/deployment/gui/dp_gui_dialog.src @@ -74,16 +74,6 @@ String RID_STR_ACCEPT_LICENSE Text [ en-US ] = "Accept license for %EXTENSION_NAME"; }; -String RID_STR_INSTALL_FOR_ALL -{ - Text [ en-US ] = "~For all users"; -}; - -String RID_STR_INSTALL_FOR_ME -{ - Text [ en-US ] = "~Only for me"; -}; - String RID_STR_ERROR_UNKNOWN_STATUS { Text [ en-US ] = "Error: The status of this extension is unknown"; diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 385614056750..37769f9b93e9 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -643,35 +643,20 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const return ( RET_OK == aInfo.Execute() ); } - bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const { const SolarMutexGuard guard; - QueryBox aQuery( m_pVCLWindow, getResId( RID_QUERYBOX_INSTALL_FOR_ALL ) ); - - OUString sMsgText(aQuery.GetMessText()); - sMsgText = sMsgText.replaceAll( - "%PRODUCTNAME", utl::ConfigManager::getProductName()); - aQuery.SetMessText(sMsgText); - - sal_uInt16 nYesBtnID = aQuery.GetButtonId( 0 ); - sal_uInt16 nNoBtnID = aQuery.GetButtonId( 1 ); - - if ( nYesBtnID != BUTTONDIALOG_BUTTON_NOTFOUND ) - aQuery.SetButtonText( nYesBtnID, getResourceString( RID_STR_INSTALL_FOR_ME ) ); - if ( nNoBtnID != BUTTONDIALOG_BUTTON_NOTFOUND ) - aQuery.SetButtonText( nNoBtnID, getResourceString( RID_STR_INSTALL_FOR_ALL ) ); + MessageDialog aQuery(m_pVCLWindow, "InstallForAllDialog", + "desktop/ui/installforalldialog.ui"); short nRet = aQuery.Execute(); - - if ( nRet == RET_CANCEL ) + if (nRet == RET_CANCEL) return false; bInstallForAll = ( nRet == RET_NO ); return true; } - void DialogHelper::PostUserEvent( const Link& rLink, void* pCaller ) { if ( m_nEventID ) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src index ca6e0af18ee7..a399c22146d5 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.src +++ b/desktop/source/deployment/gui/dp_gui_dialog2.src @@ -40,11 +40,4 @@ Image RID_IMG_EXTENSION ImageBitmap = Bitmap { File = "extension_32.png"; }; }; -QueryBox RID_QUERYBOX_INSTALL_FOR_ALL -{ - Buttons = WB_YES_NO_CANCEL; - DefButton = WB_DEF_YES; - Message[en-US] = "Make sure that no further users are working with the same %PRODUCTNAME, when installing an extension for all users in a multi user environment.\n\nFor whom do you want to install the extension?\n"; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/uiconfig/ui/installforalldialog.ui b/desktop/uiconfig/ui/installforalldialog.ui new file mode 100644 index 000000000000..99dbaf236b8e --- /dev/null +++ b/desktop/uiconfig/ui/installforalldialog.ui @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkMessageDialog" id="InstallForAllDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">question</property> + <property name="text" translatable="yes">For whom do you want to install the extension?</property> + <property name="secondary_text" translatable="yes">Make sure that no further users are working with the same %PRODUCTNAME, when installing an extension for all users in a multi user environment.</property> + <child internal-child="vbox"> + <object class="GtkBox" id="messagedialog-vbox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">24</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="messagedialog-action_area"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="no"> + <property name="label" translatable="yes">_For all users</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="yes"> + <property name="label" translatable="yes">_Only for me</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="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</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="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="3">no</action-widget> + <action-widget response="2">yes</action-widget> + <action-widget response="0">cancel</action-widget> + </action-widgets> + </object> +</interface> |