Re: Detecting the gdk backend

2019-02-07 Thread Luca Bacci via gtk-app-devel-list
Hi! There is some reference code here: https://developer.gnome.org/gdk3/stable/gdk3-Wayland-Interaction.html https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html - Include the backend specific headers: gdk/gdkx.h, gdk/gdkwayland.h - Link with backend specific libs: g

Re: How to replace gtk_widget_modify_text() with CSS?

2018-12-18 Thread Luca Bacci via gtk-app-devel-list
Hi Nate, based on my experience, you have 3 ways: 1) First, see if there are standard CSS classes provided by the theme for your use case. For example, GtkButton has the *.suggegsted-action* and *.destructive-action* CSS classes, which all t

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-26 Thread Luca Bacci via gtk-app-devel-list
"prop-name", &value); /* ... */ g_value_unset(&value) //free memory Unfortunately, that's all I can say, I'm not expert in this area. Probably it's going to be rather complicated. Luca Il giorno lun 26 nov 2018 alle ore 16:34 Sébastien Le Roux < sebastien.ler...@ipcms

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-24 Thread Luca Bacci via gtk-app-devel-list
If you really need, you can fake it by adding a menuitem with empty text and setting it to invisible with gtk_widget_set_visible(menuitem, false); Il giorno sab 24 nov 2018 alle ore 15:59 Luca Bacci ha scritto: > Probably it's a consequence of this work for porting GtkMenuBar to

Re: Issue using the "gtk_widget_get_allocated_height" instruction

2018-11-24 Thread Luca Bacci via gtk-app-devel-list
Probably it's a consequence of this work for porting GtkMenuBar to use css gadgets internally: https://gitlab.gnome.org/GNOME/gtk/commit/700286c6 You should be able to get the appropriate size if you add menu items to the bar, i.e. as long as the menubar is not empty you get the appropriate height

Re: return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Luca Bacci via gtk-app-devel-list
All right, I missed that! Thank you! Luca 2018-08-14 18:56 GMT+02:00 Emmanuele Bassi : > Hi; > > On Tue, 14 Aug 2018 at 17:30, Luca Bacci via gtk-app-devel-list < > gtk-app-devel-list@gnome.org> wrote: > >> Hi, does anyone know what meaning has the return value from e

return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Luca Bacci via gtk-app-devel-list
Hi, does anyone know what meaning has the return value from expose event handler (for gtk2) and draw signal (for gtk3) of GtkDrawingArea? When one should return TRUE, and when FALSE? I can't find any information in the reference manual Thank you! Luca

Re: Using SVG for icons (and scaling)

2018-07-18 Thread Luca Bacci via gtk-app-devel-list
SVG are supported in Gtk (and Glade) Support for image formats is modularized in form of plugins, you just need to get the plugin for SVG. In many distros you have to install 'librsvg' to get the SVG loader. As for scaling goes, GtkImage can scale images only when using icon-name source and not f

Re: gtk_file_chooser_dialog in windows - hot to enable network places

2018-05-11 Thread Luca Bacci
g? 2018-05-11 14:05 GMT+02:00 Luca Bacci : > Maybe you can try GtkFileChooserNative > <https://developer.gnome.org/gtk3/stable/gtk3-GtkFileChooserNative.html> > You should be able to select network locations with that. > > Luca > > 2018-05-11 13:16 GMT+02:00 Wojci

Re: gtk_file_chooser_dialog in windows - hot to enable network places

2018-05-11 Thread Luca Bacci
Maybe you can try GtkFileChooserNative You should be able to select network locations with that. Luca 2018-05-11 13:16 GMT+02:00 Wojciech Puchar : > nobody program for windows? > > > > > Forwarded Message

Re: [PyGObject] TreeView: Empty integer field or right aligned string

2018-05-09 Thread Luca Bacci
self.layout.attach(self.view, 0, 1, 1, 1) self.connect('destroy', Gtk.main_quit) self.show_all() if __name__ == '__main__': win = Window() Gtk.main() 2018-05-08 22:09 GMT+02:00 : > On 2018-05-08 14:20 Luca Bacci wrote: > >- Use Cell

Re: [PyGObject] TreeView: Empty integer field or right aligned string

2018-05-08 Thread Luca Bacci
out = Gtk.Grid() self.add(self.layout) self.layout.attach(self.view, 0, 1, 1, 1) self.connect('destroy', Gtk.main_quit) self.show_all() if __name__ == '__main__': win = Window() Gtk.main() Luca 2018-05-08 12:08 GMT+02:00 Luca Bacci : > He

Re: [PyGObject] TreeView: Empty integer field or right aligned string

2018-05-08 Thread Luca Bacci
Hello! You can achieve what you want with the "xalign" property of CellRenderers col_b = Gtk.TreeViewColumn('str', Gtk.CellRendererText(xalign=1), text=1) xalign takes a value between 0 and 1. xalign=0 -> left-justified xalign=1 -> right-just

Re: Using Gtk.Builder to create a menubar.

2018-04-27 Thread Luca Bacci
Yes, actions get a prefix depending on where you put them. Every "action container" has a prefix. In your case you add_action() to GtkApplicationWindow and its prefix is "win" I used your code to create an answer to my StackOverflow question > https://stackoverflow.com/a/50051155/4865723 > great!

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread Luca Bacci
enu(self, action, value): print('on_menu') if __name__ == '__main__': win = Window() Gtk.main() 2018-04-26 11:01 GMT+02:00 Luca Bacci : > it should be like that (I can't test it right now, try yourself) > > #!/usr/bin/env python3 > import gi >

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread Luca Bacci
self.show_all() def on_menu(self, action, value): print('on_menu') if __name__ == '__main__': win = Window() Gtk.main() 2018-04-26 10:44 GMT+02:00 Luca Bacci : > see here: > > https://wiki.gnome.org/HowDoI/GMenu > htt

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread Luca Bacci
see here: https://wiki.gnome.org/HowDoI/GMenu https://wiki.gnome.org/HowDoI/GAction self.interface_info = """ > > > > Foo > > Bar > > > > > """ for every you wa

Re: background color for GtkTreeView

2018-03-10 Thread Luca Bacci
try with treeview:selected { background-color: white; } Luca 2018-03-10 14:26 GMT+01:00 : > Hi there, > > I'm trying to change the background-color of a GtkTreeView by adding a > css provider with the following style set: > > treeview { background-color: #fffae1; } > > Unfortunately this