X-Git-Url: http://git.code-monkey.de/?p=snett.git;a=blobdiff_plain;f=bin%2Fsnett;h=1dce7081742f33f988600821db29f5d5d4954329;hp=ff053dff957164d8b3b6db3b9be924bb5160d45a;hb=d18026f6bb66cdd3eb89f0895717be747f6fb203;hpb=20a59e99a83be8c5de5b1c63be4676b08ec2a1d9 diff --git a/bin/snett b/bin/snett index ff053df..1dce708 100755 --- a/bin/snett +++ b/bin/snett @@ -37,14 +37,14 @@ class Gtk::MenuItem def set_callback(meth, args = []) args.unshift(meth) - signal_connect("button_release_event") do + signal_connect("activate") do Snett::Snett.instance.xmms.send(*args) false end end end -class XmmsClient::XmmsClient +class Xmms::Client def playback_next playlist_set_next_rel(1).notifier { playback_tickle } end @@ -68,7 +68,7 @@ module Snett @menu = nil @tooltips = Gtk::Tooltips.new - @xmms = XmmsClient::XmmsClient.new(PKG_NAME) + @xmms = Xmms::Client.new(PKG_NAME) @xmms.connect(ENV["XMMS_PATH"]) @xmms.add_to_glib_mainloop @@ -178,7 +178,7 @@ module Snett item = Gtk::ImageMenuItem.new(text) item.image = Gtk::Image.new(stock, Gtk::IconSize::MENU) - item.signal_connect("button_release_event") do + item.signal_connect("activate") do PlaylistDialog.new(sym).show_all false end @@ -194,7 +194,7 @@ module Snett append(Gtk::SeparatorMenuItem.new) item = Gtk::ImageMenuItem.new(Gtk::Stock::ABOUT) - item.signal_connect("button_release_event") do + item.signal_connect("activate") do props = { "name" => PKG_NAME, "version" => VERSION, @@ -209,7 +209,7 @@ module Snett append(item) item = Gtk::ImageMenuItem.new(Gtk::Stock::QUIT) - item.signal_connect("button_release_event") do + item.signal_connect("activate") do Snett.instance.signal_emit("destroy") false end @@ -246,7 +246,13 @@ module Snett col = Gtk::TreeViewColumn.new("Name", renderer, :text => 0) @view.append_column(col) - vbox.add(@view) + scrolled = Gtk::ScrolledWindow.new + scrolled.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC) + scrolled.add(@view) + + vbox.add(scrolled) + + resize(350, 400) Snett.instance.xmms.medialib_playlists_list. notifier(&method(:on_playlists_list))