Ruby-gtk?


(Martin Hart) #1

Hi,

what’s happened to ruby-gtk? I have looked in RAA and rubyforge but I can’t
find it. Am I missing something?

Cheers,
Martin

···


Martin Hart
Arnclan Limited
53 Union Street
Dunstable, Beds
LU6 1EX
http://www.arnclanit.com


(Laurent Julliard) #2

it’s included in the ruby-gnome2 project:
ruby-gnome2.sourceforge.jp

···

il Tue, 24 Feb 2004 03:26:49 +0900, Martin Hart martin@zsdfherg.com ha scritto::

Hi,

what’s happened to ruby-gtk? I have looked in RAA and rubyforge but I can’t
find it. Am I missing something?


(Jason Voegele) #3

It’s now part of the Ruby-GNOME2 project.

http://ruby-gnome2.sourceforge.jp/
···

On Monday 23 February 2004 01:26 pm, Martin Hart wrote:

what’s happened to ruby-gtk? I have looked in RAA and rubyforge but I
can’t find it. Am I missing something?


Jason Voegele
/usr/games/fortune -s
The economy depends about as much on economists as the weather does on
weather forecasters.
– Jean-Paul Kauffmann


(Charles D Hixson) #4

Jason Voegele wrote:

···

On Monday 23 February 2004 01:26 pm, Martin Hart wrote:

what’s happened to ruby-gtk? I have looked in RAA and rubyforge but I
can’t find it. Am I missing something?

It’s now part of the Ruby-GNOME2 project.
http://ruby-gnome2.sourceforge.jp/

A word of warning, however. SourceForge lists that project as being
"pre-Alpha", and experiments seem to bear that out.


(Archit Baweja) #5

Hey

Charles Hixson charleshixsn@earthlink.net writes:

Jason Voegele wrote:

what’s happened to ruby-gtk? I have looked in RAA and rubyforge but I
can’t find it. Am I missing something?

It’s now part of the Ruby-GNOME2 project.
http://ruby-gnome2.sourceforge.jp/

A word of warning, however. SourceForge lists that project as being
"pre-Alpha", and experiments seem to bear that out.

I would strongly disagree. The bindings are pretty stable (imho). Maybe docs
are lacking (but I don’t care, since I have quite a bit of experience in Gtk+)
I am already writing 3 apps which are turning out pretty stable. And with the
upcoming 0.9.0 release, some more goodies are coming.

Cheers!
Archit

···

On Monday 23 February 2004 01:26 pm, Martin Hart wrote:


(Jeremy Henty) #6

Can you be more specific? I have been using ruby-gnome through
several versions and my experience is that it is admirably reliable
and robust.

Regards,

Jeremy Henty

···

In article 403E3E5C.9030604@earthlink.net, Charles Hixson wrote:

SourceForge lists that [ruby-gnome2] as being “pre-Alpha”, and
experiments seem to bear that out.


(Alexander Kellett) #7

100% agreed.
i’ve had no problems with the experiments i did
and i have no gtk+ experience.

Alex

···

On Friday 27 February 2004 16:29, Archit Baweja wrote:

I would strongly disagree. The bindings are pretty stable (imho). Maybe
docs are lacking (but I don’t care, since I have quite a bit of experience
in Gtk+) I am already writing 3 apps which are turning out pretty stable.
And with the upcoming 0.9.0 release, some more goodies are coming.


“It is better to have tried and failed than to have failed to try, but
the result’s the same.”

  • Mike Dennison

(Dick Davies) #8

Jeremy Henty wrote:

···

In article 403E3E5C.9030604@earthlink.net, Charles Hixson wrote:

SourceForge lists that [ruby-gnome2] as being “pre-Alpha”, and
experiments seem to bear that out.

Can you be more specific? I have been using ruby-gnome through
several versions and my experience is that it is admirably reliable
and robust.

‘me too’ - maybe its a platform thing? I’ve seen GTK on Windows
(the Gimp uses it), but it’s buggy.


(Charles D Hixson) #9

Jeremy Henty wrote:

SourceForge lists that [ruby-gnome2] as being “pre-Alpha”, and
experiments seem to bear that out.

Can you be more specific? I have been using ruby-gnome through
several versions and my experience is that it is admirably reliable
and robust.

Regards,

Jeremy Henty

Not much more specific, but I’ll try.
It was one of the tutorial examples, and I was testing it about a month
ago. The example bombed nearly immediately on a require statement. I
seem to remember that the missing file was gnome-calendar or
gnome-canvas, something like that. I was using Ruby 1.8.1-pre 4 (or
something like that). Most of the system seemed stable, and I’d finally
gotten bsddb to work properly, so I wanted to try a graphic interface,
so I downloaded ruby-gnome2 all & ruby-gtk2 (not quite sure of the
names, but that’s about right). They compiled without hitch, so I
started working through the tutorial. But I didn’t get very far. Well,
the files were listed as either alpha or pre-alpha, so I wasn’t
surprised, and the problem was gross enough that I presumed that it
didn’t need reporting. (I had previously gotten a routine similar to
that to work–so I figured it was just a temporary retrogression.)

But it did seem to confirm that the project was alpha.

···

In article 403E3E5C.9030604@earthlink.net, Charles Hixson wrote:


(Charles D Hixson) #10

Jeremy Henty wrote:

Can you be more specific? I have been using ruby-gnome through

several versions and my experience is that it is admirably reliable
and robust.

Regards,

Jeremy Henty

Sorry, left out something. Debian Sid.


(Clifford Heath) #11

On the subject of ruby-gtk2, the absence of (sufficient) docs is
a shame, and the raw GTK docs don’t always help. But perhaps one
of you folk can help me.

I’ve modified one of the TreeView examples to add a toggle as a
second column, but I can’t work out what signal to connect to
allow the toggle to be clicked. My code is below, can you see
how to make the toggle clickable?

Is there a dynamic way to list all signals that an object can
generate?

Clifford Heath.

require ‘gtk2’

def build_tree(tree, model)

root = model.append(nil)
root.set_value(0, "Root")

for i in 1..4
   sub = model.append(root)
   sub.set_value(0, "Foo#{i}")
   for i in 1..2
      sub2 = model.append(sub)
      sub2.set_value(0, "Bar#{i}")
 sub2.set_value(1, i == 1)		# Bar 1 is enabled
   end
end
@window.show_all

end

Initialize Gtk

Gtk.init

Create the main window:

@window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
@window.set_size_request(400, 400)
@window.signal_connect(“delete_event”) { Gtk.main_quit }
@window.set_border_width(5)
@window.set_title(“TreeStore Example”);

Put a scrollable vbox in it:

vbox2 = Gtk::VBox.new(false, 0)
scroller = Gtk::ScrolledWindow.new
scroller.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC)
@window.add(vbox2)
vbox2.pack_start(scroller, true, true, 0)

Create the TreeStore with two columns

model = Gtk::TreeStore.new(String, TrueClass)

Create the TreeView adding the TreeStore

tree = Gtk::TreeView.new(model)

Create the Text renderer and set properties

render1 = Gtk::CellRendererText.new

Create the Toggle renderer and set properties

render2 = Gtk::CellRendererToggle.new
render2.activatable = true

Create the columns

c1 = Gtk::TreeViewColumn.new(“Headings”, render1, {:text => 0})
c2 = Gtk::TreeViewColumn.new(“Enabled”, render2, {:active => 1})

This doesn’t work:

#c2.signal_connect(“clicked”) { |view, path, column|

p column

p column.class.name

#}

append the columns to treeview

tree.append_column(c1)
tree.append_column(c2)

add the treeview to the scroller

scroller.add(tree)

build_tree(tree, model)

@window.show_all
Gtk.main


(Laurent Julliard) #12

the latest gtk from dropline have native l&f and are quite stable,
imho. Same goes for ruby-gtk2 (on my XP box)

···

il Sat, 28 Feb 2004 23:52:42 +0900, Dick Davies rasputnik@hellooperator.net ha scritto::

‘me too’ - maybe its a platform thing? I’ve seen GTK on Windows
(the Gimp uses it), but it’s buggy.


(Laurent Sansonetti) #13

I would strongly disagree. The bindings are pretty stable (imho). Maybe
docs are lacking (but I don’t care, since I have quite a bit of experience
in Gtk+) I am already writing 3 apps which are turning out pretty stable.
And with the upcoming 0.9.0 release, some more goodies are coming.

Documentation is indeed lacking, we especially need API reference and
tutorials for all covered libraries. We are currently working on this.

100% agreed.
i’ve had no problems with the experiments i did
and i have no gtk+ experience.

From a KDE developer this is nice to hear :wink:

Cheers,

···

On Fri, 2004-02-27 at 15:41, Alexander Kellett wrote:

On Friday 27 February 2004 16:29, Archit Baweja wrote:


Laurent


(Masao Mutoh) #14

Hi,

On the subject of ruby-gtk2, the absence of (sufficient) docs is
a shame, and the raw GTK docs don’t always help. But perhaps one
of you folk can help me.

I’ve modified one of the TreeView examples to add a toggle as a
second column, but I can’t work out what signal to connect to
allow the toggle to be clicked. My code is below, can you see
how to make the toggle clickable?

Use “toggled” signal.
See http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3ACellRendererToggle

And there are two samples for this.
Try gtk/sample/gtk-demo/list_store.rb, tree_store.rb

Is there a dynamic way to list all signals that an object can
generate?

See http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_signals,

Also rbbr shows properties and signals.
Try http://raa.ruby-lang.org/list.rhtml?name=rbbr

···

On Mon, 1 Mar 2004 20:21:10 +0900 Clifford Heath cjh-nospam@nospaManagesoft.com wrote:


.:% Masao Mutohmutoh@highway.ne.jp


(Clifford Heath) #15

Masao Mutoh wrote:

Use “toggled” signal.

Thanks. I had tried this, but without having found the samples I didn’t
get it right. I dived in too deep, too soon :-). The sample applications
are great - just what I needed.

They do have a few problems on Windows XP though. For example:

  • Lots of warnings about missing fonts (can these be disabled?)
  • Open Stock Item and Icon browser. Down-arrow many times to
    change the icon. After 40-50 times, the program crashes.
  • Open “Images”. It starts to draw, then crashes in “close” with
    "Unrecognised image file format".
  • “Pixbufs” demo instantly chucks an exception in find_file
  • “Item Factory” demo doesn’t work (Alt key not detected perhaps?)
  • “Size Group” doesn’t seem to show anything, should it?
  • “Change Display” seems to be only an X thing. Does Gtk detect
    multi-screen Windows desktops?

Looks like these probably all work under X, just need debugging with
Windoze.

Does anyone here use Purify? Seems like Purifying Ruby with the Gtk
samples could yield a few surprises… I can do this if you’re willing
to process the output:-) Purify is the bees knees, and Ruby/Gtk is
great too - thanks Masao!

Clifford Heath.


(Masao Mutoh) #16

Hi,

Masao Mutoh wrote:

Use “toggled” signal.

Thanks. I had tried this, but without having found the samples I didn’t
get it right. I dived in too deep, too soon :-). The sample applications
are great - just what I needed.

They do have a few problems on Windows XP though. For example:

  • Lots of warnings about missing fonts (can these be disabled?)

This is a GTK+ issue. I don’t know how to be disable it.
You can get other gtk application like gtk-demo
If you can set font properties correctly, the message will be not shown.

  • Open Stock Item and Icon browser. Down-arrow many times to
    change the icon. After 40-50 times, the program crashes.

This is a known bug and have alreday fixed on CVS.

  • Open “Images”. It starts to draw, then crashes in “close” with
    "Unrecognised image file format".
  • “Pixbufs” demo instantly chucks an exception in find_file

Hmm. they seem environment problem. I’ll try to fix it.

  • “Item Factory” demo doesn’t work (Alt key not detected perhaps?)

Try “Alt + F”. In my environment(Windows2000) it works fine.

  • “Size Group” doesn’t seem to show anything, should it?

It works on Linux box. It seems environment problem, too.
I’ll try to fix it.

  • “Change Display” seems to be only an X thing. Does Gtk detect
    multi-screen Windows desktops?

I’m not sure.
But I think gtk-demo is not suitable for Windows environment.
It’s just demo.

Looks like these probably all work under X, just need debugging with
Windoze.

Agreed. But my main development environment is a Linux box.
And I don’t have enough time …
So I can’t support windows well. We’ll welcome any help.

···

On Tue, 2 Mar 2004 11:56:05 +0900 Clifford Heath cjh-nospam@nospaManagesoft.com wrote:


.:% Masao Mutohmutoh@highway.ne.jp