SafeModeDialog: Add link to user profile

Change-Id: I0096b3d7db51e28eb58c7209109c30b73b382478
Reviewed-on: https://gerrit.libreoffice.org/30448
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This commit is contained in:
Samuel Mehrbrodt
2016-10-31 16:20:47 +01:00
parent 1161de521e
commit 69de2b4772
5 changed files with 43 additions and 3 deletions

View File

@@ -2202,6 +2202,11 @@ namespace comphelper
deleteDirRecursively(maUserConfigWorkURL);
}
const OUString& BackupFileHelper::getUserProfileURL()
{
return maUserConfigBaseURL;
}
/////////////////// helpers ///////////////////////
const rtl::OUString BackupFileHelper::getPackURL()

View File

@@ -179,6 +179,9 @@ namespace comphelper
*/
static void tryResetUserProfile();
/** Return the profile url */
static const OUString& getUserProfileURL();
private:
// internal helper methods
static const rtl::OUString getPackURL();

View File

@@ -62,6 +62,7 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent)
get(mpCBResetWholeUserProfile, "check_reset_whole_userprofile");
get(mpBugLink, "linkbutton_bugs");
get(mpUserProfileLink, "linkbutton_profile");
mpBtnContinue->SetClickHdl(LINK(this, SafeModeDialog, BtnHdl));
mpBtnQuit->SetClickHdl(LINK(this, SafeModeDialog, BtnHdl));
@@ -115,6 +116,8 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent)
OUString sURL("http://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
"&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=safemode");
mpBugLink->SetURL(sURL);
mpUserProfileLink->SetURL(comphelper::BackupFileHelper::getUserProfileURL());
}
SafeModeDialog::~SafeModeDialog()
@@ -138,6 +141,7 @@ void SafeModeDialog::dispose()
mpCBResetWholeUserProfile.clear();
mpBugLink.clear();
mpUserProfileLink.clear();
Dialog::dispose();
}

View File

@@ -46,6 +46,7 @@ private:
VclPtr<CheckBox> mpCBResetWholeUserProfile;
VclPtr<FixedHyperlink> mpBugLink;
VclPtr<FixedHyperlink> mpUserProfileLink;
// local BackupFileHelper for handling possible restores
comphelper::BackupFileHelper maBackupFileHelper;

View File

@@ -225,15 +225,14 @@ The offered possible changes get more radical from top to bottom, so it is recom
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">If you experience problems that are not resolved by using the Safe Mode, visit the following link to get help or report a bug.
You can also include the relevant parts of your User Profile. Beware that it might contain personal data.</property>
<property name="label" translatable="yes">If you experience problems that are not resolved by using the Safe Mode, visit the following link to get help or report a bug.</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -256,6 +255,34 @@ You can also include the relevant parts of your User Profile. Beware that it mig
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">You can also include the relevant parts of your User Profile. Beware that it might contain personal data.
Your User Profile is located at:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLinkButton" id="linkbutton_profile">
<property name="label" translatable="yes">Show User Profile</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
<child type="label">