REMINDER: List moved to Discourse; archival in 1 week

2019-04-24 Thread Emmanuele Bassi via gtk-app-devel-list
Hi all; next week, on May 1st, this list will be archived[0]. This means no new subscriptions, and no new email. If you have questions about GTK, GLib, and the rest of the core GNOME development platform, you can use the Discourse[1] instance hosted on GNOME infrastructure; we have a Platform/Cor

Re: gtk3 drag and drop sample/demo

2019-04-15 Thread Emmanuele Bassi via gtk-app-devel-list
On Mon, 15 Apr 2019 at 12:45, Pankaj Bansal via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I am working with OpenJDK JavaFX dev group and we are facing some problems > with drag and drop functionality with gtk3.20 or later. You can have a look > at the bug for more information >

Re: TreeView - set border on individual cells

2019-04-06 Thread Emmanuele Bassi via gtk-app-devel-list
On Sat, 6 Apr 2019 at 20:15, wrote: > The second cairo_t is used so that the rectangle can be lined up to the > cell. If I use the cairo_t in the "draw" callback then the rectangle > doesn't line up. > You're still using: 1. the wrong window to draw on 2. deprecated API 3. a slow rendering

Re: TreeView - set border on individual cells

2019-04-06 Thread Emmanuele Bassi via gtk-app-devel-list
On Sat, 6 Apr 2019 at 19:05, Eric Cashon via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > static gboolean draw_rectangle(GtkWidget *tree_view, cairo_t *cr, gpointer > data) > { > GtkTreePath *path=gtk_tree_path_new_from_indices(row_g, -1); > > g_print("Draw Rectangle %i

Re: ANNOUNCE: Phasing out GTK mailing lists and move to Discord

2019-03-21 Thread Emmanuele Bassi via gtk-app-devel-list
On Thu, 21 Mar 2019 at 02:28, Matthew A. Postiff via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Is it easy in discourse to turn on email, either daily digests or > "live"? Is there an rss feed that I can subscribe to? A quick howto > would be great. > There is a link on how to u

Re: ANNOUNCE: Phasing out GTK mailing lists and move to Discord

2019-03-21 Thread Emmanuele Bassi via gtk-app-devel-list
On Wed, 20 Mar 2019 at 23:59, David C. Rankin < drankina...@suddenlinkmail.com> wrote: > On 03/18/2019 12:02 PM, Emmanuele Bassi via gtk-app-devel-list wrote: > > Hi all; > > > > as announced in: > > > > > https://mail.gnome.org/archives/gtk-devel-lis

ANNOUNCE: Phasing out GTK mailing lists and move to Discord

2019-03-18 Thread Emmanuele Bassi via gtk-app-devel-list
Hi all; as announced in: https://mail.gnome.org/archives/gtk-devel-list/2019-March/msg0.html we have created a Discourse instance available at: https://discourse.gnome.org After testing it for the past couple of weeks, we're very satisfied with how the platform behaves, so we are going

Re: Discourse instance

2019-03-01 Thread Emmanuele Bassi via gtk-app-devel-list
Note: for those who prefer email, we've written down a handy guide on how to use email with Discourse: https://discourse.gnome.org/t/interacting-with-discourse-via-email/46 Ciao, Emmanuele. On Fri, 1 Mar 2019 at 15:50, Emmanuele Bassi wrote: > And, of course, I forgot the lin

Re: Discourse instance

2019-03-01 Thread Emmanuele Bassi via gtk-app-devel-list
And, of course, I forgot the link: https://discourse.gnome.org Embarrassing. Ciao, Emmanuele. On Fri, 1 Mar 2019 at 15:41, Emmanuele Bassi wrote: > Hi all; > > after the discussion[1] last month, and the feedback received (both on > list and off), we decided to trial a Discourse

Discourse instance

2019-03-01 Thread Emmanuele Bassi via gtk-app-devel-list
Hi all; after the discussion[1] last month, and the feedback received (both on list and off), we decided to trial a Discourse instance on the GNOME infrastructure. The Platform/Core sub-category is meant to be used for all discussions about GTK, GLib, GdkPixbuf, Pango, and other core libraries of

Re: Migrating away from GtkStock stuff

2019-02-07 Thread Emmanuele Bassi via gtk-app-devel-list
On Thu, 7 Feb 2019 at 13:30, Gabriele Greco wrote: > (test:77229): Gtk-WARNING **: 14:28:49.162: Could not find the icon > 'help-about'. The 'hicolor' theme > was not found either, perhaps you need to install it. > You can get a copy from: > http://icon-theme.freedesktop.org/releases > > (test:7

Re: Migrating away from GtkStock stuff

2019-02-07 Thread Emmanuele Bassi via gtk-app-devel-list
On Thu, 7 Feb 2019 at 11:52, Gabriele Greco via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Hi guys, > > I'm in the process of migrating a big code base from GTK 2.x to GTK 3.x, > I've done most of the work, but I'm facing now some problems with GTK stock > stuff. > > I used stock

Re: Moving from mailing lists to Discourse

2019-02-06 Thread Emmanuele Bassi via gtk-app-devel-list
eplying to topics The Fedora (Silverblue) and Ubuntu communities already use Discourse, for instance; the SDL community also does. Ciao, Emmanuele. On Wed, 6 Feb 2019 at 12:46, Emmanuele Bassi wrote: > [Cross-posted to various relevant mailing lists; please, reply to > gtk-devel-list] &

Moving from mailing lists to Discourse

2019-02-06 Thread Emmanuele Bassi via gtk-app-devel-list
[Cross-posted to various relevant mailing lists; please, reply to gtk-devel-list] As part of an attempt at making GTK more friendly to newcomers, I and other core developers were thinking of moving the mailing lists from the current mailman installation to Discourse: https://discourse.org/ Pos

Re: Searching for text in PDF files is wrong

2018-12-03 Thread Emmanuele Bassi via gtk-app-devel-list
Hi; this list is for the development of applications with GTK; your question relates to Poppler, so you should ask on a Poppler-related mailing list or developers forum, e.g. https://lists.freedesktop.org/mailman/listinfo/poppler Ciao, Emmanuele. On Fri, 30 Nov 2018 at 20:56, Радомир Хаџић via

Re: Detect dark or light theme from an application

2018-11-06 Thread Emmanuele Bassi via gtk-app-devel-list
On Wed, 7 Nov 2018 at 00:48, Yuri Khan via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Hello everybody, > > I know in the GTK+3 theming engine a theme can define a light variant > and a dark variant. Is it possible, in an application, to know which > variant is currently used, and/

Re: Segmentation fault when passing Poppler objects

2018-11-06 Thread Emmanuele Bassi via gtk-app-devel-list
On Tue, 6 Nov 2018 at 09:55, Радомир Хаџић via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Hi. I get segmentation fault if I try to access a Poppler object whose > pointer is passed through g_signal_connect. There is no such problem > with normal pointers, though. This: > void

Re: GTK+ 2.0/3.0 Windows runtimes

2018-10-23 Thread Emmanuele Bassi via gtk-app-devel-list
Hi; On Tue, 23 Oct 2018 at 08:26, John Mills wrote: > Hello list > > If this question should be raised on another list, please let me know. > > I have been developing a C-language GTK+ 2.0 application for MS Windows 10 > using mingw > cross-compilation on Linux, and deploying it by installing th

Re: Wayland Window Positioning

2018-10-02 Thread Emmanuele Bassi via gtk-app-devel-list
You probably want to ask on gtk-devel-list and gnome-shell-list. Wayland interfaces need to be implemented by the compositor, and typically not piecemeal. That KDE interface seems to be a private interface shared between Plasma and kwin, like the gtk_shell interface is a private interface between

Re: Any way to access treeview in GtkFileChooser?

2018-09-17 Thread Emmanuele Bassi via gtk-app-devel-list
Ciao, Emmanuele. On Mon, 17 Sep 2018 at 16:15, Marco Ricci wrote: > I want to modify the column headers to be consistent with the style/theme > of the rest of the application I am working on. > > Thanks, > marco > > ---- > On Mon, 9/

Re: Any way to access treeview in GtkFileChooser?

2018-09-17 Thread Emmanuele Bassi via gtk-app-devel-list
No, and it's never a good idea to do so. Care to tell use what are you trying to achieve? Ciao, Emmanuele. On Mon, 17 Sep 2018 at 15:25, Marco Ricci via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I want to get a handle to the GtkTreeView object that lists the files in > GtkFi

Re: Introspection data generation error in evince (autotools vs meson)

2018-09-07 Thread Emmanuele Bassi via gtk-app-devel-list
Just as a follow up to this for the archives, since it has been fixed in Evince[0]: - the issue is caused by a double declaration of `GType ev_document_model_get_type (void)`—one by the G_DECLARE_FINAL_TYPE at line 33, and one explicit at line 57. This confuses the g-ir-scanner parser, and would

Re: "draw" icon with string

2018-09-03 Thread Emmanuele Bassi via gtk-app-devel-list
o API. > e.g. TreeView create it's own one, too. It is based on the row content. > I can I do the same? e.g. I only want the content of the second > column/cell and not the complete row? > You can get the contents of the model and render them as you wish, using the gtk_render_* API.

Re: "draw" icon with string

2018-09-01 Thread Emmanuele Bassi via gtk-app-devel-list
On Sun, 2 Sep 2018 at 02:02, Chris Moller wrote: > You probably can't do that--GTK has gotten just about impossible to > customise--but if you can do it at all, you'll probably have to use CSS. > Please, avoid this kind of unhelpful reply in the future. Ciao, Emmanuele. On 01/09/18 17:20, c.b

Re: "draw" icon with string

2018-09-01 Thread Emmanuele Bassi via gtk-app-devel-list
On Sat, 1 Sep 2018 at 22:20, c.buhtz--- via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I want to use my own drag-icon in a Gtk.TreeView where this is set as > an instance of GdkPixbuf.Pixbuf. > > I can I create/draw a pixbuf and create Text, background and border > color in it? >

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

2018-08-14 Thread Emmanuele Bassi via gtk-app-devel-list
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 expose event > handler (for gtk2) and draw signal (for gtk3) of GtkDrawingArea? > > When one should return TRUE, and when FALSE?

Re: PyGObject: FileChooserDialog and transient parent

2018-08-12 Thread Emmanuele Bassi via gtk-app-devel-list
Hi; On Sun, 12 Aug 2018 at 12:33, c.buhtz--- via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Below you see a minimal working example using Gtk.FileChooserNative as > a file-open dialog. While running with Python 3.6.6 I recieve > this warning message > > "GtkDialog mapped without

Re: gdk_screen_get_width/height

2018-08-02 Thread Emmanuele Bassi via gtk-app-devel-list
Use the GdkMonitor API; GdkScreen is an X11-ism, and a single screen can cover multiple outputs. https://developer.gnome.org/gdk3/stable/GdkMonitor.html Ciao, Emmanuele. On Thu, 2 Aug 2018 at 14:58, Wojciech Puchar wrote: > > > On 2018.08.02 15:55, Wojciech Puchar wrote: > > how to get wid

Re: question about gtk_dialog (gtk2)

2018-06-21 Thread Emmanuele Bassi via gtk-app-devel-list
You haven't specified which windowing system you're using. If it's X11, then the position of a window is always the remit of the window manager; the position set is a hint, which is taken into account by the window manager itself, alongside the "this is a dialog" hint that GtkDialog sets. There's

Re: How to get a directory from the user

2018-06-04 Thread Emmanuele Bassi
On 4 June 2018 at 13:06, Richard Shann wrote: > Hi, > > I have seen GtkFileChooser for getting a file from the user, but how to > get a directory (folder)? > > You can use GtkFileChooser with GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER as the action: - https://developer.gnome.org/gtk3/stable/GtkFileC

Re: Undefined reference to g_file_load_bytes()

2018-06-01 Thread Emmanuele Bassi
Hi; g_file_load_bytes() is available since GLib 2.56: https://developer.gnome.org/gio/stable/GFile.html#g-file-load-bytes so you'll need to make sure that the version of GLib provided by MSYS2 is new enough if you want to use that method. Ciao, Emmanuele. On 1 June 2018 at 01:21, PC Buddie

Re: guchar * sometimes a utf8, sometimes utf16?

2018-06-01 Thread Emmanuele Bassi
Hi; this mailing list is not for the GTK port of WebKit; you should ask on: https://lists.webkit.org/mailman/listinfo/webkit-gtk Ciao, Emmanuele. On 31 May 2018 at 23:04, Leo Ufimtsev wrote: > Hello guys, > > The following method: > guchar * webkit_web_resource_get_data_finish(..) > > Some

Re: Why is it impossible to move a window programmatically in GTK+ (C/C++)

2018-05-30 Thread Emmanuele Bassi
On 30 May 2018 at 18:33, Tarie Nosworthy via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > I am writing an app in GTK+, and I wanted to center a splash screen. > Coming from a Windows background, where SetWindowPos does the job, I found > out the X Window Manager always ignores reque

Re: The best way to draw a GL texture from a different process

2018-05-25 Thread Emmanuele Bassi
On 25 May 2018 at 10:23, Jiří Janoušek wrote: > Hello, > > My app consists of the main process, where the GTK+ main loop and widgetry > live, and the GPU process, which does OpenGL kung-fu and provides GL > texture and dirty/invalidated rectangles as a result. I have little control > over the GPU

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-15 Thread Emmanuele Bassi
On Tue, 15 May 2018 at 21:19, wrote: > Thank you for the link. > > On 2018-05-15 15:01 Emmanuele Bassi wrote: > > - the CSS "regions" were problematic for the whole theming system, > > so they were removed before we made the CSS selectors stable > > - Gtk

Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-15 Thread Emmanuele Bassi
Hi; On 11 May 2018 at 21:57, wrote: > Please see this StackOverflow question. > https://stackoverflow.com/q/50281987/4865723 > > Is there an official bug about setup alternate (even & odd) row colors > with CSS in a Gtk.TreeView? > No, not any more. > Can someone give a link to the bug ticket

Re: ANNOUNCE: Completion of migration to GitLab for GTK

2018-05-03 Thread Emmanuele Bassi
Hi all; the migration is now complete, and you should find all the open issues on GitLab: https://gitlab.gnome.org/GNOME/gtk/issues Thanks for your patience. Ciao, Emmanuele. On 1 May 2018 at 09:24, Emmanuele Bassi wrote: > Hi all; > > in the past few months we've taken va

ANNOUNCE: Completion of migration to GitLab for GTK

2018-05-01 Thread Emmanuele Bassi
Hi all; in the past few months we've taken various steps to migrate GTK to the GNOME GitLab instance in advance of the rest of the projects hosted on git.gnome.org, as migrations of old projects usually unearth various issues; we approached this piecemeal, breaking down the move into various steps

Re: widget show() / hide() crashes application

2018-04-03 Thread Emmanuele Bassi
You're likely trying to call GTK functions from different threads, which is not allowed. You should schedule UI updates in the main thread, using GLib.idle_add(). Ciao, Emmanuele. On 3 April 2018 at 10:28, stfl wrote: > I am writing a Python 3 GStreamer Client application. > I receive fps me

Re: Get the default font in Gtk3

2018-03-29 Thread Emmanuele Bassi
On 29 March 2018 at 15:12, rastersoft wrote: > > [get the Gtk font type and size] >>> >>> Ops, sorry: I'm reworking a backup utility that I wrote (cronopete), and >>> I added a timeline with the backups (you can see an screenshot at >>> http://www.rastersoft.com/cronopete_screenshot.png ). As you

Re: A simple GtkSpinner is very costly in CPU cycles

2018-03-21 Thread Emmanuele Bassi
On 20 March 2018 at 14:06, Kian Karas wrote: > Hi smart people > > I just introduced animation, in the form of a GtkSpinner, to my application > for the first time. When the spinner is animating, the application takes up > 45 % of the CPU resources (the application is otherwise idle at 0-2,6 %).

Re: Window icon is not shown in gnome shell dash under wayland

2017-12-02 Thread Emmanuele Bassi
Hi; On 2 December 2017 at 22:34, rastersoft wrote: > I created several applications that make use of Gtk.window, and set a window > icon. But recently I discovered that, under wayland, the icon is not shown > in the dash, but under X it is shown fine. It fails both in python3 and Vala > applicat

Re: Static library with Gtk 3

2017-11-30 Thread Emmanuele Bassi
While we don't actively disable static builds, we're also not really using them, or testing them. This typically means that doing static builds of GTK (and its dependencies) is discouraged, or at least that you're basically on your own. To be fair, there's literally no reason whatsoever to do a st

Re: Set CSS properties programmatically

2017-11-25 Thread Emmanuele Bassi
Hi Felipe; You probably wanted to send this email to gtk-devel-list, not gtk-app-devel-list. On Sat, 25 Nov 2017 at 12:41, Felipe Borges wrote: > Hi, > > I have been looking for a clean way of updating my widget's css > properties programmatically at runtime. > > Basically I have a css animatio

Re: No protocol specified error

2017-11-04 Thread Emmanuele Bassi
On 4 November 2017 at 06:08, Lokesh Chakka wrote: > Dear Felipe, > > I have refereed the link. As the application I am writing needs root > privileges, I must use sudo ./a.out. No other option. Of *course* there are other options for you: this is software development, not surgery. The appropriat

Re: Help with Gcolor3

2017-10-25 Thread Emmanuele Bassi
On 25 October 2017 at 12:50, Listings - www.majors-welt.net wrote: You probably want to start with a compositor-specific API, like the way screenshot and screen recording is performed in GNOME; if you want more Wayland compositors to follow the same protocol, you will have to

Re: Help with Gcolor3

2017-10-25 Thread Emmanuele Bassi
On 25 October 2017 at 11:19, Listings - www.majors-welt.net wrote: >>> I am a user of a color-picker tool - previously Gcolor2 - that has now >>> been >>> adopted to Gnome3 -> Gcolor3 -> https://github.com/Hjdskes/gcolor3/ >>> >>> Now while lots of linux distributions are switching to wayland as d

Re: Help with Gcolor3

2017-10-25 Thread Emmanuele Bassi
On 25 October 2017 at 09:40, Listings - www.majors-welt.net wrote: > Hi folks, > > i write here, because i dont know where it may fit. You probably want to start a discussion on wayland-devel: https://lists.freedesktop.org/mailman/listinfo/wayland-devel This list is for developing GTK applicat

Re: gtkdialog maximum size

2017-09-13 Thread Emmanuele Bassi
On 12 September 2017 at 18:06, Rúben Rodrigues wrote: > Someone knows how to limite the maximum size of gtkdialog? My problem is > that as the dialog does resize itself, sometimes it gets bigger that the > screen. Why are you using a GtkDialog? You should be using a GtkWindow for a complex UI.

Re: gdk_pixbuf_new_from_inline to Gresource conversion

2017-09-06 Thread Emmanuele Bassi
On 6 September 2017 at 13:55, Charles Curley wrote: > On Wed, 6 Sep 2017 11:22:25 +0100 > Chris Vine wrote: > >> I am not going to answer your question I am afraid, but I am going to >> make the observation that since GTK+2 will not be updated except for >> bug fixes, unless you are thinking of p

Re: No data available at callback

2017-07-02 Thread Emmanuele Bassi
On 29 June 2017 at 15:36, William A oswald wrote: > First a top level scenario. I am writing an interface application for a flat > bed scanner which will result in the use of the gdk function > g_signal_connect. I decided to pass some data to my callback function since > it would simplify some of

Re: g_signal_connect() and G_OBJECT

2017-06-30 Thread Emmanuele Bassi
The first argument of `g_signal_connect()` is a gpointer (i.e. a `void*`), so you don't need a cast at all — C will implicitly cast any pointer to `void*`, and from `void*` to any other pointer. Additionally, as you discovered, signals are GTypeInstance features — you can emit signals on anything

Re: How to in GTK3 set global default text size?

2017-05-16 Thread Emmanuele Bassi
Thank you, I will try GtkSettings. > > Best regards, > Igor > > > > > 2017-05-16 16:15 GMT+03:00 Emmanuele Bassi : >> >> First of all, GTK+ 3.6.4 was released in January 2013, which means >> it's 4.5 years old and it's completely unsupported. >> &g

Re: How to in GTK3 set global default text size?

2017-05-16 Thread Emmanuele Bassi
First of all, GTK+ 3.6.4 was released in January 2013, which means it's 4.5 years old and it's completely unsupported. The latest (long-term support) stable release is 3.22.15; please use that, especially if you're developing for Windows. Follow the instructions on the GTK+ website to know how to

Re: Get GtkWindow focus from XI Event

2017-05-11 Thread Emmanuele Bassi
You likely want to ask on gtk-devel-l...@gnome.org and/or on the #gtk+ IRC channel on irc.gnome.org. Ciao, Emmanuele. On 11 May 2017 at 13:15, Takao Fujiwara wrote: > On 05/11/17 20:55, Takao Fujiwara-san wrote: >> >> I have a focus problem with the attached program. >> 1. When press Ctrl-Alt-v

Re: How to find CSS style syntax changes between Gtk 3.12 and Gtk 3.22

2017-05-10 Thread Emmanuele Bassi
On 2017-05-08 at 13:57, Richard Shann wrote: > On Mon, 2017-05-08 at 12:28 +0100, Emmanuele Bassi wrote: > > > But I will have to wait for > > > Debian to catch up with Gtk 3.20 before I can seriously look at this. > > > > And this is why I suggest you use a

Re: How to find CSS style syntax changes between Gtk 3.12 and Gtk 3.22

2017-05-08 Thread Emmanuele Bassi
On 8 May 2017 at 12:04, Richard Shann wrote: >> But I'd strongly recommend you use CSS classes instead of styling the >> bare element name. >> >> CSS selectors in GTK+ work exactly like the HTML counterpart; you can >> style "div" or "p" directly, but it's often much more appropriate to >> create

Re: How to find CSS style syntax changes between Gtk 3.12 and Gtk 3.22

2017-05-08 Thread Emmanuele Bassi
On 7 May 2017 at 20:57, Richard Shann wrote: > On Sun, 2017-05-07 at 19:52 +0000, Emmanuele Bassi wrote: >> >> On Sun, 7 May 2017 at 19:53, Richard Shann >> wrote: >> >> On Sun, 2017-05-07 at 17:54 +0100, Emmanuele Bassi wrote: >>

Re: How to find CSS style syntax changes between Gtk 3.12 and Gtk 3.22

2017-05-07 Thread Emmanuele Bassi
On Sun, 7 May 2017 at 19:53, Richard Shann wrote: > On Sun, 2017-05-07 at 17:54 +0100, Emmanuele Bassi wrote: > > On 7 May 2017 at 16:52, Richard Shann wrote: > > > I have a test program that pops up a label with a customized > > background > > > and foregroun

Re: How to find CSS style syntax changes between Gtk 3.12 and Gtk 3.22

2017-05-07 Thread Emmanuele Bassi
On 7 May 2017 at 16:52, Richard Shann wrote: > I have a test program that pops up a label with a customized background > and foreground color. This works in 3.12 using the syntax > > "GtkLabel {background-color: #00;}" > > and > > "GtkLabel {color: #FF00FF;}" > > but fails in 3.22 The selecto

Re: GUI size and translations

2017-04-26 Thread Emmanuele Bassi
The usual way to deal with this is to set a `max-width-chars` on the labels and set the `ellipsize`, `lines`, and `wrap` properties; if you're using gettext, then you can leave a translator comment (which will get included in the POT file) to tell the translator how many characters are available fo

Re: Doubt

2017-04-21 Thread Emmanuele Bassi
On 20 April 2017 at 11:03, Rúben Rodrigues wrote: > Hi guys, > > i have a problem with callback functions. I have a struct in parameter but > always give null values. Here is an example: > > > struct pxToggleData{ > LineChartSeries *series; > LineChart *chart; > GtkWidget *canvas; > }

Re: Input event reduction

2017-03-30 Thread Emmanuele Bassi
On 30 March 2017 at 11:21, Gabriele Greco wrote: >> >> Thanks. While I can remember have read your explanations somewhere >> already, I really missed that g_main_context_invoke() function. > > > There is some difference/advantage on calling: > > g_main_context_invoke(NULL, func, data)? > > instead

Re: Input event reduction

2017-03-30 Thread Emmanuele Bassi
On 30 March 2017 at 10:10, Nicola Fontana wrote: > When you are ready from (1) you can spawn the idle callback with > g_source_attach()... no needs for gdk_threads_add_idle(). In the > following StackOverflow answer I provided an example in C: A small correction: use g_main_context_invoke() inst

Re: Howto integrate an inotify watch on editor file in GTK+2 event loop?

2017-03-28 Thread Emmanuele Bassi
Use GFileMonitor from GIO instead of directly dealing with inotify. Ciao, Emmanuele. On Tue, 28 Mar 2017 at 07:58, David C. Rankin < drankina...@suddenlinkmail.com> wrote: > All, > > I have a small editor project I've worked on the past several months[1]. > I > want to add an `inotify` watch

Re: Is GtkAssistant a toplevel widget?

2017-03-22 Thread Emmanuele Bassi
As you can see here: https://developer.gnome.org/gtk3/stable/GtkAssistant.html#GtkAssistant.object-hierarchy GtkAssistant is-a GtkWindow, which means it's a top level widget. The documentation of `gtk_widget_is_toplevel()` does not list all the possible GtkWindow sub-types, because GTK+ may i

Re: Best practise inheritance

2017-03-22 Thread Emmanuele Bassi
Now that I'm not on my phone, I can probably do a better job at replying to this email. On 21 March 2017 at 23:21, Emmanuele Bassi wrote: > > On Tue, 21 Mar 2017 at 21:23, S. Jacobi wrote: >> >> On Tue, 21 Mar 2017 20:53:04 + >> Emmanuele Bassi wrote: >

Re: Best practise inheritance

2017-03-21 Thread Emmanuele Bassi
On Tue, 21 Mar 2017 at 21:23, S. Jacobi wrote: > On Tue, 21 Mar 2017 20:53:04 + > Emmanuele Bassi wrote: > > > > > Also, do not store a private pointer in your instance structure, and > > use the get_private_instance() function that the G_DEFINE_TYPE macro > &

Re: Best practise inheritance

2017-03-21 Thread Emmanuele Bassi
Don't use g_type_class_add_privat(). Either use the define type with private macro, or the define type with code macro with G_ADD_PRIVATE. Also, do not store a private pointer in your instance structure, and use the get_private_instance() function that the G_DEFINE_TYPE macro creates for you. The

Re: How to change GTK+3 label color dynamically

2017-03-16 Thread Emmanuele Bassi
You keep using an id in the selector, but you never show how you set the id on the widget. I suspect you think the buildable ID you use with GtkBuilder is also the ID used when theming — which is definitely not the case. You will need gtk_widget_set_name(), instead. Of course, that comes with its o

Re: gtk3 layout background image

2017-03-14 Thread Emmanuele Bassi
eir own native window for rendering any more, for instance. If your application window has a background image then use the background-image CSS property on your GtkWindow widget. Ciao, Emmanuele. > On 14-03-2017 14:01, Emmanuele Bassi wrote: >> You were not changing the background with y

Re: gtk3 layout background image

2017-03-14 Thread Emmanuele Bassi
; > //gtk_widget_set_style (GTK_WIDGET(homeWindow), GTK_STYLE(style)); > > How i know witch containers draw background? > > THanks > > > On 14-03-2017 12:55, Emmanuele Bassi wrote: >> Not all GTK containers draw a background, mostly for historical >> reasons. T

Re: gtk3 layout background image

2017-03-14 Thread Emmanuele Bassi
Not all GTK containers draw a background, mostly for historical reasons. This has been true for GTK 1.x, 2.x, and 3.x. In particular, GtkLayout does not draw any background with CSS, so you will need to either subclass GtkLayout, override the GtkWidget::draw virtual function, and call gtk_render_*

Re: Migrate to gtk3.0

2017-03-10 Thread Emmanuele Bassi
On 10 March 2017 at 15:11, Rúben Rodrigues wrote: > Hi, > > i'm trying to migrate from gtk2.0 to gtk3.0 and i'm following gnome > tutorial > https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3 > > When i put > > make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECAT

Re: Gtk+ progress bar color

2017-03-08 Thread Emmanuele Bassi
On 8 March 2017 at 15:11, Stefan Salewski wrote: > On Wed, 2017-03-08 at 15:00 +, Rúben Rodrigues wrote: >> Thanks for your help... Yes i don't understand why gtk doesn't aloow >> us >> to do some "basic" things.. You're explicitly asking about GTK+ 2.x, whose API was last updated 6 years ago

Re: win32 (via Wine): 'image-missing' not present in theme Adwaita

2017-03-04 Thread Emmanuele Bassi
On 4 March 2017 at 21:01, Norbert de Jonge wrote: >> I'm running my ported GTK+ application via Wine, and it keeps >> throwing: >> - >> Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: >> Icon 'image-missing' not present in theme Adwaita >> - >> >> How can I get rid of

Re: dark theme gtk+2?

2017-03-01 Thread Emmanuele Bassi
No; GTK+ 2.x does not have support for per-application theme variants, and thus it does not have support for dark themes. Ciao, Emmanuele. On 1 March 2017 at 12:34, Rúben Rodrigues wrote: > Hi guys, > > > It's possible to make this > > g_object_set(gtk_settings_get_default(), > "gtk-applic

Re: Error unknown type name ‘GtkSearchEntry’

2017-02-27 Thread Emmanuele Bassi
gt; think that doesn't run linux versions after 10.04.. I hope you realise that Ubuntu 10.04 has reached its end of life on desktop systems in 2013, and on servers in 2015. You're running a deeply insecure OS. Ciao, Emmanuele. > Às 16:07 de 27/02/2017, Emmanuele Bassi escreveu: >

Re: Error unknown type name ‘GtkSearchEntry’

2017-02-27 Thread Emmanuele Bassi
On 27 February 2017 at 15:51, Rúben Rodrigues wrote: > Yes, gtk 2.. So, i can't use libwheather with gtk-2.0? You will need a previous version of libgweather; the last release with GTK+ 2.x support was the 2.30 release, which was done 6 years ago. I *strongly* encourage you to port your code to

Re: Weather API

2017-02-23 Thread Emmanuele Bassi
On 23 February 2017 at 11:08, infirit wrote: > Op 02/22/2017 om 07:44 PM schreef Norbert de Jonge: >>> gnome-weather [...] I can i use this libraries with C? >> I think, in theory, the GWeather Reference Manual... >> https://developer.gnome.org/libgweather/stable/ >> ...should have information abo

Re: GtkPrintOperation; request for assistance

2017-02-07 Thread Emmanuele Bassi
Hi; On 7 February 2017 at 00:09, Norbert de Jonge wrote: > Yesterday, I finished the migration of a 16+ year old GTK+ 1.2 > application to GTK+ 3.18. Congrats! > In previous releases of the application, printing was done by writing > directly to "lpr". I want code to be C99 compatible, so I re

Re: API changes, GTK 3.21 to 3.22, need advice to replace lost capability

2017-01-25 Thread Emmanuele Bassi
Hi; your question has been answered multiple times on this mailing list; I know, because usually I'm the one answering it. If you look in the archives, you'll probably even find code examples. On 24 January 2017 at 21:12, wrote: > My application code writes extensively to GdkWindow objects us

Re: watching a file descriptor in gtk3

2017-01-23 Thread Emmanuele Bassi
Hi; On 23 January 2017 at 22:09, rbd wrote: >> It is not quite that bad. The documentation for g_source_add_unix_fd() >> is inadequate, but although not immediately obvious the prepare, check >> and finalize handlers can in fact usually just be set to NULL (provided >> you have set the 'events'

Re: gtk3 and fork/exec of non-gtk child

2017-01-14 Thread Emmanuele Bassi
Hi; On 14 January 2017 at 17:17, infirit wrote: > Op 01/14/2017 om 06:05 PM schreef Emmanuele Bassi: >>> However, I am still curious as to whether the fork/exec/SIGCHLDhandler model >>> of my existing X11/Motif app will or will not work with gtk3. This design >>>

Re: gtk3 and fork/exec of non-gtk child

2017-01-14 Thread Emmanuele Bassi
#x27;s working according to the best practices of modern systems. If the code in question is as old as you mention, written for a very different era, then you may end up paying the technological debt later on. Ciao, Emmanuele. > On Sat, 14 Jan 2017, Emmanuele Bassi wrote: > >> Hi;

Re: gtk3 and fork/exec of non-gtk child

2017-01-14 Thread Emmanuele Bassi
Hi; Don't use fork()/exec() directly with manual signal connection; use GSubprocess from GIO, instead, which is a much better API, it's safe, and it's likely more comprehensive in handling additional cases. Ciao, Emmanuele. On Sat, 14 Jan 2017 at 01:30, rbd wrote: > > > Hi all, > > > > I have

Re: gtk_dialog_get_action_area() deprecation

2016-12-31 Thread Emmanuele Bassi
Hi; It's part of every widget's API reference page, at: https://developer.gnome.org/gtk3/stable Ciao, Emmanuele. On Sat, 31 Dec 2016 at 20:28, Phil Wolff wrote: > Perhaps you could provide a link to that documentation? > > > > > > On 12/31/2016

Re: gtk_dialog_get_action_area() deprecation

2016-12-31 Thread Emmanuele Bassi
Hi; On 31 December 2016 at 18:31, Eric Cashon via gtk-app-devel-list wrote: > I like the gtk_dialog_get_action_area() function. It makes it easy to set > something like the border width of the container. Since you're using GTK+ 3, you should really consider using a small CSS fragment shipped

Re: gtk_dialog_get_action_area() deprecation

2016-12-31 Thread Emmanuele Bassi
Hi; On 31 December 2016 at 16:03, Richard Shann wrote: > On Sat, 2016-12-31 at 15:44 +0000, Emmanuele Bassi wrote: >> Hi; >> >> >> Deprecations will only impact you if you want to update the code base >> to the next major API bump. > > Yes, it is to be re

Re: gtk_dialog_get_action_area() deprecation

2016-12-31 Thread Emmanuele Bassi
Hi; Deprecations will only impact you if you want to update the code base to the next major API bump. Since you don't have or want to commit resources to do so, you can keep using the deprecated API in the same major API version. If you want to avoid deprecation warnings, you can use the various a

Re: deprecated gtk_cairo_create

2016-12-30 Thread Emmanuele Bassi
Hi; On 30 December 2016 at 13:45, Colomban Wendling wrote: > [1] which says "CairoContext", but that's a weird lie on the API… not > sure why, maybe the GType has this name so introspection is confused. > Anyway, it's cairo_t. The API reference is generated via gtk-doc, which queries the type f

Re: deprecated gtk_cairo_create

2016-12-30 Thread Emmanuele Bassi
Hi; On 30 December 2016 at 17:25, Jim Charlton wrote: > If one does want to draw into a cairo_surface_t, one can create a cairo > context for drawing? E.g. Yes, that's the expected approach. You either create your own Cairo surface, or you ask GDK to create a similar surface (or similar image

Re: Why GTK+ ignore, that someone want's to create own widget ?!

2016-12-13 Thread Emmanuele Bassi
Hi; On 13 December 2016 at 05:33, Ondrej Tuma wrote: > At the moment, i just to get default widget border color. But, the > gtk_style_context_get_border_color is deprecated... and i should to use > gtk_render_frame. Please tell me how can i use gtk_render_frame to get > border color?! How? You d

Re: How to find replacements for deprecated functions

2016-11-30 Thread Emmanuele Bassi
thing more specific, you'll have to provide more context. Ciao, Emmanuele. On Wed, 30 Nov 2016 at 19:49, Erik de Castro Lopo wrote: > Emmanuele Bassi wrote: > > > There is no direct replacement for GtkUIManager, in the sense that > > there is no API that you can use to immed

Re: How to find replacements for deprecated functions

2016-11-30 Thread Emmanuele Bassi
Hi; On 30 November 2016 at 09:07, Erik de Castro Lopo wrote: > HI all, > > I am an occassional GTK user, and often I work on resurrecting code > bases for which I am not the original author. As such I often run > into reprecation warnings. When I go to the documentation I find > things like this:

Re: Sharing Gtk.Adjustment objects among several Gtk.SpinButton widgets

2016-11-14 Thread Emmanuele Bassi
Hi; On 14 November 2016 at 17:12, Pozz Pozz wrote: >> A GtkAdjustment is a "model", whereas the widgets using the adjustment >> are the "views". So, if you use the same GtkAdjustment instance, all >> widgets will share the same underlying state. This is by design. >> >> If you want to create dif

Re: Sharing Gtk.Adjustment objects among several Gtk.SpinButton widgets

2016-11-14 Thread Emmanuele Bassi
Hi; On 14 November 2016 at 15:36, Pozz Pozz wrote: > Is it possible to have a single Gtk.Adjustment for several Gtk.SpinButton > widgets? I couldn't understand if the adjustment is only used by SpinButton > to know the range (and some additional details, such as the page size), or > the adjustmen

Re: Porting Gtk2 styles to Gtk3

2016-11-13 Thread Emmanuele Bassi
Hi; On 12 November 2016 at 19:02, wrote: > I am struggling how to translate operators of the form > color = &style->light[GTK_STATE_PRELIGHT]; > into proper Gtk3. The documentation says: > "One notable difference is the reduction from fg/bg/text/base colors to > only foreground/background, in ex

Re: GTK+2 vs. GTK+3 signal “expose/draw/render” events

2016-10-04 Thread Emmanuele Bassi
Hi; On 3 October 2016 at 21:54, Sébastien Le Roux wrote: > Hello everyone and thanks for reading this, > You will find the same message posted on stackoverflow by following this > link > > (or pretty much

Versioning and long term stability promise in GTK+

2016-09-03 Thread Emmanuele Bassi
Hi all; after the Toronto hackfest of June 2016, the discussion on the gtk-devel mailing list, and after various discussions at GUADEC 2016 in Karlsruhe, the GTK team has reached a consensus on how the GTK+ project should perform its releases. You can find the whole description of the motivations

  1   2   3   4   >