GTKMozEmbed scrollbars and more questions

Hi all,

im new to ruby and ruby-gnome2 and my questions should be very basic,
anyway, here are some questions about ruby-gnome2:

  • When i use the GTKMozEmbed widget the scrollbar uses the mozilla theme
    instead of the GNOME theme, is it possible to make the GTKMozEmbed
    scrollbar to look like all GNOME scrollbars?

  • Is there any way to use a spellchecker in the TextView or SourceView
    widgets? Looking to the API it seems not to be any GTKSpell widget, so i
    don’t know what would be the way to implement the spellchecker feature.

  • I would like to restore the main window position and size as the last
    time the user closed the application, there’s no problem with position
    and size but i don’t know how to check if the window was maximized when
    the user closed it.

  • I’m using a trayicon in my application, adding to it an EventBox with
    and image, it works nice, but the image is not resized to fit the tray.
    I’m using a .svg file format for the image.

I think this is all at the moment, i hope somebody can point me the in
right way.


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share
your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Am Montag, den 07.08.2006, 11:45 +0200 schrieb Ivan:

Hi all,

im new to ruby and ruby-gnome2 and my questions should be very basic,
anyway, here are some questions about ruby-gnome2:

  • When i use the GTKMozEmbed widget the scrollbar uses the mozilla theme
    instead of the GNOME theme, is it possible to make the GTKMozEmbed
    scrollbar to look like all GNOME scrollbars?

Don’t know…

  • Is there any way to use a spellchecker in the TextView or SourceView
    widgets? Looking to the API it seems not to be any GTKSpell widget, so i
    don’t know what would be the way to implement the spellchecker feature.

GtkSpell is obsolate since several years.

Several years ago i used aspell with C and it was very easy. A short
look at http://sourceforge.net/projects/raspell/ the ruby aspell
bindings shows that it is also very easy.

  • I would like to restore the main window position and size as the last
    time the user closed the application, there’s no problem with position
    and size but i don’t know how to check if the window was maximized when
    the user closed it.

That is someting your windowmanager shall do via the session management.
But i think ruby-gtk cant handle this for now.

  • I’m using a trayicon in my application, adding to it an EventBox with
    and image, it works nice, but the image is not resized to fit the tray.
    I’m using a .svg file format for the image.

i do this in my code:

  @tray = Gtk::TrayIcon.new("test")
  @traybox = Gtk::EventBox.new
  @trayimage = Gtk::Image.new
  @tray.add @traybox
  @traybox.add @trayimage
  @tooltip = Gtk::Tooltips.new
  @traysize = 0

  @tray.signal_connect("configure_event") do |widget, event|
    @traysize = event.width > event.height ? event.width :

event.height
@traysize = @traysize / 2
@traysize = 4 if @traysize < 4
end

  @tray.signal_connect("map_event") do
    pixbuf =

Gdk::Pixbuf.new("#{@datadir}/pixmaps/radaubruder/radaubruder.svg",
@traysize, @traysize)
@trayimage.pixbuf = pixbuf
end

  @tray.show_all

ruby-gnome2-devel-en mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

finally, it works like this:
if w.window.state & Gdk::EventWindowState::MAXIMIZED ==
Gdk::EventWindowState::MAXIMIZED then p “maximized”;end
thanks

That code worked nice, thanks.


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

  • When i use the GTKMozEmbed widget the scrollbar uses the mozilla theme
    instead of the GNOME theme, is it possible to make the GTKMozEmbed
    scrollbar to look like all GNOME scrollbars?

Don’t know…

yeah, this is very strange as in the rubizilla sample movie the
scrollbars look nice, but when i try the sample myself the scrollbars
are like the default mozilla theme instead of GNOME scrollbars.

thanks, i will take a look to it. Anyway, what i would like to do is
underline spell errors when the user writes, im not sure if this is
possible with the gtktextview or i should use some kind of pango object.

  @tray.signal_connect("configure_event") do |widget, event|
    @trayimage.pixbuf = pixbuf
  end

  @tray.show_all

woooaaa… now my trayicon looks very very very small!!


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

On Mo, 2006-08-07 at 20:57 +0200, Detlef R. wrote:

Am Montag, den 07.08.2006, 11:45 +0200 schrieb Ivan:

  • I would like to restore the main window position and size as the last
    time the user closed the application, there’s no problem with position
    and size but i don’t know how to check if the window was maximized when
    the user closed it.

That’s quite easy:

-------v GdkWindow
window.window.state & Gtk::Window::STATE_MAXIMIZED
--------------^ GdkWindowState

(maybe wrong - i just don’t have ruby-gnome2 installed here, but that’s
how it should work)

That is someting your windowmanager shall do via the session management.
But i think ruby-gtk cant handle this for now.

The Gnome policy for these features is like that:

The window manager is responsible for window management, if an
application wants to restore the window size, position and state, it
needs to do this on its own (just because only the application developer
knows which kinds of windows are of the same “type” - where “type” can
be “main window”, “properties box”, “file save dialog”).

Session management is something that should be implemented by
applications and a session manager.

Regards,
Sven


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs