Class: CremeFraicheGui

Inherits:
Object
  • Object
show all
Includes:
BasicLogging, Translating
Defined in:
lib/gui/cremefraicheGui.rb

Overview

A simple user-interface for Crème Fraiche.

Constant Summary collapse

@@GD =
File::expand_path(File::dirname(__FILE__) ) + File::Separator

Constants included from BasicLogging

BasicLogging::DEBUG, BasicLogging::ERROR, BasicLogging::FATAL, BasicLogging::INFO, BasicLogging::Levels, BasicLogging::UNKNOWN, BasicLogging::WARN

Instance Attribute Summary

Attributes included from BasicLogging

#log_level, #target

Instance Method Summary collapse

Methods included from BasicLogging

is_muted?, #log, mute, #set_level, #set_target

Methods included from Translating

language, trl, #trl

Constructor Details

#initialize(args = nil) ⇒ CremeFraicheGui

Returns a new instance of CremeFraicheGui.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/gui/cremefraicheGui.rb', line 56

def initialize(args = nil)
  info('$CONF is ' << $CONF.to_s)
  info('level is ' << log_level.to_s)
  debug('init gui')
  prog_info = CremeFraiche::prog_info()
  @eml_files = {}

  @window = Gtk::Window.new(prog_info[:app_name])
  @window.set_default_size(300, 100)
  @window.set_icon($ICON_DIR + 'icon.xpm');
  # populate the window
  create
  # prepare an object to collect the tooltips
  @tooltips = Gtk::Tooltip.new
  # create some static tool-tips for the static elements
  set_tooltips
  # connect the static buttons with the functionality
  connect_buttons
  # the transformations in progress	
  @threads = Array.new
  # restore list of files from previous session
  read_list
  # make sure, that there will be only one file-dialog at a time.
  @fdialog = nil
  # display on screen
  show
end