[X2Go-Commits] [x2goclient] 01/12: x2goutils.{cpp, h}: add new font_is_monospaced() helper.

git-admin at x2go.org git-admin at x2go.org
Fri Apr 24 01:32:17 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit 4fd874a406d8853d170165590f8aa1d5c8c990b3
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Apr 23 23:24:24 2015 +0200

    x2goutils.{cpp,h}: add new font_is_monospaced() helper.
---
 debian/changelog  |    1 +
 src/x2goutils.cpp |    5 +++++
 src/x2goutils.h   |    2 ++
 3 files changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a305ee3..1be98b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -298,6 +298,7 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low
     - helpdialog.cpp: change to monospaced font.
     - helpdialog.cpp: use QT_VERSION macro to select either a monospaced or
       typewriter font (Qt < 4.7.0 only supports TypeWriter.)
+    - x2goutils.{cpp,h}: add new font_is_monospaced() helper.
 
   [ Fernando Pedemonte ]
   * New upstream release (4.0.4.0):
diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp
index 7bf3d00..d5c6141 100644
--- a/src/x2goutils.cpp
+++ b/src/x2goutils.cpp
@@ -140,3 +140,8 @@ QString git_changelog_extract_commit_sha (const QString &gitlog) {
 
   return (ret);
 }
+
+bool font_is_monospaced (const QFont &font) {
+  const QFontInfo font_info (font);
+  return (font_info.fixedPitch ());
+}
diff --git a/src/x2goutils.h b/src/x2goutils.h
index d87a997..e438d0f 100644
--- a/src/x2goutils.h
+++ b/src/x2goutils.h
@@ -30,4 +30,6 @@ QString convert_to_rich_text (const QString &text, bool force = false);
 void show_RichText_WarningMsgBox (const QString &main_text, const QString &informative_text = "");
 QString git_changelog_extract_commit_sha (const QString &gitlog);
 
+bool font_is_monospaced (const QFont &font);
+
 #endif /* !defined (X2GOUTILS_H) */

--
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