sshfs-mapper qasim-gui: Use real map list from configuration.
git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1706 eaee96b3-f302-0410-b096-c6cfd47f7835
This commit is contained in:
parent
e7e1abb8be
commit
5188ba21bb
3 changed files with 7 additions and 3 deletions
|
@ -22,6 +22,9 @@ module Qasim
|
||||||
|
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
|
@config = Config.new
|
||||||
|
@config.parse_cmd_line ARGV
|
||||||
|
@config.parse_file
|
||||||
end
|
end
|
||||||
|
|
||||||
def dbus_notify title, body, icon
|
def dbus_notify title, body, icon
|
||||||
|
@ -70,7 +73,8 @@ module Qasim
|
||||||
|
|
||||||
menu = Qt::Menu.new
|
menu = Qt::Menu.new
|
||||||
|
|
||||||
['Diades', 'Daneel', 'Dolos'].each do |name|
|
@config.maps.each do |map|
|
||||||
|
name = (File.basename map.path).gsub(/\.map$/,'')
|
||||||
itemx = Qt::Action.new(name, menu)
|
itemx = Qt::Action.new(name, menu)
|
||||||
itemx.setCheckable true;
|
itemx.setCheckable true;
|
||||||
itemx.connect(SIGNAL(:triggered)) do
|
itemx.connect(SIGNAL(:triggered)) do
|
||||||
|
|
|
@ -9,7 +9,7 @@ require 'find'
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'rdebug/base'
|
require 'rdebug/base'
|
||||||
|
|
||||||
module SshfsMapper
|
module Qasim
|
||||||
class Config
|
class Config
|
||||||
|
|
||||||
attr_reader :maps_active
|
attr_reader :maps_active
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'rdebug/base'
|
require 'rdebug/base'
|
||||||
|
|
||||||
module SshfsMapper
|
module Qasim
|
||||||
|
|
||||||
class Map
|
class Map
|
||||||
attr_reader :path,
|
attr_reader :path,
|
||||||
|
|
Loading…
Reference in a new issue