more deprecations removal
authorGuillaume Cottenceau <gc@mnc.ch>
Fri, 21 Sep 2018 20:36:36 +0000 (22:36 +0200)
committerGuillaume Cottenceau <gc@mnc.ch>
Fri, 21 Sep 2018 20:36:36 +0000 (22:36 +0200)
bin/booh

index f6ab0e331231ae7bf25fce95f5a6ef6f2f5e0bc4..b861733e54412080b819660c755d19a058e264ce 100644 (file)
--- a/bin/booh
+++ b/bin/booh
@@ -1193,7 +1193,7 @@ def add_thumbnail(autotable, filename, type, thumbnail_img, caption)
     }
 
     if type == 'video'
-        pxb = Gdk::Pixbuf.new("#{$FPATH}/images/video_border.png")
+        pxb = GdkPixbuf::Pixbuf.new(:file => "#{$FPATH}/images/video_border.png")
         frame1.add(Gtk::HBox.new.pack_start(da1 = Gtk::DrawingArea.new.set_size_request(pxb.width, -1), false, false).
                                  pack_start(img = Gtk::Image.new).
                                  pack_start(da2 = Gtk::DrawingArea.new.set_size_request(pxb.width, -1), false, false))
@@ -2518,7 +2518,8 @@ def change_dir
                             else
                                 tmpimage = "#{tmpdir}/00000001.jpg"
                                 begin
-                                    preview_img.pixbuf = Gdk::Pixbuf.new(tmpimage, 240, 180)
+                                    preview_img.pixbuf = GdkPixbuf::Pixbuf.new(:file => tmpimage, :width => 240,
+                                                                               :height => 180)
                                     fc.preview_widget_active = true
                                 rescue Gdk::PixbufError
                                     fc.preview_widget_active = false
@@ -2530,7 +2531,7 @@ def change_dir
                         end
                     else
                         begin
-                            preview_img.pixbuf = rotate_pixbuf(Gdk::Pixbuf.new(fc.preview_filename, 240, 180), guess_rotate(fc.preview_filename))
+                            preview_img.pixbuf = rotate_pixbuf(GdkPixbuf::Pixbuf.new(:file => fc.preview_filename, :width => 240, :height => 180), guess_rotate(fc.preview_filename))
                             fc.preview_widget_active = true
                         rescue Gdk::PixbufError
                             fc.preview_widget_active = false
@@ -2839,7 +2840,7 @@ end
 
 def pixbuf_or_nil(filename)
     begin
-        return Gdk::Pixbuf.new(filename)
+        return GdkPixbuf::Pixbuf.new(:file => filename)
     rescue
         return nil
     end
@@ -5057,7 +5058,7 @@ def create_main_window
         end
     }
 
-    $albums_ts = Gtk::TreeStore.new(String, String, Gdk::Pixbuf)
+    $albums_ts = Gtk::TreeStore.new(String, String, GdkPixbuf::Pixbuf)
     $albums_tv.set_model($albums_ts)
     $albums_tv.signal_connect('realize') { $albums_tv.grab_focus }