Sha256: 92c83d4ff709abfaabfbb62e5e077c1ec1569ce74d358c5293b3b25612131aac

Contents?: true

Size: 587 Bytes

Versions: 2

Compression:

Stored size: 587 Bytes

Contents

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

module Grumblr

  class Core
    attr_accessor :blog

    def initialize
      $app = self

      $cfg = Grumblr::Config.new

      $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

2 entries across 2 versions & 1 rubygems

Version Path
grumblr-2.4.1 lib/grumblr/core.rb
grumblr-2.4.0 lib/grumblr/core.rb