themactep-fliewr 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/VERSION +1 -1
- data/bin/fliewr +0 -4
- data/fliewr.gemspec +1 -1
- data/lib/fliewr/ui.rb +7 -6
- metadata +1 -1
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
nbproject
|
1
|
+
nbproject
|
2
|
+
pkg
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.1
|
data/bin/fliewr
CHANGED
@@ -10,10 +10,6 @@
|
|
10
10
|
http://creativecommons.org/licenses/BSD/
|
11
11
|
=end
|
12
12
|
|
13
|
-
app_file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
|
14
|
-
APP_ROOT = File.expand_path(File.dirname(app_file))
|
15
|
-
Dir.glob(APP_ROOT + '/../**/').reverse.each { |d| $:.unshift d }
|
16
|
-
|
17
13
|
begin
|
18
14
|
require 'rubygems'
|
19
15
|
rescue LoadError
|
data/fliewr.gemspec
CHANGED
data/lib/fliewr/ui.rb
CHANGED
@@ -6,8 +6,9 @@ Gtk::MozEmbed.set_profile_path ENV['HOME'] + '/.mozilla', 'fliewr'
|
|
6
6
|
module Fliewr
|
7
7
|
|
8
8
|
SECONDS_PER_MINUTE = 60
|
9
|
-
IMAGE_ROOT = File.expand_path(File.join(APP_ROOT, '..', 'data'))
|
10
9
|
|
10
|
+
DATA_ROOT = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data'))
|
11
|
+
|
11
12
|
class UI < Gtk::Window
|
12
13
|
|
13
14
|
attr_accessor :logo, :statusbar, :theme_base, :theme_item, :theme_error, :theme_style
|
@@ -15,7 +16,7 @@ module Fliewr
|
|
15
16
|
def initialize
|
16
17
|
super Gtk::Window::TOPLEVEL
|
17
18
|
|
18
|
-
filename = File.join(Fliewr::
|
19
|
+
filename = File.join(Fliewr::DATA_ROOT, 'fliewr.svg')
|
19
20
|
self.logo = Gdk::Pixbuf.new filename, 128, 128
|
20
21
|
|
21
22
|
self.set_title 'Fliewr'
|
@@ -28,7 +29,7 @@ module Fliewr
|
|
28
29
|
self.move $cfg.get(:window_x_pos).to_i, $cfg.get(:window_y_pos).to_i
|
29
30
|
|
30
31
|
theme = $cfg.get(:theme) || 'default'
|
31
|
-
theme_root = File.join(
|
32
|
+
theme_root = File.join(DATA_ROOT,'themes',theme)
|
32
33
|
self.theme_base = File.open(File.join(theme_root,'theme.html'), "r") { |f| f.read }
|
33
34
|
self.theme_item = File.open(File.join(theme_root,'item.html'), "r") { |f| f.read }
|
34
35
|
self.theme_error = File.open(File.join(theme_root,'error.html'), "r") { |f| f.read }
|
@@ -181,7 +182,7 @@ module Fliewr
|
|
181
182
|
class StatusIcon < Gtk::StatusIcon
|
182
183
|
def initialize
|
183
184
|
super
|
184
|
-
self.file = File.join(Fliewr::
|
185
|
+
self.file = File.join(Fliewr::DATA_ROOT, 'fliewr.svg')
|
185
186
|
self.set_tooltip 'Flickr Viewr'
|
186
187
|
self.signal_connect(:activate) do
|
187
188
|
if $gui.visible?
|
@@ -192,14 +193,14 @@ module Fliewr
|
|
192
193
|
end
|
193
194
|
end
|
194
195
|
|
196
|
+
menu = Gtk::Menu.new
|
197
|
+
|
195
198
|
self.signal_connect(:popup_menu) do |icon, button, time|
|
196
199
|
menu.popup nil, nil, button, time
|
197
200
|
end
|
198
201
|
|
199
202
|
separator = Gtk::SeparatorMenuItem.new
|
200
203
|
|
201
|
-
menu = Gtk::Menu.new
|
202
|
-
|
203
204
|
item = Gtk::ImageMenuItem.new Gtk::Stock::HOME
|
204
205
|
item.signal_connect(:activate) do
|
205
206
|
$app.visit_user_profile
|