Forum: Ruby-Gnome 2 how to use list store

Ff312ec21b0fd1d07c8708e29df7d242?d=identicon&s=25 Ebru Akagunduz (ebruakagunduz)
on 2014-01-16 17:18
Hi, I want to create simple file manager using Ruby & Gtk3. I found an
example but they used python.

http://zetcode.com/gui/pygtk/advancedwidgets/

I didn't understand structure of List Store how works? Also I read this
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%...

I couldn't put any argument to store.append function so I used like
below:

@store = Gtk::ListStore.new(String, Gdk::Pixbuf, TrueClass)

Dir.foreach("/path/") {|x| @store.append; @store.set_value(x, dir_icon,
true)}

But it doesn't work, how should I use List Store?

Thanks.
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2014-01-18 02:49
(Received via mailing list)
Hi,

In <24fb5553c158dd438d3ab85a8414a956@ruby-forum.com>
  "[ruby-gnome2-devel-en] how to use list store" on Thu, 16 Jan 2014
17:18:46 +0100,
  Ebru Akagunduz <ruby-forum-incoming@andreas-s.net> wrote:

>
> @store = Gtk::ListStore.new(String, Gdk::Pixbuf, TrueClass)
>
> Dir.foreach("/path/") {|x| @store.append; @store.set_value(x, dir_icon,
> true)}
>
> But it doesn't work, how should I use List Store?

Could you show the current whole your code?
It will be a good start point to improve it.


Thanks,
--
kou
Ff312ec21b0fd1d07c8708e29df7d242?d=identicon&s=25 Ebru Akagunduz (ebruakagunduz)
on 2014-01-18 18:38
> Could you show the current whole your code?
> It will be a good start point to improve it.
>
I found an example about list store and solved my problem.

https://github.com/ruby-gnome2/ruby-gnome2/blob/ma...

Thanks.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.