pixbuf = rotate_pixbuf(pixbuf, $modified_pixbufs[thumbnail_img][:angle_to_orig])
msg 3, "sizes: #{pixbuf.width} #{pixbuf.height} - desired #{desired_x}x#{desired_x}"
if pixbuf.height > desired_y
- pixbuf = pixbuf.scale(pixbuf.width * (desired_y.to_f/pixbuf.height), desired_y, Gdk::Pixbuf::INTERP_BILINEAR)
+ pixbuf = pixbuf.scale(pixbuf.width * (desired_y.to_f/pixbuf.height), desired_y, :bilinear)
elsif pixbuf.width < desired_x && pixbuf.height < desired_y
- pixbuf = pixbuf.scale(desired_x, pixbuf.height * (desired_x.to_f/pixbuf.width), Gdk::Pixbuf::INTERP_BILINEAR)
+ pixbuf = pixbuf.scale(desired_x, pixbuf.height * (desired_x.to_f/pixbuf.width), :bilinear)
end
end
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
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|
#- 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))
}
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
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
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
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)
$sizes_cache[fullpath] = { :x => $1.to_i, :y => $2.to_i }
end
else
- format, width, height = Gdk::Pixbuf.get_file_info(fullpath)
+ format, width, height = GdkPixbuf::Pixbuf.get_file_info(fullpath)
if width
$sizes_cache[fullpath] = { :x => width, :y => height }
end
Japanese: Masao Mutoh
German: Roland Eckert
French: Guillaume Cottenceau')),
- :logo => Gdk::Pixbuf.new("#{$FPATH}/images/logo.png") })
+ :logo => GdkPixbuf::Pixbuf.new(:file => "#{$FPATH}/images/logo.png") })
end
def smartsort(entries, sort_criterions)
def create_window
w = Gtk::Window.new
- w.icon_list = [ Gdk::Pixbuf.new("#{$FPATH}/images/booh-16x16.png"),
- Gdk::Pixbuf.new("#{$FPATH}/images/booh-32x32.png"),
- Gdk::Pixbuf.new("#{$FPATH}/images/booh-48x48.png") ]
+ w.icon_list = [ GdkPixbuf::Pixbuf.new(:file => "#{$FPATH}/images/booh-16x16.png"),
+ GdkPixbuf::Pixbuf.new(:file => "#{$FPATH}/images/booh-32x32.png"),
+ GdkPixbuf::Pixbuf.new(:file => "#{$FPATH}/images/booh-48x48.png") ]
return w
end