qasim gui: Cleanup & moved constants in separate file.

git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1704 eaee96b3-f302-0410-b096-c6cfd47f7835
This commit is contained in:
Glenn Y. Rolland 2011-07-20 22:49:07 +00:00
parent 03b0168096
commit 6362d896db
3 changed files with 92 additions and 87 deletions

View file

@ -4,12 +4,12 @@ $DEBUG = true
$VERBOSE = true $VERBOSE = true
require 'pp' require 'pp'
require 'sshfs-mapper/config' require 'qasim/config'
require 'sshfs-mapper/map' require 'qasim/map'
module SshfsMapper module Qasim
class SshfsMapper class QasimCli
# #
# #
# #
@ -69,7 +69,7 @@ module SshfsMapper
end end
end end
app = SshfsMapper::SshfsMapper.new app = Qasim::Qasim.new
app.run app.run

View file

@ -18,9 +18,11 @@ end
module Qasim module Qasim
class QasimGui
NAME="Qasim"
VERSION="0.1" def initialize
end
def dbus_notify title, body, icon def dbus_notify title, body, icon
bus = Qt::DBusConnection.sessionBus bus = Qt::DBusConnection.sessionBus
@ -43,12 +45,12 @@ module Qasim
# "Sorry dude", 2, 5000 ) # "Sorry dude", 2, 5000 )
end end
def build_app def self.build_app
app = Qt::Application.new(ARGV) app = Qt::Application.new(ARGV)
si = Qt::SystemTrayIcon.new si = Qt::SystemTrayIcon.new
std_icon = Qt::Icon.new( File.join ICON_PATH, "qasim.svg" ) std_icon = Qt::Icon.new( File.join APP_ICON_PATH, "qasim.svg" )
alt_icon = Qt::Icon.new alt_icon = Qt::Icon.new
blinking = false blinking = false
@ -113,8 +115,9 @@ module Qasim
app.exec app.exec
end end
end
end end
include Qasim Qasim::QasimGui::build_app
Qasim::build_app

View file

@ -1,3 +1,5 @@
module Qasim module Qasim
ICON_PATH = "icons" APP_ICON_PATH = "icons"
APP_NAME="Qasim"
APP_VERSION="0.1"
end end