From 0d118ad844e68830b18e55f7ceede446df848183 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Thu, 2 Aug 2012 12:19:11 +0200 Subject: [PATCH] Correctly set up the about dialog. --- lib/qasim/constants.rb | 1 + lib/qasim/ui/about.rb | 13 ++++++++++++- lib/qasim/ui/about.ui | 29 +++++++++++++++-------------- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/lib/qasim/constants.rb b/lib/qasim/constants.rb index 7fa6451..22ab788 100644 --- a/lib/qasim/constants.rb +++ b/lib/qasim/constants.rb @@ -2,6 +2,7 @@ module Qasim APP_ICON_PATH = File.join QASIM_DATA_DIR, "icons" APP_NAME = "Qasim" APP_VERSION = "0.1" + APP_DATE = "2012-08-02" APP_SYSCONFIG_DIR = "/etc/qasim/maps.d" diff --git a/lib/qasim/ui/about.rb b/lib/qasim/ui/about.rb index c23d497..3bbbe52 100644 --- a/lib/qasim/ui/about.rb +++ b/lib/qasim/ui/about.rb @@ -8,7 +8,18 @@ module Qasim ; module Ui u = Ui_About.new u.setup_ui(self) - #FIXME: attach events to close + #FIXME: attach button events to dialog.close + + # Change title according to current version + title_str = "Qasim v%s (%s)" % [ Qasim::APP_VERSION, Qasim::APP_DATE ] + u.title_label.text = Qt::Application.translate( + "About", + "

#{title_str}" + + "

", + nil, + Qt::Application::UnicodeUTF8 + ) + #FIXME: set first tab end end diff --git a/lib/qasim/ui/about.ui b/lib/qasim/ui/about.ui index c78cfd6..e707505 100644 --- a/lib/qasim/ui/about.ui +++ b/lib/qasim/ui/about.ui @@ -18,21 +18,21 @@ - + - + - + - :/qasim/icons/qasim.svg + :/qasim/qasim-icon - + 0 @@ -61,7 +61,7 @@ - 3 + 0 @@ -69,7 +69,7 @@ - + 0 @@ -83,7 +83,7 @@ - <html><head/><body><p align="center">A cross playform SSHFS Mapping tool.</p><p align="center">Copyright © 2011-2012 The Qasim Team</p><p align="center"><br/></p><p align="center"><a href="http://github.com/Glenux/Qasim"><span style=" text-decoration: underline; color:#0057ae;">http://github.com/Glenux/Qasim</span></a></p></body></html> + <html><head/><body><p align="center">A cross platform SSHFS Mapping tool.</p><p align="center">Copyright © 2011-2012 The Qasim Team</p><p align="center"><br/></p><p align="center"><a href="http://github.com/Glenux/Qasim"><span style=" text-decoration: underline; color:#0057ae;">http://github.com/Glenux/Qasim</span></a></p></body></html> false @@ -101,7 +101,7 @@ - + 0 @@ -127,17 +127,17 @@ p, li { white-space: pre-wrap; } - + - + License - + 300 @@ -162,7 +162,7 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal @@ -174,11 +174,12 @@ p, li { white-space: pre-wrap; } + - buttonBox + button_box accepted() About close()