You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(6) |
Sep
(16) |
Oct
(36) |
Nov
(85) |
Dec
(151) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(49) |
Feb
(51) |
Mar
(71) |
Apr
(87) |
May
(91) |
Jun
(93) |
Jul
(160) |
Aug
(229) |
Sep
(85) |
Oct
(89) |
Nov
(85) |
Dec
(98) |
2004 |
Jan
(40) |
Feb
(98) |
Mar
(149) |
Apr
(106) |
May
(153) |
Jun
(77) |
Jul
(85) |
Aug
(55) |
Sep
(50) |
Oct
(53) |
Nov
(83) |
Dec
(32) |
2005 |
Jan
(97) |
Feb
(124) |
Mar
(60) |
Apr
(79) |
May
(55) |
Jun
(62) |
Jul
(70) |
Aug
(130) |
Sep
(115) |
Oct
(32) |
Nov
(46) |
Dec
(54) |
2006 |
Jan
(114) |
Feb
(78) |
Mar
(37) |
Apr
(54) |
May
(82) |
Jun
(34) |
Jul
(54) |
Aug
(50) |
Sep
(26) |
Oct
(46) |
Nov
(105) |
Dec
(83) |
2007 |
Jan
(105) |
Feb
(64) |
Mar
(57) |
Apr
(20) |
May
(18) |
Jun
(80) |
Jul
(108) |
Aug
(26) |
Sep
(36) |
Oct
(49) |
Nov
(94) |
Dec
(46) |
2008 |
Jan
(24) |
Feb
(24) |
Mar
(200) |
Apr
(92) |
May
(112) |
Jun
(54) |
Jul
(41) |
Aug
(50) |
Sep
(66) |
Oct
(82) |
Nov
(15) |
Dec
(44) |
2009 |
Jan
(68) |
Feb
(34) |
Mar
(55) |
Apr
(50) |
May
(95) |
Jun
(33) |
Jul
(24) |
Aug
(40) |
Sep
(61) |
Oct
(33) |
Nov
(7) |
Dec
(61) |
2010 |
Jan
(18) |
Feb
(47) |
Mar
(24) |
Apr
(24) |
May
(42) |
Jun
(59) |
Jul
(28) |
Aug
(23) |
Sep
(55) |
Oct
(102) |
Nov
(33) |
Dec
(11) |
2011 |
Jan
(37) |
Feb
(115) |
Mar
(96) |
Apr
(37) |
May
(8) |
Jun
(13) |
Jul
(7) |
Aug
(61) |
Sep
(143) |
Oct
(78) |
Nov
(14) |
Dec
(33) |
2012 |
Jan
(49) |
Feb
(57) |
Mar
(62) |
Apr
(38) |
May
(26) |
Jun
(16) |
Jul
(12) |
Aug
(10) |
Sep
(8) |
Oct
(12) |
Nov
(38) |
Dec
(25) |
2013 |
Jan
(55) |
Feb
(53) |
Mar
(39) |
Apr
(37) |
May
(21) |
Jun
(4) |
Jul
(7) |
Aug
(8) |
Sep
(24) |
Oct
(17) |
Nov
(11) |
Dec
(81) |
2014 |
Jan
(22) |
Feb
(9) |
Mar
(29) |
Apr
(133) |
May
(12) |
Jun
(13) |
Jul
(5) |
Aug
(11) |
Sep
|
Oct
(10) |
Nov
(18) |
Dec
(1) |
2015 |
Jan
(18) |
Feb
(2) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(28) |
Oct
(15) |
Nov
(8) |
Dec
(7) |
2016 |
Jan
(19) |
Feb
|
Mar
|
Apr
(1) |
May
(10) |
Jun
(3) |
Jul
(19) |
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(9) |
Dec
|
2017 |
Jan
|
Feb
(18) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(2) |
Dec
|
From: John L. <jo...@la...> - 2017-02-27 14:33:02
|
Are there any Ruby bindings for Keybinder ? (https://lazka.github.io/pgi-docs/#Keybinder-3.0) Assuming there isn't, I've started to put one together using FFI. |
From: John L. <jo...@la...> - 2017-02-25 23:23:37
|
On 25/02/17 09:24, cedlemo wrote: > Why not trying to define the window as a dock like this : > > win.window.type_hint = :dock I am doing that but the hints are still required - without them no space is reserved for the dock. https://gist.github.com/db6bf5247058e32ffa5d794af37b80a3 > > Since Gtk support Xlib, Xcb and wayland, the api tend to be more generic. > That's why I'd hoped for a Gtk solution without having to dip into Xlib (although, for my immediate needs, depending on Xlib isn't an issue for me) |
From: cedlemo <ce...@gm...> - 2017-02-25 09:24:50
|
Why not trying to define the window as a dock like this : require "gtk3" win = Gtk::Window.new button = Gtk::Button.new(:label => "quit") button.signal_connect "clicked" do Gtk.main_quit end win.add(button) win.show_all win.window.type_hint = :dock Gtk.main Since Gtk support Xlib, Xcb and wayland, the api tend to be more generic. cedlemo On 24/02/2017 16:38, John Lane wrote: > On 24/02/17 13:44, cedlemo wrote: >> Jhon, >> >> after looking at the documentation >> https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html >> and at the Gdk code : >> https://github.com/GNOME/gtk/blob/master/gdk/x11/gdkwindow-x11.c >> it seems that Gdk does not provide the api you want. >> >> Can I ask you what do you want to do ? why do you want to set the window >> manager hints ? Do you really need them ? >> Could you not do what you want with the available api without settings >> the window manager hints ? >> > I'm trying to write a dock-like app that puts a bar across the top of > the screen and I want to reserve space for it so that it isn't obscured > by maximised windows. > > I have two ways to achieve what I want but I had hoped to be able to use > the Gtk bindings because it would be neater. I also evaluated the Python > Gtk2 bindings (property_change[1]) and that does support this. > > Here's what I can do in Ruby: > > There is an Xlib API (require 'xlib-objects' [2]) that allows you to do > this: > > topw = XlibObj::Window.new(XlibObj::Display.new(':0') > ,toplevel.window.xid) > XlibObj::Window::Property.new(topw, '_NET_WM_STRUT').set( > [0, 0, self.height, 0 ], > :CARDINAL) > XlibObj::Window::Property.new(topw, '_NET_WM_STRUT_PARTIAL').set( > [0, 0, self.height, 0, 0, 0, 0, 0, x, x+width-1, 0, 0], > :CARDINAL) > > The other way is to run xbind[3] in a subshell: > > xid = toplevel.window.xid > system %Q{xprop -id #{xid} -format _NET_WM_STRUT 32c \ > -set _NET_WM_STRUT \ > "0, 0, #{self.height}, 0"} > system %Q{xprop -id #{xid} -format _NET_WM_STRUT_PARTIAL 32c \ > -set _NET_WM_STRUT_PARTIAL \ > "0, 0, #{self.height}, 0, 0, 0, 0, 0, #{x}, #{x+width-1}, > 0, 0"} > > So I have solutions that work. Thanks for taking the time to look into > it for me. > > John > > > [1] > http://pygtk.org/pygtk2reference/class-gdkwindow.html#method-gdkwindow--property-change > [2] https://rubygems.org/gems/xlib-objects > [3] https://www.x.org/archive/X11R7.5/doc/man/man1/xprop.1.html > > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: John L. <jo...@la...> - 2017-02-24 15:38:44
|
On 24/02/17 13:44, cedlemo wrote: > Jhon, > > after looking at the documentation > https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html > and at the Gdk code : > https://github.com/GNOME/gtk/blob/master/gdk/x11/gdkwindow-x11.c > it seems that Gdk does not provide the api you want. > > Can I ask you what do you want to do ? why do you want to set the window > manager hints ? Do you really need them ? > Could you not do what you want with the available api without settings > the window manager hints ? > I'm trying to write a dock-like app that puts a bar across the top of the screen and I want to reserve space for it so that it isn't obscured by maximised windows. I have two ways to achieve what I want but I had hoped to be able to use the Gtk bindings because it would be neater. I also evaluated the Python Gtk2 bindings (property_change[1]) and that does support this. Here's what I can do in Ruby: There is an Xlib API (require 'xlib-objects' [2]) that allows you to do this: topw = XlibObj::Window.new(XlibObj::Display.new(':0') ,toplevel.window.xid) XlibObj::Window::Property.new(topw, '_NET_WM_STRUT').set( [0, 0, self.height, 0 ], :CARDINAL) XlibObj::Window::Property.new(topw, '_NET_WM_STRUT_PARTIAL').set( [0, 0, self.height, 0, 0, 0, 0, 0, x, x+width-1, 0, 0], :CARDINAL) The other way is to run xbind[3] in a subshell: xid = toplevel.window.xid system %Q{xprop -id #{xid} -format _NET_WM_STRUT 32c \ -set _NET_WM_STRUT \ "0, 0, #{self.height}, 0"} system %Q{xprop -id #{xid} -format _NET_WM_STRUT_PARTIAL 32c \ -set _NET_WM_STRUT_PARTIAL \ "0, 0, #{self.height}, 0, 0, 0, 0, 0, #{x}, #{x+width-1}, 0, 0"} So I have solutions that work. Thanks for taking the time to look into it for me. John [1] http://pygtk.org/pygtk2reference/class-gdkwindow.html#method-gdkwindow--property-change [2] https://rubygems.org/gems/xlib-objects [3] https://www.x.org/archive/X11R7.5/doc/man/man1/xprop.1.html |
From: cedlemo <ce...@gm...> - 2017-02-24 13:44:48
|
Jhon, after looking at the documentation https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html and at the Gdk code : https://github.com/GNOME/gtk/blob/master/gdk/x11/gdkwindow-x11.c it seems that Gdk does not provide the api you want. Can I ask you what do you want to do ? why do you want to set the window manager hints ? Do you really need them ? Could you not do what you want with the available api without settings the window manager hints ? cedlemo On 24/02/2017 12:43, John Lane wrote: > On 22/02/17 11:02, John Lane wrote: >> I'd like to set window properties, specifically window manager hints >> (such as _NET_WM_STRUT_PARTIAL). However, I cannot find an appropriate >> method on Gdk.Window to do this. I would expect to be able to write >> something like >> >> topw = toplevel.window >> topw.property_change("_NET_WM_STRUT","CARDINAL",32, >> Gdk::PROP_MODE_REPLACE, >> [0, 0, bar_size, 0]) >> topw.property_change("_NET_WM_STRUT_PARTIAL","CARDINAL",32, >> Gdk::PROP_MODE_REPLACE, >> [0, 0, bar_size, 0, 0, 0, 0, 0, x, x+width-1, 0, 0]) >> >> >> (I looked for methods like this `topw.methods.sort.each{|m| p m}`) >> >> I can see in the source code that there is a commented-out TODO block >> in file gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c with a call to >> `gdk_property_change`. That's the only mention I can find. I expect this >> means it's unimplemented ? >> > Further to this, I now realise that the 'property_change' function is > set in the Gtk C source code to be non-introspectable which means that > this method is not available in Gtk3 bindings. > > However, I also cannot find it in Ruby Gtk2. It is definitely supported > by Gtk2 and it is present in the gem source 'ext/gtk2/rbgdkproperty.c'. > The underlying Gtk2 C function is `gdk_property_change`. > > The below should be valid for Gtk2 Ruby. The constant > 'Gdk::Property::MODE_REPLACE' does exist but I cannot find the > 'property_change' method. I expected to find it at > 'Gdk::Window.property_change'. > > topw = toplevel.window > topw.property_change("_NET_WM_STRUT","CARDINAL",32, > Gdk::Property::MODE_REPLACE, > [0, 0, bar_size, 0]) > topw.property_change("_NET_WM_STRUT_PARTIAL","CARDINAL",32, > Gdk::Property::MODE_REPLACE, > [0, 0, bar_size, 0, 0, 0, 0, 0, x, x+width-1, 0, 0]) > > I expected to find it at Gdk.Window.property_change > > Is it there, if so, where? > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: John L. <jo...@la...> - 2017-02-24 11:44:01
|
On 22/02/17 11:02, John Lane wrote: > I'd like to set window properties, specifically window manager hints > (such as _NET_WM_STRUT_PARTIAL). However, I cannot find an appropriate > method on Gdk.Window to do this. I would expect to be able to write > something like > > topw = toplevel.window > topw.property_change("_NET_WM_STRUT","CARDINAL",32, > Gdk::PROP_MODE_REPLACE, > [0, 0, bar_size, 0]) > topw.property_change("_NET_WM_STRUT_PARTIAL","CARDINAL",32, > Gdk::PROP_MODE_REPLACE, > [0, 0, bar_size, 0, 0, 0, 0, 0, x, x+width-1, 0, 0]) > > > (I looked for methods like this `topw.methods.sort.each{|m| p m}`) > > I can see in the source code that there is a commented-out TODO block > in file gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c with a call to > `gdk_property_change`. That's the only mention I can find. I expect this > means it's unimplemented ? > Further to this, I now realise that the 'property_change' function is set in the Gtk C source code to be non-introspectable which means that this method is not available in Gtk3 bindings. However, I also cannot find it in Ruby Gtk2. It is definitely supported by Gtk2 and it is present in the gem source 'ext/gtk2/rbgdkproperty.c'. The underlying Gtk2 C function is `gdk_property_change`. The below should be valid for Gtk2 Ruby. The constant 'Gdk::Property::MODE_REPLACE' does exist but I cannot find the 'property_change' method. I expected to find it at 'Gdk::Window.property_change'. topw = toplevel.window topw.property_change("_NET_WM_STRUT","CARDINAL",32, Gdk::Property::MODE_REPLACE, [0, 0, bar_size, 0]) topw.property_change("_NET_WM_STRUT_PARTIAL","CARDINAL",32, Gdk::Property::MODE_REPLACE, [0, 0, bar_size, 0, 0, 0, 0, 0, x, x+width-1, 0, 0]) I expected to find it at Gdk.Window.property_change Is it there, if so, where? |
From: John L. <jo...@la...> - 2017-02-22 11:02:33
|
I'd like to set window properties, specifically window manager hints (such as _NET_WM_STRUT_PARTIAL). However, I cannot find an appropriate method on Gdk.Window to do this. I would expect to be able to write something like topw = toplevel.window topw.property_change("_NET_WM_STRUT","CARDINAL",32, Gdk::PROP_MODE_REPLACE, [0, 0, bar_size, 0]) topw.property_change("_NET_WM_STRUT_PARTIAL","CARDINAL",32, Gdk::PROP_MODE_REPLACE, [0, 0, bar_size, 0, 0, 0, 0, 0, x, x+width-1, 0, 0]) (I looked for methods like this `topw.methods.sort.each{|m| p m}`) I can see in the source code that there is a commented-out TODO block in file gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c with a call to `gdk_property_change`. That's the only mention I can find. I expect this means it's unimplemented ? |
From: John L. <jo...@la...> - 2017-02-22 09:34:22
|
Thanks Cedlemo, Issue #999 raised on Github https://github.com/ruby-gnome2/ruby-gnome2/issues/999 On 21/02/17 21:38, cedlemo wrote: > Hi John, > > It seems that it is not yet supported in the Gdk gem. Maybe we will just > have to create a GObjectIntrospection > loader for GdkX11. > > > grep get_xid /usr/share/gir-1.0/* > > /usr/share/gir-1.0/GdkX11-2.0.gir: <function name="x11_drawable_get_xid" > /usr/share/gir-1.0/GdkX11-2.0.gir: c:identifier="gdk_x11_drawable_get_xid"> > /usr/share/gir-1.0/GdkX11-3.0.gir: <method name="get_xid" > c:identifier="gdk_x11_window_get_xid"> > /usr/share/gir-1.0/Wnck-3.0.gir: <method name="get_xid" > c:identifier="wnck_application_get_xid"> > /usr/share/gir-1.0/Wnck-3.0.gir: <method name="get_xid" > c:identifier="wnck_window_get_xid"> > > > Could you open an issue in github : > https://github.com/ruby-gnome2/ruby-gnome2/issues ? > > > Cedlemo > > > On 21/02/2017 21:53, John Lane wrote: >> I'm porting some code from Python to Ruby and need to get the xid of a >> window. I have the following original line of code (in Python): >> >> self.get_toplevel().get_window().get_xid() >> >> which I have coded in Ruby as >> >> toplevel.window.xid >> >> However I get >> >> undefined method `xid' for #<#<Class:0x000000038e40b0>:0x3975b00 >> ptr=0x28a64d0> (NoMethodError) >> >> The class is a subclass of Gtk::Window. >> >> I've seen other posts that indicate this should work. I can see xid >> defined in rbgdkx11x11window.c but surrounded by #ifdef >> GDK_WINDOWING_X11. I don't know if this is an issue with how the code >> was built ? >> >> I installed using `gem install gtk3`, have gdk3 (3.1.1). This is on an >> Arch Linux box with Ruby ruby 2.3.3p222 (2016-11-21 revision 56859) >> >> Thanks for any help. >> >> John >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> ruby-gnome2-devel-en mailing list >> rub...@li... >> https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |
From: cedlemo <ce...@gm...> - 2017-02-21 21:38:48
|
Hi John, It seems that it is not yet supported in the Gdk gem. Maybe we will just have to create a GObjectIntrospection loader for GdkX11. grep get_xid /usr/share/gir-1.0/* /usr/share/gir-1.0/GdkX11-2.0.gir: <function name="x11_drawable_get_xid" /usr/share/gir-1.0/GdkX11-2.0.gir: c:identifier="gdk_x11_drawable_get_xid"> /usr/share/gir-1.0/GdkX11-3.0.gir: <method name="get_xid" c:identifier="gdk_x11_window_get_xid"> /usr/share/gir-1.0/Wnck-3.0.gir: <method name="get_xid" c:identifier="wnck_application_get_xid"> /usr/share/gir-1.0/Wnck-3.0.gir: <method name="get_xid" c:identifier="wnck_window_get_xid"> Could you open an issue in github : https://github.com/ruby-gnome2/ruby-gnome2/issues ? Cedlemo On 21/02/2017 21:53, John Lane wrote: > I'm porting some code from Python to Ruby and need to get the xid of a > window. I have the following original line of code (in Python): > > self.get_toplevel().get_window().get_xid() > > which I have coded in Ruby as > > toplevel.window.xid > > However I get > > undefined method `xid' for #<#<Class:0x000000038e40b0>:0x3975b00 > ptr=0x28a64d0> (NoMethodError) > > The class is a subclass of Gtk::Window. > > I've seen other posts that indicate this should work. I can see xid > defined in rbgdkx11x11window.c but surrounded by #ifdef > GDK_WINDOWING_X11. I don't know if this is an issue with how the code > was built ? > > I installed using `gem install gtk3`, have gdk3 (3.1.1). This is on an > Arch Linux box with Ruby ruby 2.3.3p222 (2016-11-21 revision 56859) > > Thanks for any help. > > John > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: John L. <jo...@la...> - 2017-02-21 21:13:12
|
I'm porting some code from Python to Ruby and need to get the xid of a window. I have the following original line of code (in Python): self.get_toplevel().get_window().get_xid() which I have coded in Ruby as toplevel.window.xid However I get undefined method `xid' for #<#<Class:0x000000038e40b0>:0x3975b00 ptr=0x28a64d0> (NoMethodError) The class is a subclass of Gtk::Window. I've seen other posts that indicate this should work. I can see xid defined in rbgdkx11x11window.c but surrounded by #ifdef GDK_WINDOWING_X11. I don't know if this is an issue with how the code was built ? I installed using `gem install gtk3`, have gdk3 (3.1.1). This is on an Arch Linux box with Ruby ruby 2.3.3p222 (2016-11-21 revision 56859) Thanks for any help. John |
From: Detlef W. <det...@gm...> - 2016-11-18 05:18:30
|
Am 12.11.2016 um 07:52 schrieb Kouhei Sutou: > Hi, Hi, > > In <919...@gm...> > "[ruby-gnome2-devel-en] No Gdk::Window and Pixbuf not shown" on Fri, 11 Nov 2016 20:31:11 +0100, > Detlef Wagner <det...@gm...> wrote: > >> First: >> ====== >> >> require 'gtk3' >> >> win = Gtk::Window.new >> >> pixbuf = GdkPixbuf::Pixbuf.new :path => 'img.png', :width => 64, :height >> => 64 >> >> img = Gtk::Image.new >> img.pixbuf = pixbuf >> #img = Gtk::Image.new :file => 'img.png' >> >> win.add img >> win.show_all >> Gtk.main > > You should use :file instead of :path for GdkPixbuf::Pixbuf.new: > > GdkPixbuf::Pixbuf.new :file => 'img.png' > Stupid me. Thank you for the hint! Should GdkPixbuf::Pixbuf.new show a warning or throw an exception if parameters are not known? Like in Gtk::TreeViewColumn of the pull-request I created some days ago? > The API isn't changed at least in recent releases. Sorry, but I was not clear and right in the last message. First, the changes where not meant to be of ruby-gtk, but in Gtk+. Sorry for the noise. And then neither API nor ABI change, but change in behavior. More on this at the bottom. > >> Second: >> ======= >> >> require 'gtk3' >> >> win = Gtk::Window.new >> win.signal_connect(:draw) do >> p win.window.class >> end >> win.show_all >> Gtk.main >> >> >> The output is: >> #<Class:0x00000001f5b9b8> >> >> but I belief that it should be: >> Gdk::Window > > Try: > > win.signal_connect(:draw) do > p win.window.class > p win.window.class.gtype > p win.window.class.ancestors > end > > You'll get the following output: > > #<Class:0x0055ba4fe75b58> > GLib::Type["GdkX11Window"] > [#<Class:0x0055ba4fe75b58>, Gdk::Window, GLib::Object, GLib::Instantiatable, Object, Kernel, BasicObject] > > #<Class:0x0055ba4fe75b58> is a subclass of Gdk::Window. It > depends on your windows system. > Thank you for clarification. Looks a little bit strange to me, but I get it :-) > This API isn't also changed at least in recent releases. > >> And then I have the problem, that configure events in combination with >> Gtk::DrawingArea s are give not the right size of the area. But this is >> in a quite complex program and I first try to track it down. > > If we have a script that reproduce the problem, we may fix it. > It seems to be a change in Gtk+. The DrawingArea in placed in a Gtk::Paned. If I change the position of the paned with Gtk::Paned#position= on first start up _after_ Gtk::Window#show_all, I get a wrong size in the configure event. If I change the position before show_all, all is like expected. I will try to make a shall example of this. Thank you! Cheers, detlef >> For me, it seams that the gtk API and ABI compatibility is brocken :-( > > We should fix unexpected API incompatibilities. > > > Thanks, > -- > kou > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |
From: Kouhei S. <ko...@co...> - 2016-11-12 06:53:03
|
Hi, In <919...@gm...> "[ruby-gnome2-devel-en] No Gdk::Window and Pixbuf not shown" on Fri, 11 Nov 2016 20:31:11 +0100, Detlef Wagner <det...@gm...> wrote: > First: > ====== > > require 'gtk3' > > win = Gtk::Window.new > > pixbuf = GdkPixbuf::Pixbuf.new :path => 'img.png', :width => 64, :height > => 64 > > img = Gtk::Image.new > img.pixbuf = pixbuf > #img = Gtk::Image.new :file => 'img.png' > > win.add img > win.show_all > Gtk.main You should use :file instead of :path for GdkPixbuf::Pixbuf.new: GdkPixbuf::Pixbuf.new :file => 'img.png' The API isn't changed at least in recent releases. > Second: > ======= > > require 'gtk3' > > win = Gtk::Window.new > win.signal_connect(:draw) do > p win.window.class > end > win.show_all > Gtk.main > > > The output is: > #<Class:0x00000001f5b9b8> > > but I belief that it should be: > Gdk::Window Try: win.signal_connect(:draw) do p win.window.class p win.window.class.gtype p win.window.class.ancestors end You'll get the following output: #<Class:0x0055ba4fe75b58> GLib::Type["GdkX11Window"] [#<Class:0x0055ba4fe75b58>, Gdk::Window, GLib::Object, GLib::Instantiatable, Object, Kernel, BasicObject] #<Class:0x0055ba4fe75b58> is a subclass of Gdk::Window. It depends on your windows system. This API isn't also changed at least in recent releases. > And then I have the problem, that configure events in combination with > Gtk::DrawingArea s are give not the right size of the area. But this is > in a quite complex program and I first try to track it down. If we have a script that reproduce the problem, we may fix it. > For me, it seams that the gtk API and ABI compatibility is brocken :-( We should fix unexpected API incompatibilities. Thanks, -- kou |
From: Detlef W. <det...@gm...> - 2016-11-11 19:31:25
|
Hi, I have some problems since the update of gtk from 3.20 to 3.22 with ruby gtk programs. I have checked out the current master of ruby gnome and installed it. All other gtk applications (non-ruby) don't have the described problems. First: ====== require 'gtk3' win = Gtk::Window.new pixbuf = GdkPixbuf::Pixbuf.new :path => 'img.png', :width => 64, :height => 64 img = Gtk::Image.new img.pixbuf = pixbuf #img = Gtk::Image.new :file => 'img.png' win.add img win.show_all Gtk.main If I set the image from a pixbuf while creation of the image or after it, like in the sample above, no image is shown. If I specify the same image directly like in the commented out line, the image is shown as expected. Second: ======= require 'gtk3' win = Gtk::Window.new win.signal_connect(:draw) do p win.window.class end win.show_all Gtk.main The output is: #<Class:0x00000001f5b9b8> but I belief that it should be: Gdk::Window And then I have the problem, that configure events in combination with Gtk::DrawingArea s are give not the right size of the area. But this is in a quite complex program and I first try to track it down. For me, it seams that the gtk API and ABI compatibility is brocken :-( Can someone confirm this bugs? Tanks, detlef |
From: Detlef W. <det...@gm...> - 2016-11-09 16:45:34
|
Hi cedlemo, thank you for the hint! Cheers, detlef Am 09.11.2016 um 11:47 schrieb cedlemo: > Hi Detlef, > > Try this > > Gtk::Settings.default.gtk_font_name > > On 08/11/2016 19:43, Detlef Wagner wrote: >> Hi, >> >> how can I get the value of a Gtk::Settings property? I.e. I want the >> name of the font in use, so started with: >> >> irb(main):060:0* Gtk::Settings.property('gtk-font-name') >> => #<GLib::Param::String: Gtk::Settings#gtk-font-name> >> >> I expected here a Ruby String as the return value. Is it not implemented >> for now, or is there an other way to get the value? >> >> Tanks, detlef >> >> ------------------------------------------------------------------------------ >> Developer Access Program for Intel Xeon Phi Processors >> Access to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> ruby-gnome2-devel-en mailing list >> rub...@li... >> https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |
From: Kouhei S. <ko...@co...> - 2016-11-09 14:24:59
|
Hi, In <0ab...@gm...> "Re: [ruby-gnome2-devel-en] Gtk::TreeViewColumn initialization with area not possible" on Wed, 9 Nov 2016 11:57:47 +0100, cedlemo <ce...@gm...> wrote: > We could use this trick > > irb(main):001:0> def myfn(*args) > irb(main):002:1> puts args.size > irb(main):003:1> end > => :myfn > irb(main):004:0> myfn("arg1","arg2","arg3") > 3 > => nil > irb(main):005:0> myfn(:arg1 => "arg1", :arg2 => "arg3") > 1 > => nil > > If args size is equal to one then you use your code else you use the > previous code. This way allows us to implement the has form while > we keep the compatibility with the previous code. We have done done this > already in some of the ruby-gnome class but Kou would offer you > a better answer than me. I like cedlemo's approach. def initialize(*args) if args.size == 1 and args[0].is_a?(Hash) options = args[0] area = options[:area] renderer = options[:renderer] title = options[:title] attributes = options[:attributes] else area, renderer, attributes = args end attributes ||= {} # ... end Thanks, -- kou |
From: cedlemo <ce...@gm...> - 2016-11-09 10:58:02
|
We could use this trick irb(main):001:0> def myfn(*args) irb(main):002:1> puts args.size irb(main):003:1> end => :myfn irb(main):004:0> myfn("arg1","arg2","arg3") 3 => nil irb(main):005:0> myfn(:arg1 => "arg1", :arg2 => "arg3") 1 => nil If args size is equal to one then you use your code else you use the previous code. This way allows us to implement the has form while we keep the compatibility with the previous code. We have done done this already in some of the ruby-gnome class but Kou would offer you a better answer than me. cedlemo On 08/11/2016 19:43, Detlef Wagner wrote: > Hi, > > to the C function gtk_tree_view_column_new_with_area is no ruby > equivalent. I think, it is most useful to use an options hash for > initialize, like this: > > def initialize(options={}) > area = options[:area] > renderer = options[:renderer] > title = options[:title] > attributes = options[:attributes] || {} > > if area > initialize_new_with_area(area) > else > initialize_raw > end > set_title(title) if title > pack_start(renderer, true) if renderer > attributes.each_entry do |key, value| > add_attribute(cell, key, value) > end > end > > > But this would not be backward compatible. Any suggestions or opinions? > > Cheers, detlef > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: cedlemo <ce...@gm...> - 2016-11-09 10:47:27
|
Hi Detlef, Try this Gtk::Settings.default.gtk_font_name On 08/11/2016 19:43, Detlef Wagner wrote: > Hi, > > how can I get the value of a Gtk::Settings property? I.e. I want the > name of the font in use, so started with: > > irb(main):060:0* Gtk::Settings.property('gtk-font-name') > => #<GLib::Param::String: Gtk::Settings#gtk-font-name> > > I expected here a Ruby String as the return value. Is it not implemented > for now, or is there an other way to get the value? > > Tanks, detlef > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: Detlef W. <det...@gm...> - 2016-11-08 18:56:26
|
Hi, how can I get the value of a Gtk::Settings property? I.e. I want the name of the font in use, so started with: irb(main):060:0* Gtk::Settings.property('gtk-font-name') => #<GLib::Param::String: Gtk::Settings#gtk-font-name> I expected here a Ruby String as the return value. Is it not implemented for now, or is there an other way to get the value? Tanks, detlef |
From: Detlef W. <det...@gm...> - 2016-11-08 18:56:15
|
Hi, to the C function gtk_tree_view_column_new_with_area is no ruby equivalent. I think, it is most useful to use an options hash for initialize, like this: def initialize(options={}) area = options[:area] renderer = options[:renderer] title = options[:title] attributes = options[:attributes] || {} if area initialize_new_with_area(area) else initialize_raw end set_title(title) if title pack_start(renderer, true) if renderer attributes.each_entry do |key, value| add_attribute(cell, key, value) end end But this would not be backward compatible. Any suggestions or opinions? Cheers, detlef |
From: Kouhei S. <ko...@co...> - 2016-10-02 07:59:01
|
Hi, In <147...@an...> "Re: [ruby-gnome2-devel-en] Compile against Gtk 3.18 on windows" on Mon, 26 Sep 2016 15:19:50 +0000, ARNAUD Simon <Sim...@an...> wrote: > 4) Launch the compilation. > > At the moment, I'm stuck on a failing gtk-update-icon-cache. It calls the Linux binary, while it > compiled the windows one. This patch may help you: https://github.com/ruby-gnome2/ruby-gnome2/blob/88c0dac98468bd4b8cc67541a796edecdd659670/gdk3/patches/gtk%2B-3.16.6-add-missing-exeext.diff Thanks, -- kou |
From: ARNAUD S. <Sim...@an...> - 2016-09-26 15:19:58
|
Le mardi 20 septembre 2016 à 22:19 +0900, Kouhei Sutou a écrit : > Clone rcairo and ruby-gnome2: > > % git clone https://github.com/rcairo/rcairo.git > % git clone https://github.com/ruby-gnome2/ruby-gnome2.git > % cd ruby-gnome2 Here is what I've done so far. 1) Clone the repositories git clone https://github.com/ruby-gnome2/ruby-gnome2.git git clone https://github.com/rcairo/rcairo.git git clone https://github.com/ruby-gnome2/pkg-config.git 2) Change GTK and cairo version I had to go back to 3.16, as 3.18 needs cairo 1.15. In ruby-gnome2/gdk3/Rakefile, change 3.20 to 3.16. In ruby-gnome2/gtksourceview3, change 3.20 to 3.16. In rcairo/Rakefile, change 1.15 to 1.14. Commit everything. 3) Setup the host for vagrant Download and install the latest version. Provided packages are too old. Install vagrant-proxyconf to speed up downloads. 4) Launch the compilation. At the moment, I'm stuck on a failing gtk-update-icon-cache. It calls the Linux binary, while it compiled the windows one. Regards Simon Arnaud |
From: Mario S. <ma...@ru...> - 2016-09-20 16:12:12
|
Mario Steele Ruby Developer C# Developer Java Developer On Tue, Sep 20, 2016 at 9:19 AM, Kouhei Sutou <ko...@co...> wrote: > > And run the following commands: > > % gem install rake rake-comipler mechanize > (pkg-config and cairo may also be needed.) > % rake windows:build:win64 > That should be: % gem install rake rake-compiler mechanize Then run % rake windows:build:win64 |
From: Kouhei S. <ko...@co...> - 2016-09-20 13:35:51
|
Hi, In <147...@an...> "[ruby-gnome2-devel-en] Compile against Gtk 3.18 on windows" on Tue, 20 Sep 2016 13:12:12 +0000, ARNAUD Simon <Sim...@an...> wrote: > I'm wondering if it would be possible to provide ruby-gtk3 on windows compiled with Gtk 3.18, and > cairo 1.14. We don't do it. > If it's not possible, I would love pointers as how I can build them myself. Clone rcairo and ruby-gnome2: % git clone https://github.com/rcairo/rcairo.git % git clone https://github.com/ruby-gnome2/ruby-gnome2.git % cd ruby-gnome2 Change GTK+ version here: https://github.com/ruby-gnome2/ruby-gnome2/blob/master/gdk3/Rakefile#L62 And run the following commands: % gem install rake rake-comipler mechanize (pkg-config and cairo may also be needed.) % rake windows:build:win64 Thanks, -- kou |
From: ARNAUD S. <Sim...@an...> - 2016-09-20 13:12:21
|
Hi Following those bugs I reported : https://github.com/rcairo/rcairo/issues/41 https://github.com/ruby-gnome2/ruby-gnome2/issues/849 I'm wondering if it would be possible to provide ruby-gtk3 on windows compiled with Gtk 3.18, and cairo 1.14. If it's not possible, I would love pointers as how I can build them myself. Right now, in my case, ruby-gtk3 has been unusable since 3.0.8. And 3.0.7 throws lots of warnings. Regards Simon Arnaud |
From: Michael U. <mic...@up...> - 2016-09-12 18:14:19
|
Thank you, by the way. On Thu, Jul 28, 2016 at 11:43:12PM +0900, Kouhei Sutou wrote: > We'll support Ruby 2.4 before Ruby 2.4.0 is released. You do. I forgot to respond. GTK3 is again functional... all in all. Michael > > > Thanks, > -- > kou > > ------------------------------------------------------------------------------ > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en -- S'il faut être quelque chose, je suis Rémi Fraisse. GnuPG brainpoolP512r1/5C2A258D 2015-10-02 [expires: 2017-10-01] Michael Uplawski <mic...@up...> fingerprint: 2A44 09D4 54B4 EBD2 90DA 0B2D E8B8 0614 5C2A 258D sub brainpoolP512r1/53461AFA 2015-10-02 [expires: 2017-10-01] |