summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-12-04 00:33:12 +0100
committerJan Holesovsky <kendy@suse.cz>2012-12-04 16:23:14 +0100
commit23c3f4a72cfbcc59d39be7b9832ef6439f440d29 (patch)
tree064b01de066fae9f7a43872a47a0ab949cd01fb0 /cui
parent03f04a9ee298ad968d00910f0f96a0a834ec7cda (diff)
Personas: Make the [Visit Firefox Personas] button work.
Change-Id: I024bcd527b643076642a233d8e71003c006b5c15
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/personalization.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 25cc8d04c46a..3f0330a3e82c 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -14,6 +14,8 @@
#include <vcl/msgbox.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
@@ -31,11 +33,27 @@ class SelectPersonaDialog : public ModalDialog
{
public:
SelectPersonaDialog( Window *pParent );
+
+private:
+ /// Handle the [Visit Firefox Personas] button
+ DECL_LINK( VisitPersonas, PushButton* );
};
SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
: ModalDialog( pParent, "SelectPersonaDialog", "cui/ui/select_persona_dialog.ui" )
{
+ PushButton *pButton;
+ get( pButton, "visit_personas" );
+ pButton->SetClickHdl( LINK( this, SelectPersonaDialog, VisitPersonas ) );
+}
+
+IMPL_LINK( SelectPersonaDialog, VisitPersonas, PushButton*, /*pButton*/ )
+{
+ uno::Reference< system::XSystemShellExecute > xSystemShell( system::SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) );
+
+ xSystemShell->execute( "http://www.getpersonas.com", OUString(), system::SystemShellExecuteFlags::URIS_ONLY );
+
+ return 0;
}
SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const SfxItemSet &rSet )