sshfs-mapper: Added tooltip message.
git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1687 eaee96b3-f302-0410-b096-c6cfd47f7835
This commit is contained in:
parent
4af59316c5
commit
7ca1065d8d
1 changed files with 72 additions and 58 deletions
|
@ -2,10 +2,17 @@
|
|||
|
||||
require 'Qt4'
|
||||
|
||||
# QaSiM // Qt Sshfs Mapper
|
||||
|
||||
VERSION="0.1"
|
||||
|
||||
def _ str
|
||||
Qt::Object.tr(str)
|
||||
end
|
||||
|
||||
|
||||
def build_app
|
||||
|
||||
app = Qt::Application.new(ARGV)
|
||||
si = Qt::SystemTrayIcon.new
|
||||
|
||||
|
@ -15,6 +22,7 @@ blinking = false
|
|||
|
||||
si.icon = std_icon
|
||||
si.show
|
||||
si.setToolTip("Qasim v%s" % VERSION);
|
||||
|
||||
Qt::Timer.new(app) do |timer|
|
||||
timer.connect(SIGNAL('timeout()')) do
|
||||
|
@ -28,7 +36,9 @@ menu = Qt::Menu.new
|
|||
['Diades', 'Daneel', 'Dolos'].each do |name|
|
||||
itemx = Qt::Action.new(name, menu)
|
||||
itemx.setCheckable true;
|
||||
itemx.connect(SIGNAL(:triggered)) { puts itemx.checked }
|
||||
itemx.connect(SIGNAL(:triggered)) do
|
||||
puts "%s => %s" % [name, itemx.checked ]
|
||||
end
|
||||
menu.addAction itemx;
|
||||
end
|
||||
|
||||
|
@ -66,3 +76,7 @@ si.connect(SIGNAL('activated(QSystemTrayIcon::ActivationReason)')) do |reason|
|
|||
end
|
||||
|
||||
app.exec
|
||||
end
|
||||
|
||||
build_app
|
||||
|
||||
|
|
Loading…
Reference in a new issue