Sha256: ae796cff5dedf5e38dbd3c2c04abc823de6531b7239f1d2ea227ef06ae91fa42

Contents?: true

Size: 591 Bytes

Versions: 15

Compression:

Stored size: 591 Bytes

Contents

require 'ppds/config'
require 'ppds/tumblr'
require 'grumblr/ui'
require 'gtk2'

module Grumblr

  class Core
    attr_accessor :blog

    def initialize
      $app = self

      $cfg = Ppds::Config.new 'grumblr'

      $gui = Grumblr::UI.new
      $gui.show_all

      $api = Ppds::Tumblr.new
      if $api.authenticate($cfg.get(:email), $cfg.get(:password))
        $gui.add Grumblr::Dashboard.new
      else
        $gui.add Grumblr::SettingsFrame.new
      end
    end

    def main
      Gtk::main
    end

    def quit
      Gtk::main_quit
    ensure
      $cfg.save
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
themactep-grumblr-2.1.0 lib/grumblr/core.rb
themactep-grumblr-2.1.1 lib/grumblr/core.rb
grumblr-2.3.8 lib/grumblr/core.rb
grumblr-2.3.7 lib/grumblr/core.rb
grumblr-2.3.6 lib/grumblr/core.rb
grumblr-2.3.5 lib/grumblr/core.rb
grumblr-2.3.4 lib/grumblr/core.rb
grumblr-2.3.3 lib/grumblr/core.rb
grumblr-2.3.1 lib/grumblr/core.rb
grumblr-2.3.0 lib/grumblr/core.rb
grumblr-2.2.0 lib/grumblr/core.rb
grumblr-2.1.1 lib/grumblr/core.rb
grumblr-2.1.0 lib/grumblr/core.rb
grumblr-2.0.1 lib/grumblr/core.rb
grumblr-2.0.0 lib/grumblr/core.rb