I use a Gtk::Window for my application and I would like to change the
cursor during loading (the graphical interface is showed, the program is
running but resources are used to intialize the program). Usually in gtk
during initialization, the cursor is set to a rotating image instead of
an arrow to show that program is busy. How can I achieve this?
I take a look at Gdk::Cursor but I did not saw a simple method to do it.
Thanks for your replies. I was looking for a way to get the GDK::Window
and for the Gdk::Cursor::WATCH constant. I did not see this constant on
the hiki.
I will implement this feature on my apllication.
P.S. : I am currently writting an audio player based on ruby/gtk2 and
ruby/gst. I have just change the status to beta. Can I ask for
beta-tester on this list?
Simon A. wrote:
I also wondered a long time before I found.
I got it when I realized a cursor is attached to a GDK::Window, not a
GTK.
And that GDK::Window is just a rectangular area on the screen.
So, the flow is :
Get the area where you want to change the cursor (GTK::Widget#window)
Change the cursor in this area (GDK::Window#cursor=)
Hope it helps.
Simon
Dobai-Pataky Bálint wrote:
this is how i do it:
mainwindow.window.set_cursor(Gdk::Cursor.new(Gdk::Cursor::WATCH))
Thanks for your interesd on ZiK. I have answered to ypur reports on
rubyforge. Can you explain this two points :
scroll event handling on the trayicon,
I think he means :
Do something when I scroll the mouse wheel, while the mouse is over the
tray
icon.
Maybe next/prev song, or play faster/slower.
I tried very fast.
I crash when I try to access the preferences, but I think it’s because I
did
not install it. I just cloned and ruby main.rb. It seems you are loading
libs with a path configured somewhere, which is bad, imo.
Also, I don’t know why, but taglib is taglib2 if installed through gems.
Maybe contact the author to fix this.
Good work otherwise, even if I’m not looking for a new music player. I’m
happy to know there will be something to look at if I ever need GST in
ruby
:).
Thanks for your interesd on ZiK. I have answered to ypur reports on
rubyforge. Can you explain this two points :
scroll event handling on the trayicon,
padding of widgets in the preferences window/browser,playlist.
As I am not fluent in english I am nnot I understand wht you mean.
Dobai-Pataky Bálint wrote:
hi
i like it.
just reported some stug on rubyforge.
libs are loaded by :
require ‘lib’
but ZiK files (other than ZiK.rb/main.rb) are loaded by adding Data_dir
to $:.
In main.rb Data_dir is defined by File.dirname(FILE). Maybe there is
something to do here.
In installed ZiK, Data_dir was redefined by installation.
Is there a better way (a more rubysh one) of doing things?
I use ./main.rb (instead ofruby main.rb) and everything works smooth.
You might want to look at :
I do not use gems. I install all package from my distributions. I will
have to learn how to use gems before checking this and create a gem
release of ZiK.
The library used by ZiK can be found at Ruby-taglib.
I know where to find it :).
I was just saying that it is shipped as ‘taglib’ on my distribution
(Debian
sid), et as ‘taglib2’ through gems. Both are the same lib, I don’t know
why
the gem is shipped as ‘taglib2’. The author has not been working on it
since
2006 it seems, so he may not be working on it anymore.
Thanks for the link. I will try to change my practises.
I know where to find it :).
I was just saying that it is shipped as ‘taglib’ on my distribution
(Debian
sid), et as ‘taglib2’ through gems. Both are the same lib, I don’t know
why
the gem is shipped as ‘taglib2’. The author has not been working on it
since
2006 it seems, so he may not be working on it anymore.
I add the link just to be sure we were talking about the same lib. Can
you mail me the address of the gem packager? You can find mine in
main.rb.
I think he means :
Do something when I scroll the mouse wheel, while the mouse is over the
tray
icon.
Maybe next/prev song, or play faster/slower.
Next/prev song on scroll event seems nice but I do not no how to deal
with events and Gtk::StatusIcon. It seems you cannot add a
Gtk::StatusIcon to a Gtk::EventBox.
I tried very fast.
I crash when I try to access the preferences, but I think it’s because I
did
not install it. I just cloned and ruby main.rb. It seems you are loading
libs with a path configured somewhere, which is bad, imo.
libs are loaded by :
require ‘lib’
but ZiK files (other than ZiK.rb/main.rb) are loaded by adding Data_dir
to $:.
In main.rb Data_dir is defined by File.dirname(FILE). Maybe there is
something to do here.
In installed ZiK, Data_dir was redefined by installation.
Is there a better way (a more rubysh one) of doing things?
I use ./main.rb (instead ofruby main.rb) and everything works smooth.
Also, I don’t know why, but taglib is taglib2 if installed through gems.
Maybe contact the author to fix this.
I do not use gems. I install all package from my distributions. I will
have to learn how to use gems before checking this and create a gem
release of ZiK.
The library used by ZiK can be found at Ruby-taglib.
Good work otherwise, even if I’m not looking for a new music player. I’m
happy to know there will be something to look at if I ever need GST in
ruby
:).