[X2Go-Commits] [x2goclient] 02/59: x2goutils.{cpp, h}: add new show_RichText_Generic_MsgBox() main function designed to replace the show_RichText_WarningMsgBox() function.
git-admin at x2go.org
git-admin at x2go.org
Wed Jun 3 03:10:40 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 91e14db4a61635f037811e7db29576be37b1eb4d
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Jun 3 00:17:04 2015 +0200
x2goutils.{cpp,h}: add new show_RichText_Generic_MsgBox() main function designed to replace the show_RichText_WarningMsgBox() function.
---
debian/changelog | 2 ++
src/x2goutils.cpp | 12 ++++++++++++
src/x2goutils.h | 2 ++
3 files changed, 16 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 57b84a3..a8c1b6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ x2goclient (4.0.4.1-0x2go1) UNRELEASED; urgency=low
to slotScDaemonStdOut() and slotScDaemonStdErr(). I will need
slotScDaemonError() later and the previous names were a bit of a
misnomer.
+ - x2goutils.{cpp,h}: add new show_RichText_Generic_MsgBox() main function
+ designed to replace the show_RichText_WarningMsgBox() function.
-- X2Go Release Manager <git-admin at x2go.org> Tue, 26 May 2015 21:42:09 +0200
diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp
index 533bfdd..21575fa 100644
--- a/src/x2goutils.cpp
+++ b/src/x2goutils.cpp
@@ -93,6 +93,18 @@ QString convert_to_rich_text (const QString &text, bool force) {
return (fixup_text);
}
+void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString &main_text, const QString &informative_text) {
+ QString fixup_main_text (convert_to_rich_text (main_text));
+ QString fixup_informative_text (convert_to_rich_text (informative_text, true));
+
+ QMessageBox msg_box (icon, QString ("X2Go Client"), fixup_main_text, QMessageBox::Ok);
+
+ msg_box.setTextFormat (Qt::RichText);
+ msg_box.setInformativeText (fixup_informative_text);
+ msg_box.setWindowModality (Qt::WindowModal);
+ msg_box.exec ();
+}
+
void show_RichText_WarningMsgBox (const QString &main_text, const QString &informative_text) {
QString fixup_main_text (convert_to_rich_text (main_text));
QString fixup_informative_text (convert_to_rich_text (informative_text, true));
diff --git a/src/x2goutils.h b/src/x2goutils.h
index b90ac50..02ec4b2 100644
--- a/src/x2goutils.h
+++ b/src/x2goutils.h
@@ -31,6 +31,8 @@ QString fixup_resource_URIs (const QString &res_path);
QString wrap_legacy_resource_URIs (const QString &res_path);
QString convert_to_rich_text (const QString &text, bool force = false);
+
+void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString &main_text, const QString &informative_text);
void show_RichText_WarningMsgBox (const QString &main_text, const QString &informative_text = "");
QString git_changelog_extract_commit_sha (const QString &gitlog);
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list