Re: Non-blocking socket communication with GIO

2019-01-23 Thread Gergely Polonkai
will be called whenever there is data available. At least that’s what i’d do if i’d be using plain Linux sockets, using select()/poll()/epoll(). Best, Gergely mið., 23. jan. 2019 kl. 10:48 skrifaði Göran Hasse : > Den 2019-01-10 kl. 15:02, skrev Gergely Polonkai: > > > > H

Non-blocking socket communication with GIO

2019-01-10 Thread Gergely Polonkai
Hello, i’m working on an app that communicates with a network service using a custom binary protocol. For that i have a GSocketClient. The destination can, in theory, be either a TCP/IP or a UNIX socket (only TCP/IP is implemented yet). I initiate the connection like this:

Re: Key press synthesis (for WebKitGTK)

2018-11-24 Thread Gergely Polonkai
On Sat, Nov 24, 2018 at 09:59:00AM +0100, Pierre Neidhardt wrote: > Hi Gergely, > > > So if you change your handler’s return type from `void` to `gboolean` > > and return `FALSE` if the lisp thingy doesn’t understand your key, it > > will be automatically propagated to the next handler (which,

Re: Key press synthesis (for WebKitGTK)

2018-11-23 Thread Gergely Polonkai
Hello, from the manual (https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-key-press-event), the signature of key-press-event handlers is: ``` gboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data) ``` From the same manual:

Re: gtk performance

2018-10-08 Thread Gergely Polonkai
Hello, I don’t know about GtkListBox, but when using GtkTree, are you detaching your model from the treeview while you are doing mass operations on it? I remember reading it in a tutorial years (decades?) ago that you should do this. Sorry, but i have no answers at hand for your other

Re: PyGObject: pep8 konform

2018-06-01 Thread Gergely Polonkai
My take would be to ignore this specific line with a magic comment. Or, if you really donʼt want to d that, a from importlib import import_module # isnʼt that line wonderful? Gtk = import_module('gi.repository.Gtk') might do the trick. (Note that I wrote it without having Python at hand; maybe

Re: Is it possible to catch ALT+TAB and do nothing

2018-05-08 Thread Gergely Polonkai
Given your earlier mails, the thing you want to achieve is near to impossible. Even if you donʼt give focus to every terminal app that can ever exist, I can press Ctrl-Alt-F2 to go to the textual console and do whatever Iʼd like. If there is one thing in the X world you canʼt catch is this (and

Re: Strange (for me) warnings during doc generating

2018-03-19 Thread Gergely Polonkai
wrote: > On 03/14/2018 10:38 AM, Gergely Polonkai wrote: > > Hello, > > when genering docs for my project ( > https://github.com/gergelypolonkai/matrix-glib-sdk), I get some strange > warnings (line numbers refer to the commit > 8d95dd913cbc3fff4475b85a123bed636cc877

Re: Why are signal names strings and not enums?

2017-10-06 Thread Gergely Polonkai
Yes, but in that case how would you deal with custom signals, e.g. the ones you implement for your own custom widgets? It’s pretty much impossible for an extendable API. Stefan Salewski ezt írta (időpont: 2017. okt. 6., P, 13:24): > We are using code like > >

Re: How do we get GTYPE from gobject introspection language bindings

2017-09-28 Thread Gergely Polonkai
As a side note, STRING probably refers to https://developer.gnome.org/glib/stable/glib-Strings.html which is a more OO string implementation. G_TYPE_STRING being gchararray is of more close relation with C strings (except it consists of gchars instead of chars.) On Thu, Sep 28, 2017, 22:34 Stefan

Re: How do you write common codes for GObject?

2017-09-04 Thread Gergely Polonkai
If I ned to be backwards compatible, I go with GobGen (an Emacs package I wrote, available on MELPA). If not, see ebassi’s answer. On Mon, Sep 4, 2017, 16:46 Kouhei Sutou wrote: > Hi, > > We need to write common codes for GObject like the > followings: > > #define

Re: Max int value constant

2017-08-21 Thread Gergely Polonkai
Hello, if you are using gint32, gint16, and the like, it’s super easy. gint8: 0x7f guint8: 0xff gint16: 0x7fff guint16: 0x gint32: 0x7fff guint32: 0x However, GLib defines such constants: G_MAXINT and G_MAXUINT for platform-specific types gint and guint. Personally I don’t like

Re: Live Thumbnail of Widgets

2017-06-02 Thread Gergely Polonkai
On Fri, Jun 2, 2017, 20:57 infirit wrote: > On 20/05/17 16:27, Gerald Nunn wrote: > > I'm looking for some advice on alternative solutions that would fit my > > needs. In an ideal solution, the thumbnails would be updated real time > > similar to the windows in gnome-shell

Re: please please stop all mails

2017-05-23 Thread Gergely Polonkai
Hello, You mean from this list? In that case, you can simply unsubscribe at https://mail.gnome.org/mailman/listinfo/gtk-list . Best, Gergely ole hasselbalch ezt írta (időpont: 2017. máj. 23., K, 11:22): > I would be very glad if gtk will stop all mails to me. I get

Re: invalid cast from 'GtkButton' to 'GtkEntry'

2017-01-20 Thread Gergely Polonkai
When you press enter in the text entry, btn_clicked is called with the widget parameter set to the entry. When you press the button, the same function gets called, but widget is set to the button. I see you pass the entry widget as the callback data when connecting to the signals. This means that

Re: Accessors vs Properties

2017-01-04 Thread Gergely Polonkai
Hello, I don't know about others, but in my own code, my_obj_set_property() does nothing else just calls the setter functions (and the same for getters). It makes much more sense, and I saw it in a lot of Gtk and Gnome code, too. Best, Gergely On Wed, Jan 4, 2017, 19:27 Tobias Knopp

Re: gtk_dialog_get_action_area() deprecation

2016-12-31 Thread Gergely Polonkai
It would be helpful to see your exact use case. If you put only buttons in your GtkBox, you will be fine with gtk_dialog_add_button(). If you add other, more complex widgets, there might be a design flaw in your application. Solutions in between might be OK, but without knowing what you want to

Re: Catch logging off in GTK application

2016-12-01 Thread Gergely Polonkai
I know you can connect to the DBus service of gnome-session, but without a decent Internet connection at hand I can’t be of better help. Best, Gergely On Thu, Dec 1, 2016, 21:20 Igor Korot wrote: > Guys, > > On Thu, Dec 1, 2016 at 3:59 AM, Göran Hasse

Re: Adding and removing widgets at runtime

2016-09-12 Thread Gergely Polonkai
Hello, I have no knowledge of Java/Swing, but based on your requirements I guess you need FlowBox[1]. Best, Gergely [1] https://developer.gnome.org/gtk3/stable/GtkFlowBox.html On Mon, Sep 12, 2016, 16:35 Daniel. wrote: > Hi everybody, > > I have a library implementing

Re: Preventing fade on loss of focus?

2016-09-06 Thread Gergely Polonkai
Hello, how exactly do you play the video? Do you open a separate video player like Totem, or you embed it somehow to your main window? Best, Gergely On Tue, Sep 6, 2016, 21:00 Mark Farver wrote: > I am using GTK3 with Weston/Wayland and when I play a video using >

Re: glib-gio message...

2016-06-28 Thread Gergely Polonkai
Hello, how do you run your application? Is it possible that you are using jhbuild to run it, or is that a system-installed package that gives you this message? Best, Gergely On Jun 27, 2016 20:49, "Glus Xof" wrote: > Hi guys, > > Once I run GtkColorChooserDialog... Is it

Re: How does one get the screen coordinates of the workspace?

2015-12-29 Thread Gergely Polonkai
Hello, this makes me wonder why you need these coordinates? If you want to set the window size to the maximum, then just maximize it. If you want to move it around automatically, like put it on the center of the screen, don't do that. There are situations, e.g. for users with multiple monitors

Re: gdk-pixbuf cross compiling error

2015-10-15 Thread Gergely Polonkai
Hello, if you add --disable-silent-rules, you will see the whole gcc command line. This way you can verify that gcc looks for the file in the right directory, too. Best, Gergely On 16 Oct 2015 04:05, "souileh bhn" wrote: > Hi, > I want to cross compile gdk-pixbuf-2.32.0,

Re: GTK-Doc and CMake

2015-10-12 Thread Gergely Polonkai
Hello, If I were you, I would submit this as a patch for GTK Doc via bugzilla.gnome.org. I expect replies pretty soon :) Best, Gergely 2015-10-07 17:26 GMT+02:00 Sam Thursfield : > Hello > > I've been porting a project that uses GTK-Doc to use CMake as its build > system (it

Re: Chinese font not displayed in gtk app on Windows

2015-09-24 Thread Gergely Polonkai
Hello, my first guess is that the font GTK uses doesn't support Chinese characters. However, I don't know a way to check this under W10… Best, Gergely On 24 Sep 2015 19:25, "Francois Naggar-Tremblay" wrote: > Hi, > > I'm using a Chinese handwriting recognition GTK

Re: Auto-resize scrolled window

2015-09-22 Thread Gergely Polonkai
Can you also show us your widget hierarchy like Lucas did? The problem you outline should not happen in a usual hierarchy. On 22 Sep 2015 22:11, "Subsentient" <thinkingrod...@gmail.com> wrote: > GTK 2, using C calls. > > On 09/22/15 08:52, Gergely Polonkai wrote: > &g

Re: Auto-resize scrolled window

2015-09-22 Thread Gergely Polonkai
Before anyone could actually answer: • what version of GTK are you using? • how do you build your window? Are you using plain C calls, or some UI builder like Glade? Best, Gergely On 22 Sep 2015 02:33, "Subsentient" wrote: > When I resize the window, I'm having

Re: How to grey out menu items

2015-09-20 Thread Gergely Polonkai
Hello, that depends on what your current approach is. Are you building your UI from code, or do you use Glade .ui files? Best, Gergely On 20 Sep 2015 16:51, "richard boaz" wrote: > >> just a note: doing this "properly" should involve Actions, not widgets. >> >> it is

Re: How to tell filechooser to sort directories first and not to mix dirs with files?

2015-09-15 Thread Gergely Polonkai
Hello, Which Fedora update are you referring to? Sorting works fine for me on the current F22. I cannot check the other issues right now, maybe tomorrow; let’s hope someone else will answer beforehand. Best, Gergely 2015-09-14 20:27 GMT+02:00 Clemens Eisserer : > Hi, > >

Re: Documentation inconsistency

2015-08-05 Thread Gergely Polonkai
I must agree with Paul here. Try to look at the documentation like this: {The warning. Ignore it for now, but we will come back here soon} The usage. This is how you can and should use the function. It states the behaviour of the function for pre-2.24 and post-2.32 versions. You must consider

Re: Documentation inconsistency

2015-08-04 Thread Gergely Polonkai
Hello, if you are sure your software will never be compiled against older versions of GLib, then you can take it off. It's really not needed. The fact vtable is mentioned for versions 2.32+ is because you can still use it; it didn't disappear (yet), it's just deprecated. Best, Gergely On 5 Aug

Re: Misconduct of GTK+/glib Bugtracker Admins

2015-06-16 Thread Gergely Polonkai
Hello, I’m sorry to say that, but I find your name very appropriate in this case: *Ignorant* Guru. You seem to ignore every statement that says something else that you do. GNOME is not a Red Hat product. It is a GNOME Foundation product, if you want to put it anywhere. It is led by several

Re: Misconduct of GTK+/glib Bugtracker Admins

2015-06-16 Thread Gergely Polonkai
have anything to discuss with me we can do that in private, and I hereby grant you to publish our discussions with my name if we do so. I still hope your problem gets solved, as I can see the use case and the annoyance of your users. Wishing you the best, Gergely Polonkai 2015-06-07 23:18 GMT+02

Re: vte widget improvement idea

2015-06-11 Thread Gergely Polonkai
I don't think it is a bad idea per se. Here are some ideas from me: • it should be either turned off by default • or it should warn the user like »hey, you are going to paste multiple lines, are you sure?« with an option to silence such warnings Also I remember a warning, maybe from ViM that

Re: Misconduct of GTK+/glib Bugtracker Admins

2015-06-07 Thread Gergely Polonkai
Hello, I’m sorry to say that, but I find your name very appropriate in this case: *Ignorant* Guru. You seem to ignore every statement that says something else that you do. GNOME is not a Red Hat product. It is a GNOME Foundation product, if you want to put it anywhere. It is led by several

Re: Misconduct of GTK+/glib Bugtracker Admins

2015-06-07 Thread Gergely Polonkai
have anything to discuss with me we can do that in private, and I hereby grant you to publish our discussions with my name if we do so. I still hope your problem gets solved, as I can see the use case and the annoyance of your users. Wishing you the best, Gergely Polonkai 2015-06-07 23:18 GMT+02

Re: GTK, can GtkNotebook have a single control and all tabs pointing to it?

2015-02-09 Thread Gergely Polonkai
Hello, I'm afraid this is not possible to do it this way; you will have to create some kind of wrapper widget. I would go on with GtkStack, and for the tabs themselves you may take a look into GtkStackSwitcher's source code. Best, Gergely On 9 Feb 2015 14:43, Leo Ufimtsev lufim...@redhat.com

Re: Pygobject memory leak in set_property?

2015-01-02 Thread Gergely Polonkai
Hello, How big is the memory increase? set_text() allocates memory for text, which might be the cause. Best, Gergely On 1 Jan 2015 22:55, Colin Myers colin.my...@tabernus.com wrote: Hello list, I've been wrangling with a leak in my Pygobject/Gtk application and believe the following lines

Re: gir and refcounting

2015-01-02 Thread Gergely Polonkai
My first thought is that Perl and Glib::Object::Introspection is just fine. If I were you, I would further debug my own application, with something like refdbg (http://refdbg.sourceforge.net/ despite the looks, it still works nowadays) or GObject-list (https://github.com/danni/gobject-list haven’t

Re: Plotting library for GTK+

2014-12-02 Thread Gergely Polonkai
Isn't plplot an option for you? TL;DR, but it seems it can serve that purpose you need it for. On 2 Dec 2014 18:10, jcup...@gmail.com wrote: On 2 December 2014 at 16:17, Sergei Naumov vo...@rambler.ru wrote: I think this question was asked many times but googling gives a rather patchy

Re: GtkHeaderBar minimu width

2014-10-11 Thread Gergely Polonkai
://www.ekiga.org ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list Best, Gergely Polonkai ___ gtk-app-devel-list mailing list gtk-app

Re: Understanding accelerators.

2014-10-07 Thread Gergely Polonkai
Mnemonics are discouraged by the HIG, and AFAIK they are not displayed by recent GTK versions. From the user's perspective, I think there is no difference. However, if you are using GApplication/GtkApplication, it is easier to register accels, and you can even make them easily customizable for

Re: Understanding accelerators.

2014-10-07 Thread Gergely Polonkai
: On 10/07/2014 09:18 AM, Gergely Polonkai wrote: Mnemonics are discouraged by the HIG, and AFAIK they are not displayed by recent GTK versions. From the user's perspective, I think there is no difference. However, if you are using GApplication/GtkApplication, it is easier to register

Re: Deprecated function ed icons on button

2014-10-06 Thread Gergely Polonkai
the concept, I'd like to introduce gtk_button_new_from_icon_name() :) For this, you need GTK 3.10, though, but it's a shorthand for the above. Personally, I prefer using Glade/GtkBuilder, although Glade doesn't support some of the newer widgets, and gives you hard times with other stuff. Best, Gergely

Re: convert gtktable to gtkgrid

2014-09-23 Thread Gergely Polonkai
Hello, you have to change the GtkTable object class to a GtkGrid (obviously). Also, (x|y)-options and (x|y)-padding are not present in the GtkGrid, so you have to remove those packing definitions (child properties). If you have multiple GtkTables with lots of children, I don’t think there is an

Re: more of a C question than GTK+3.0??

2014-09-06 Thread Gergely Polonkai
On 6 Sep 2014 03:12, Gary Kline kl...@thought.org wrote: = Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 28 years of service to the Unix community. things that I *thought* might work by using s =

Re: more of a C question than GTK+3.0??

2014-09-06 Thread Gergely Polonkai
: = Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 28 years of service to the Unix community. On Sat, Sep 06, 2014 at 08:08:34AM +0200, Gergely Polonkai wrote: On 6 Sep 2014 03:12, Gary Kline kl...@thought.org wrote: = Organization: Thought

Re: how to i get the arrow-buttons moving?

2014-09-04 Thread Gergely Polonkai
community. On Thu, Sep 04, 2014 at 12:32:06AM +0200, Gergely Polonkai wrote: Hello Gary, do I get it right, you want to manupulate/query the labels upon keypresses? Like when the user presses the Up arrow, fetch the text of the first label and print it somewhere? *YES

Re: how to i get the arrow-buttons moving?

2014-09-03 Thread Gergely Polonkai
Hello Gary, do I get it right, you want to manupulate/query the labels upon keypresses? Like when the user presses the Up arrow, fetch the text of the first label and print it somewhere? In that case, I’d like to know if you have a GtkApplication with GtkApplicationWindows, or “just” a simple