no longer use internalized rexml
[booh] / bin / booh-classifier
index 8e5da452622e6c0f47a5a6c84049fd0f5c86bcc4..3be4fab23d05dc1e5ca9ee46b0649b64d269b3c6 100644 (file)
@@ -34,7 +34,7 @@ require 'gettext'
 include GetText
 bindtextdomain("booh")
 
-require 'booh/rexml/document'
+require 'rexml/document'
 include REXML
 
 require 'booh/booh-lib'
@@ -315,14 +315,14 @@ class Entry
             if @pixbuf_full.width.to_f / @pixbuf_full.height > width.to_f / height
                 resized_height = @pixbuf_full.height * (width.to_f/@pixbuf_full.width)
                 if @pixbuf_full.width > width || @pixbuf_full.height > resized_height
-                    @pixbuf_main = @pixbuf_full.scale(width, resized_height, Gdk::Pixbuf::INTERP_BILINEAR)
+                    @pixbuf_main = @pixbuf_full.scale(width, resized_height, :bilinear)
                 else
                     @pixbuf_main = @pixbuf_full
                 end
             else
                 resized_width = @pixbuf_full.width * (height.to_f/@pixbuf_full.height)
                 if @pixbuf_full.width > resized_width || @pixbuf_full.height > height
-                    @pixbuf_main = @pixbuf_full.scale(resized_width, height, Gdk::Pixbuf::INTERP_BILINEAR)
+                    @pixbuf_main = @pixbuf_full.scale(resized_width, height, :bilinear)
                 else
                     @pixbuf_main = @pixbuf_full
                 end
@@ -348,7 +348,7 @@ class Entry
         if @pixbuf_thumbnail.nil?
             if @pixbuf_main
                 msg 3, ">>> pixbuf_thumbnail from main #{path}"
-                @pixbuf_thumbnail = @pixbuf_main.scale(@pixbuf_main.width * (Entry.thumbnails_height.to_f/@pixbuf_main.height), Entry.thumbnails_height, Gdk::Pixbuf::INTERP_BILINEAR)
+                @pixbuf_thumbnail = @pixbuf_main.scale(@pixbuf_main.width * (Entry.thumbnails_height.to_f/@pixbuf_main.height), Entry.thumbnails_height, :bilinear)
             else
                 msg 3, ">>> pixbuf_thumbnail from file #{path}"
                 @pixbuf_thumbnail = load_into_pixbuf_at_size { |w, h|
@@ -477,7 +477,7 @@ class Entry
             #- use a pixbuf loader and check Gtk.events_pending? on each chunk, to keep the UI responsive even
             #- if loaded pictures are several MBs large
             if @loader.nil?
-                @loader = Gdk::PixbufLoader.new
+                @loader = GdkPixbuf::PixbufLoader.new
                 @loader.signal_connect('size-prepared') { |l, w, h|
                     @loader.set_size(*specify_size.call(w, h))
                 }
@@ -1243,7 +1243,7 @@ def show_entries(allentries)
     update_counters
     sb_msg(_("Loading images..."))
     $loading_progressbar.fraction = 0
-    $loading_progressbar.text = utf8(_("Loading... %d%") % 0)
+    $loading_progressbar.text = utf8(_("Loading... %d%%") % 0)
     $loading_progressbar.show
     t1 = Time.now
     total_loaded_files = 0
@@ -1295,7 +1295,7 @@ def show_entries(allentries)
             allentries.delete_at(i)
         end
         $loading_progressbar.fraction = i.to_f / allentries.size
-        $loading_progressbar.text = utf8(_("Loading... %d%") % (100 * $loading_progressbar.fraction))
+        $loading_progressbar.text = utf8(_("Loading... %d%%") % (100 * $loading_progressbar.fraction))
         if $quit
             return
         end
@@ -2023,7 +2023,7 @@ end
 
 def create_main_window
 
-    $videoborder_pixbuf = Gdk::Pixbuf.new("#{$FPATH}/images/video_border.png")
+    $videoborder_pixbuf = GdkPixbuf::Pixbuf.new(:file => "#{$FPATH}/images/video_border.png")
     $videoborder_pixmap, = $videoborder_pixbuf.render_pixmap_and_mask(0)
 
     mb = create_menubar
@@ -2033,7 +2033,7 @@ def create_main_window
     mainview_hbox = Gtk::HBox.new
     mainview_hbox.pack_start(Gtk::Alignment.new(0.5, 0, 1, 1).add(left_vbox = Gtk::VBox.new(false, 5)), false, true)
     left_vbox.pack_start(($labels_vbox = Gtk::VBox.new(false, 5)), false, true)
-    left_vbox.pack_end($loading_progressbar = Gtk::ProgressBar.new.set_text(utf8(_("Loading... %d%") % 0)), false, true)
+    left_vbox.pack_end($loading_progressbar = Gtk::ProgressBar.new.set_text(utf8(_("Loading... %d%%") % 0)), false, true)
     mainview_hbox.pack_start($mainview = MainView.new, true, true)
     main_vbox.pack_start(mainview_hbox, true, true)
     $imagesline_sw = Gtk::ScrolledWindow.new(nil, nil)