diff --git a/bin/qasim-gui.rb b/bin/qasim-gui.rb index 74db743..d7feebe 100755 --- a/bin/qasim-gui.rb +++ b/bin/qasim-gui.rb @@ -22,6 +22,9 @@ module Qasim def initialize + @config = Config.new + @config.parse_cmd_line ARGV + @config.parse_file end def dbus_notify title, body, icon @@ -70,7 +73,8 @@ module Qasim 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.setCheckable true; itemx.connect(SIGNAL(:triggered)) do diff --git a/qasim/config.rb b/qasim/config.rb index 63ae5db..10f84c0 100644 --- a/qasim/config.rb +++ b/qasim/config.rb @@ -9,7 +9,7 @@ require 'find' require 'rubygems' require 'rdebug/base' -module SshfsMapper +module Qasim class Config attr_reader :maps_active diff --git a/qasim/map.rb b/qasim/map.rb index ed3fb53..6a3904e 100644 --- a/qasim/map.rb +++ b/qasim/map.rb @@ -2,7 +2,7 @@ require 'rubygems' require 'rdebug/base' -module SshfsMapper +module Qasim class Map attr_reader :path,