gimdb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/gimdb +5 -4
- data/gimdb.gemspec +1 -1
- data/lib/imdb.rb +1 -3
- data/src/controller.rb +2 -2
- data/src/gimdb.rb +4 -4
- data/src/model.rb +4 -4
- data/src/movie_box.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/bin/gimdb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
$GIMDB_PATH = "#{File.dirname(__FILE__)}/.."
|
4
|
+
$DOMAIN = 'gimdb'
|
5
|
+
$LOCALEDIR = "#{$GIMDB_PATH}/data/locale"
|
4
6
|
|
5
|
-
$
|
6
|
-
$LOCALEDIR = 'data/locale'
|
7
|
+
require "#{$GIMDB_PATH}/src/gimdb.rb"
|
7
8
|
|
8
|
-
GimdbGlade.new(
|
9
|
+
GimdbGlade.new("#{$GIMDB_PATH}/data/gimdb.glade")
|
9
10
|
Gtk.main
|
data/gimdb.gemspec
CHANGED
data/lib/imdb.rb
CHANGED
data/src/controller.rb
CHANGED
data/src/gimdb.rb
CHANGED
@@ -22,9 +22,9 @@ rescue LoadError => e
|
|
22
22
|
puts ""
|
23
23
|
exit -1
|
24
24
|
end
|
25
|
-
require
|
26
|
-
require
|
27
|
-
require
|
25
|
+
require "#{$GIMDB_PATH}/lib/imdb"
|
26
|
+
require "#{$GIMDB_PATH}/src/controller"
|
27
|
+
require "#{$GIMDB_PATH}/src/movie_box"
|
28
28
|
|
29
29
|
|
30
30
|
class GimdbGlade
|
@@ -91,7 +91,7 @@ class GimdbGlade
|
|
91
91
|
@combo_rating_from.active = 0
|
92
92
|
@combo_rating_to.active = 9
|
93
93
|
@combo_sort.active = 0
|
94
|
-
@image_spinner.pixbuf_animation = Gdk::PixbufAnimation.new(
|
94
|
+
@image_spinner.pixbuf_animation = Gdk::PixbufAnimation.new("#{$GIMDB_PATH}/data/icons/spinner16x16.gif")
|
95
95
|
@scrolled.add_with_viewport(@vbox_movies)
|
96
96
|
@scrolled.vscrollbar.signal_connect('value-changed') do |s|
|
97
97
|
x = (s.adjustment.upper * 90.0)/100.0
|
data/src/model.rb
CHANGED
@@ -3,14 +3,14 @@ require 'active_record'
|
|
3
3
|
require 'etc'
|
4
4
|
|
5
5
|
|
6
|
-
$
|
7
|
-
Dir.mkdir($
|
8
|
-
Dir.mkdir("#{$
|
6
|
+
$GIMDB_LOCAL_PATH = "#{Etc.getpwuid.dir}/.gimdb"
|
7
|
+
Dir.mkdir($GIMDB_LOCAL_PATH) unless File.exist?($GIMDB_LOCAL_PATH)
|
8
|
+
Dir.mkdir("#{$GIMDB_LOCAL_PATH}/posters") unless File.exist?("#{$GIMDB_LOCAL_PATH}/posters")
|
9
9
|
|
10
10
|
|
11
11
|
ActiveRecord::Base.establish_connection(
|
12
12
|
:adapter => "sqlite3",
|
13
|
-
:database => "#{$
|
13
|
+
:database => "#{$GIMDB_LOCAL_PATH}/db.sqlite3"
|
14
14
|
)
|
15
15
|
|
16
16
|
|
data/src/movie_box.rb
CHANGED
@@ -17,7 +17,7 @@ module GtkGimdb
|
|
17
17
|
|
18
18
|
|
19
19
|
def setting_up
|
20
|
-
img = Gtk::Image.new((@movie.image_path.nil? || !File.exists?(@movie.image_path)) ?
|
20
|
+
img = Gtk::Image.new((@movie.image_path.nil? || !File.exists?(@movie.image_path)) ? "#{$GIMDB_PATH}/data/icons/no_poster.png" : @movie.image_path)
|
21
21
|
img.set_tooltip_text("Code: #{@movie.code}")
|
22
22
|
self.pack_start(img, false)
|
23
23
|
|