You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(10) |
Jul
(15) |
Aug
(28) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(3) |
Feb
|
Mar
(5) |
Apr
(2) |
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Masao M. <mu...@hi...> - 2002-07-23 05:53:46
|
Hi, On Thu, 11 Jul 2002 23:26:08 +0900 Masao Mutoh <mu...@hi...> wrote: > Hi, > > --------------------------------------- > > require 'gnome' > > Gtk::Window.new.set_title(ARGV[0]).show > > Gtk.main > > --------------------------------------- > > $ruby test.rb --help > > > > Certainly there is the possibility to add own arguments > > I don't know - do you? > > Hmm.... This is very difficult problem... > > I think it is better to implement Gnome#init which can > accept arguments. So the code is like as follows: I implemented it in CVS. *** NOTICE ****************************************************** Since next release, Ruby/GNOME Applications will have to call Gnome.init at first as follows: Gnome.init("your app name", "your app version") ***************************************************************** ------- Gnome.init initialize Gnome libraries and parse command line argument. So if you use Ruby/GNOME, you should call this at first. # sample/gnome-init-popt.rb is sample script for this. Sample: options = [ ["label", 'l', Gnome::POPT_ARG_STRING, "Hello World", "Set button label", "label"], ["width", 'w', Gnome::POPT_ARG_INT, 300, "Set window width", "width"], ["height", 'h', Gnome::POPT_ARG_INT, 200, "Set window height", "height"], ["border", 'b', Gnome::POPT_ARG_NONE, nil, "Remove window border"] ] args = Gnome.init("gnome-init-popt", "1.0", options) ---- * 1st parameter is application name, 2nd parameter is application version. * options is omissible. If you want to get command line parameter, you should use this. options format is: [long name, short name, type, default value, descrip, argsDescrip] (a)longName --label=hello --width=200, --height=100, --border. (b)shortName -l hello, -w 200, -h 100, -b (c)type Gnome::POPT_ARG_STRING means the option takes a string argument --label=hello Gnome::POPT_ARG_INT means the option takes an int argument --width=200 Gnome::POPT_ARG_NONE means the option is a simple switch, it takes no argument. (d)defaultValue If the option is not set in command line, this value is returned. When type is Gnome:POPT_ARG_NONE you can omit this. (e)description(omissible) describes an option. (f)argsDescrip(omissible) describes the argument to that option. Call the Ruby/GNOME application(like this sample) with --help, you can see: gnome-init-popt options -l, --label=label Set button label -w, --width=width Set window width -h, --height=height Set window height -b, --border Remove window border <<application name>> options -shortName, --longName=argsDescrip desciption * Return values Gnome.init return Hash value. There are two types of return value. 1st is option type, and other is no option type. ruby test.rb --label="Hello World" hoge fuga In this example, --label="Hello World" is option type, and hoge, fuga is no option type. option type can get value by longName. args["label"] #=> "Hello World". no option type get array by "args" args["args"] #=> ["hoge", "fuga"] "args" is reserved, so you can't use "args" for your own option. And POPT_ARGS is constatns of "args" So you can write as follows: args[Gnome::POPT_ARGS] #=> ["hoge", "fuga"] Cheers, -- .:% Masao Mutoh<mu...@hi...> |
From: Masao M. <mu...@hi...> - 2002-07-11 14:26:15
|
Hi, On Thu, 11 Jul 2002 14:15:02 +0200 Matthias Veit <mat...@ya...> wrote: > >>>> MM == Masao Mutoh <mu...@hi...> wrote: > I have the problem, because I use the gnome bindings. > Gnome intercepts the argument processing: > > test.rb > --------------------------------------- > require 'gnome' > Gtk::Window.new.set_title(ARGV[0]).show > Gtk.main > --------------------------------------- > $ruby test.rb --help > > Certainly there is the possibility to add own arguments > I don't know - do you? Hmm.... This is very difficult problem... I think it is better to implement Gnome#init which can accept arguments. So the code is like as follows: ----------- require 'gnome' options = [ ['foo','f',Gnome::POPT_ARG_NONE, .... ] ['bar','b',Gnome::POPT_ARG_STRING, .... ]] args = Gnome.init("ApplicationName", "1.0", options) Gtk::Window.new.set_title(args['bar']).show ... Gtk.main ----------- But this is big change for Ruby/GNOME. I think I should implement like this in Ruby/GNOME2. But ... Should I implement this for Ruby/GNOME ? -- .:% Masao Mutoh<mu...@hi...> |
From: Matthias V. <mat...@ya...> - 2002-07-11 12:18:32
|
>>>> MM == Masao Mutoh <mu...@hi...> wrote: MM> If you want to pass arguments from the command when you MM> execute the application, you can use ARGV. MM> MM> test.rb MM> ------------------ MM> require 'gtk' MM> Gtk::Window.new.set_title(ARGV[0]).show MM> Gtk.main MM> ------------------ MM> MM> $ruby test.rb "Ruby/GTK" MM> MM> or parsearg.rb, getoptlong.rb is more useful. MM> MM> Cheers, MM> Masao. Hi Masao, thank you for the fast answer. My problem description was not very exactly: I have the problem, because I use the gnome bindings. Gnome intercepts the argument processing: test.rb --------------------------------------- require 'gnome' Gtk::Window.new.set_title(ARGV[0]).show Gtk.main --------------------------------------- $ruby test.rb --help Certainly there is the possibility to add own arguments I don't know - do you? Best Regards, Matthias _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Masao M. <mu...@hi...> - 2002-07-11 11:55:57
|
Hi, On Thu, 11 Jul 2002 12:04:09 +0200 Matthias Veit <mat...@ya...> wrote: > Hi, > > I want to pass arguments from the command line to my > ruby/gtk application. > Anybody knows, how is it possible to add such arguments? If you want to pass arguments from the command when you execute the application, you can use ARGV. test.rb ------------------ require 'gtk' Gtk::Window.new.set_title(ARGV[0]).show Gtk.main ------------------ $ruby test.rb "Ruby/GTK" or parsearg.rb, getoptlong.rb is more useful. Cheers, Masao. -- .:% Masao Mutoh<mu...@hi...> |
From: Matthias V. <mat...@ya...> - 2002-07-11 10:07:41
|
Hi, I want to pass arguments from the command line to my ruby/gtk application. Anybody knows, how is it possible to add such arguments? Best Regards, Matthias _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Masao M. <mu...@hi...> - 2002-07-07 16:19:30
|
Hi, On Mon, 8 Jul 2002 00:56:44 +0900 Masao Mutoh <mu...@hi...> wrote: > Hi, > On Sun, 7 Jul 2002 14:47:59 +0200 > Matthias Veit <mat...@ya...> wrote: > I agree. > But after your patch was applied, your sample program occurs another error > like bellow when I clicked "Press me" twice: > > Gtk-CRITICAL **: file gtkcontainer.c: line 730 (gtk_container_remove): > assertion `widget->parent == GTK_WIDGET (container)' failed. Oops! sample code was remove button twice. It was correct behaviour I think. It works fine except get_widget(self)->parent = NULL; So I applied your original patch in CVS. (Though I changed some coding style) Thanks. -- .:% Masao Mutoh<mu...@hi...> |
From: Masao M. <mu...@hi...> - 2002-07-07 15:59:18
|
Hi, On Sun, 7 Jul 2002 14:47:59 +0200 Matthias Veit <mat...@ya...> wrote: > >>>> MM == Masao Mutoh <mu...@hi...> wrote: > Reference counting should not be the task of ruby/gtk users - I agree. > I just think, that the C-Wrapper has to deal with those tasks: Thanks, > If a widget is removed via gtk_container_remove, the widget will be destroyed > (this is the valid behavior of gtk). To prevent this (the ruby reference is > still valid) a gtk_widget_ref must be invoked before - what is a common approach > in the plain C-world. > > rbgtkcontainer.c line 53 ff: > > static VALUE > cont_remove(self, other) > VALUE self, other; > { > gtk_widget_ref(GTK_WIDGET(get_widget(other))); // <-- important!!! > gtk_container_remove(GTK_CONTAINER(get_widget(self)), get_widget(other)); > return self; > } > > The example above will now work, but the gtk-widgets reference counter will > never touch zero again... I agree. But after your patch was applied, your sample program occurs another error like bellow when I clicked "Press me" twice: Gtk-CRITICAL **: file gtkcontainer.c: line 730 (gtk_container_remove): assertion `widget->parent == GTK_WIDGET (container)' failed. I thought after gtk_container_remove, get_widget(other)->parent must be set NULL. But the code which I applied did not work well. Ummmm...... #If I can fix this problem, I will apply this patch to CVS. > A more general solution could be to increment the reference counter, whenever > a ruby/gtk-widget is created (via gtk_widget_ref). The reference counter must be > decremented (gtk_widget_unref) via finalization - in my opinion the most > versatile approach. I agree. But I think some methods(like gtk_container_remove) may have same problems. > I don't know a lot of ruby/gtk, if this is a problem - what is your opinion? I agree your opinion though I don't know ruby-gtk well too :-<. Cheers, -- .:% Masao Mutoh<mu...@hi...> |
From: Matthias V. <mat...@ya...> - 2002-07-07 12:51:25
|
>>>> MM == Masao Mutoh <mu...@hi...> wrote: MM> I think Ruby/GTK's implement is bad now, because it can't keep MM> object strictly as follows: MM> 1. When ruby wrapper is finalized, gtk-object should be MM> finalized(destroyed). MM> 2. When gtk-object is destroyed(finalized), ruby wrapper MM> shuold be finalized. MM> MM> > - then a simple ref, before delete is a fast solution. MM> MM> ref/unref system is too complicated. MM> I want to hide them from Ruby/GTK's user. MM> So I will not support ref/unref methods obviously in Ruby/GTK an Ruby/GTK2. MM> MM> > PS: simple test script is attached - a click on 'press me' will fail MM> MM> Hmm, I think Gtk::Container#remove destroy child is strange. MM> MM> button1.signal_connect('clicked') { |*args| MM> hbox.remove(button2) MM> puts button2.clicked() #<- Destroyed? why? MM> } MM> MM> Any comments/ideas? MM> Hi Masao, Reference counting should not be the task of ruby/gtk users - I agree. I just think, that the C-Wrapper has to deal with those tasks: If a widget is removed via gtk_container_remove, the widget will be destroyed (this is the valid behavior of gtk). To prevent this (the ruby reference is still valid) a gtk_widget_ref must be invoked before - what is a common approach in the plain C-world. rbgtkcontainer.c line 53 ff: static VALUE cont_remove(self, other) VALUE self, other; { gtk_widget_ref(GTK_WIDGET(get_widget(other))); // <-- important!!! gtk_container_remove(GTK_CONTAINER(get_widget(self)), get_widget(other)); return self; } The example above will now work, but the gtk-widgets reference counter will never touch zero again... A more general solution could be to increment the reference counter, whenever a ruby/gtk-widget is created (via gtk_widget_ref). The reference counter must be decremented (gtk_widget_unref) via finalization - in my opinion the most versatile approach. I don't know a lot of ruby/gtk, if this is a problem - what is your opinion? Best Regards, Matthias _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Masao M. <mu...@hi...> - 2002-07-05 16:28:15
|
Hi, On Thu, 4 Jul 2002 18:21:27 +0200 Matthias Veit <mat...@ya...> wrote: > > Hi, > Now, the gtk object predefined1 is destroyed, what is really not > intended, because it shall be possible to add predefined1 to window > again - what is not possible. > > This situation works in C only, if I ref (gtk_widget_ref) predefined1 > before delete - but there is no pendant in ruby-gtk. > Because I have a valid ruby-reference, this is not really straight. > > Do I make something wrong? I think Ruby/GTK's implement is bad now, because it can't keep object strictly as follows: 1. When ruby wrapper is finalized, gtk-object should be finalized(destroyed). 2. When gtk-object is destroyed(finalized), ruby wrapper shuold be finalized. > - then a simple ref, before delete is a fast solution. ref/unref system is too complicated. I want to hide them from Ruby/GTK's users. So I will not support ref/unref methods obviously in Ruby/GTK an Ruby/GTK2. > PS: simple test script is attached - a click on 'press me' will fail Hmm, I think Gtk::Container#remove destroy child is strange. button1.signal_connect('clicked') { |*args| hbox.remove(button2) puts button2.clicked() #<- Destroyed? why? } Same code in Ruby: str = "test" hbox = Array.new hbox.push(str) #Same as Gtk::Container#add hbox.delete(str) #Same as Gtk::Container#remove p str # -> "test" not destroyed. So I think it is better not to destroy gtk-object in Gtk::Container#remove. Any comments/ideas? -- .:% Masao Mutoh<mu...@hi...> |
From: Matthias V. <mat...@ya...> - 2002-07-04 16:24:50
|
Hi, I try to build a window, with changeable content. To achieve this, I have defined some widgets that are made visible inside a container - each at a time. Assume this: predefined_widget1 = ... predefined_widget2 = ... window = Gtk::Window.new(Gtk::WINDOW_TOPLEVEL) window.add(predefined1) window.show later I will do that: window.delete(predefined1) window.add(predefined2) Now, the gtk object predefined1 is destroyed, what is really not intended, because it shall be possible to add predefined1 to window again - what is not possible. This situation works in C only, if I ref (gtk_widget_ref) predefined1 before delete - but there is no pendant in ruby-gtk. Because I have a valid ruby-reference, this is not really straight. Do I make something wrong? Gets every gtk-object destroyed, while its ruby wrapper is finalized? - then a simple ref, before delete is a fast solution. Best regards, Matthias PS: simple test script is attached - a click on 'press me' will fail |
From: Masao M. <mu...@hi...> - 2002-06-30 15:11:29
|
Hi, All. Ruby-GNOME-0.29 and Ruby/GTK-0.29 are now available! Enjoy it! -- .:% Masao Mutoh<mu...@hi...> |
From: Masao M. <mu...@hi...> - 2002-06-22 03:13:34
|
Hi, On Fri, 21 Jun 2002 01:33:05 +0800 "Ariff Abdullah" <sky...@ti...> wrote: > Anybody have written full blown apps using ruby-gtk ? > I've already written a windows-explorer alike file manager. It's > useable right now (and I really love to share it with all of you!). I Cool! > just hope somebody can add 'gdk_window_set_static_gravities' to > Gdk::Window, because currently I'm using teribbly hacked module. Just > to inform you guys, before it goes out of alpha OK, I implemented it just now in the latest CVS. BTW, How is 'gdk_window_set_static_gravities' used for? #Sorry, but I have never used it:->. Cheers, Masao -- .:% Masao Mutoh<mu...@hi...> |
From: Ariff A. <sky...@ti...> - 2002-06-20 17:34:31
|
Anybody have written full blown apps using ruby-gtk ? I've already written a windows-explorer alike file manager. It's useable right now (and I really love to share it with all of you!). I just hope somebody can add 'gdk_window_set_static_gravities' to Gdk::Window, because currently I'm using teribbly hacked module. Just to inform you guys, before it goes out of alpha |
From: Masao M. <mu...@hi...> - 2002-06-15 12:20:50
|
Hi, On Sat, 15 Jun 2002 13:29:48 +0200 mips <mi...@cy...> wrote: > >Please tell me what is wrong again. > >I want to see complete a sample or a correct patch, if possible. > > The code is correct but credits are at least incomplete. > Like you can see in the given URL, patch has been first submited by > mi...@cy... and additionnal changes were provided by Guy > Decoux and Nobuyoshi Nakada. > This is maybe stupid behavior, but i'm really unhappy to see that all > the bug-tracking and fixing work is not well credited. Oops, I'm so sorry. I revised Changelog. Please check it. But I think your comment was unkindly for some guys who don't understand English well. Cheers, Masao. -- .:% Masao Mutoh<mu...@hi...> |
From: mips <mi...@cy...> - 2002-06-15 11:25:14
|
>Hi, > >On Sun, 2 Jun 2002 19:01:58 +0200 >mips wrote: > >> We can read : >> "Sun May 27 01:04:09 2002 Masao Mutoh >> >> * src/rbgtkmenu.c: BugFix for Gtk::Menu#popup's segfault >> ([ruby-talk:40381] by Nobuyoshi Nakada >> )" >> >> This is false, you've not read the entire thread. > >Sorry, but I'm not sure what is wrong yet. > >Please tell me what is wrong again. >I want to see complete a sample or a correct patch, if possible. The code is correct but credits are at least incomplete. Like you can see in the given URL, patch has been first submited by mi...@cy... and additionnal changes were provided by Guy Decoux and Nobuyoshi Nakada. This is maybe stupid behavior, but i'm really unhappy to see that all the bug-tracking and fixing work is not well credited. mips |
From: <mu...@hi...> - 2002-06-11 07:56:44
|
Hi, > GTK 2.0 is stable and Gnome 2.0 is coming up. > Are there any plans to port to the new platform? Yes. If you are interested in Ruby/GTK-2.0, Ruby/GNOME-2.0, see Ruby-GNOME2(http://sourceforge.net/projects/ruby-gnome2/). There are also Ruby-GNOME2 Mailing list though it is for Ruby-GNOME2 developers only. > It would be perfect, to have the gal (libgal) wigets wrapped > - is there someone on the road? I think I will do it, but I don't have enough time now. > I've seen, that the fox-toolkit uses swig for wrapper-generation > - is this an interesting option? > - is there someone with experience? When I started Ruby-GNOME2, I evaluted 3 way to implement it. 1. implement it by hand(same as Ruby-GNOME) 2. using SWIG 3. using *.defs(like python-gtk) Then I decided it was better way to use 1. So we have started to implement Ruby-GNOME2 by hand. Regards, Masao |
From: Matthias V. <mat...@ya...> - 2002-06-11 06:29:48
|
Hi, GTK 2.0 is stable and Gnome 2.0 is coming up. Are there any plans to port to the new platform? It would be perfect, to have the gal (libgal) wigets wrapped - is there someone on the road? I've seen, that the fox-toolkit uses swig for wrapper-generation - is this an interesting option? - is there someone with experience? Best Regards, Matthias _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Masao M. <mu...@hi...> - 2002-06-03 12:48:30
|
Hi, On Sun, 2 Jun 2002 19:01:58 +0200 mips <mi...@cy...> wrote: > We can read : > "Sun May 27 01:04:09 2002 Masao Mutoh <mu...@hi...> > > * src/rbgtkmenu.c: BugFix for Gtk::Menu#popup's segfault > ([ruby-talk:40381] by Nobuyoshi Nakada > <nob...@ni...>)" > > This is false, you've not read the entire thread. Sorry, but I'm not sure what is wrong yet. Please tell me what is wrong again. I want to see complete a sample or a correct patch, if possible. Cheers, -- .:% Masao Mutoh<mu...@hi...> |
From: mips <mi...@cy...> - 2002-06-02 16:57:59
|
We can read : "Sun May 27 01:04:09 2002 Masao Mutoh <mu...@hi...> * src/rbgtkmenu.c: BugFix for Gtk::Menu#popup's segfault ([ruby-talk:40381] by Nobuyoshi Nakada <nob...@ni...>)" This is false, you've not read the entire thread. http://groups.google.fr/groups?hl=fr&lr=&th=eafccf640f37ad99&seekm=200205150250.g4F2oiY05308%40sharui.nakada.kanuma.tochigi.jp&frame=off mips |
From: Masao M. <mu...@hi...> - 2002-06-01 05:53:30
|
Hi, All. I'm new maintainer of Ruby-GNOME. I'm happy to announce to release new version of Ruby-GNOME. OK, now Ruby-GNOME-0.28 and Ruby/GTK-0.28 are available! Enjoy it! -- .:% Masao Mutoh<mu...@hi...> |
From: Masao M. <mu...@hi...> - 2002-05-26 04:13:26
|
Hi, I'm the maintainer of Ruby-GNOME. This ML is for Ruby-GNOME user. If you are interested in Ruby-GNOME, join this ML! -- .:% Masao Mutoh<mu...@hi...> |
From: Masao M. <mu...@hi...> - 2002-05-26 04:11:18
|
むとうです。 Ruby-GNOMEユーザ向けのメーリングリストをスタートさせました。 興味のある方は是非参加してください。 -- .:% Masao Mutoh<mu...@hi...> |