Re: Combobox focus event

2017-04-11 Thread Thomas Rønshof
Works fine :-))) Thanks Eric. Regards Thomas Den 04/08/2017 kl. 07:30 PM skrev cecas...@aol.com: > > Another thing to give a try is just to set a boolean in the > "set-focus-child" callback. Not sure if this will always work. I think > that it should. > > I don't know the best workaround for

Re: Combobox focus event

2017-04-08 Thread Eric Cashon via gtk-app-devel-list
Another thing to give a try is just to set a boolean in the "set-focus-child" callback. Not sure if this will always work. I think that it should. I don't know the best workaround for the "focus-in-event" in a combo box. It isn't obvious how to connect that signal for the combobox. Eric

gtk function with argv

2017-04-08 Thread Rúben Rodrigues
Why guys, I have a doubt that is more about C language that gtk+ but it's to apply to gtk+. I have this function: GtkChart vChart_Init(GtkWidget *widget, GtkSeries *series) My doubt is: How can i use function like this: vChart_Init(GTK_WIDGET(widget), "Series A", "Series B", "Series C"); I

Re: Combobox focus event

2017-04-07 Thread Thomas Rønshof
Thanks :-)) I'l try that. Thomas On 07-04-2017 23:10, cecas...@aol.com wrote: Hi Nicola, The "set-focus-child" on the container fires for the "focus-in-event" and "focus-out-event". I forgot about those container functions though. You can get the toggle button pointer from the

Re: Newest GTK platform

2017-04-07 Thread Thomas Rønshof
But can all GTK´progams run without problems on a Wayland platform ? On 07-04-2017 17:22, Chris Moller wrote: Yes, Fedora comes with Wayland as the default, and probably two-thirds of the code I write involves GTK+. I recommend Fedora--I just find it easier to keep updated, and find

Re: Combobox focus event

2017-04-07 Thread Eric Cashon via gtk-app-devel-list
Hi Nicola, The "set-focus-child" on the container fires for the "focus-in-event" and "focus-out-event". I forgot about those container functions though. You can get the toggle button pointer from the container and set up your "focus-in-event". That way there is no ugly business of using a

Re: Combobox focus event

2017-04-07 Thread Nicola Fontana
Il Fri, 7 Apr 2017 13:52:57 -0400 Eric Cashon via gtk-app-devel-list scrisse: > Thomas, > > Your original question looked easy. Connect the "focus-in-event" to the combo > box and everything will work fine. > ... Hi, GtkComboBox is a GtkContainer, so I would

Re: Combobox focus event

2017-04-07 Thread Eric Cashon via gtk-app-devel-list
Thomas, Your original question looked easy. Connect the "focus-in-event" to the combo box and everything will work fine. The "focus-in-event" works with other widgets. So I tried it out. Couldn't get it to work. Tried changing some combo box functions around and still couldn't get it to work.

Newest GTK platform

2017-04-07 Thread tr
Hi, Currently I use Cent-OS for GTK-dev, we are moving to GTK-3. Cent-OS hasn't the latest GTK-versions, so which do you recommend ? I don't want to download sources and compile, so I'm looking for a Linux dist, which has the newest versions. Ubuntu or Fedora ? I've heard that Fedora comes

Re: Combobox focus event

2017-04-07 Thread tr
Hi Eric, Thanks a lot, looks good. I will try it. If I want the same feature with other widgets, then I can find the structs in the sources from GTK ? Thomas On 04/06/2017 10:43 PM, cecas...@aol.com wrote: Hi Thomas, You can try getting the private toggle button in the combo box. This

Re: Combobox focus event

2017-04-06 Thread Eric Cashon via gtk-app-devel-list
Hi Thomas, You can try getting the private toggle button in the combo box. This isn't a solution using the given GTK api but if you want to inspect the how to get the "focus-in-event" to work with a combo box, this might be helpful. You are working in C right? Eric /* gcc -Wall

Combobox focus event

2017-04-05 Thread Thomas Rønshof
Hi, I can't get focus-in-event to work for a combobox. It seems others have the same problem, when I google. Is there a way to get an event when clicking on a combobox ? Either with the mouse or with TAB. Regards Thomas ___ gtk-app-devel-list

GtkIconView empty rows

2017-04-04 Thread zahlenmeer
Let's start with what I try to achieve in the end: I want to have a grid widget where I can freely fill the cells (so its possible - and likely - that there is empty space between the items) and have the same convenience for rendering (I just have to specify the label and the pixbuf, rendering

Re: GFileMonitor - g_signal_handler_block "changed" signal doesn't block handler?

2017-04-01 Thread David C. Rankin
On 04/01/2017 01:04 PM, cecas...@aol.com wrote: > > Hi David, > > Not sure about this one. I tested some code out to see if I could figure it > out. Had the same problem that you had with the "changed" signal not being > blocked. If I change the rate of the file monitor and try to spool out the

Re: GFileMonitor - g_signal_handler_block "changed" signal doesn't block handler?

2017-04-01 Thread Eric Cashon via gtk-app-devel-list
Hi David, Not sure about this one. I tested some code out to see if I could figure it out. Had the same problem that you had with the "changed" signal not being blocked. If I change the rate of the file monitor and try to spool out the events, I can block the "changed" signal. Not something

Re: GFileMonitor - g_signal_handler_block "changed" signal doesn't block handler?

2017-03-31 Thread David C. Rankin
On 03/30/2017 03:39 PM, David C. Rankin wrote: > Let me know what the experts think. There is something funny about the way > block/unblock works with GFileMonitor that I'm missing. For normal signals in > the app, I have no problems with block/unblock. I've posted this complete question to:

GFileMonitor - g_signal_handler_block "changed" signal doesn't block handler?

2017-03-30 Thread David C. Rankin
All I have implemented a GFileMonitor/g_file_monitor_file watch for respond to changes to the current file by an external process within an editor[1], but now issuing g_signal_handler_block to prevent the "changed" signal from being handled on normal saves, does not prevent the callback from

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: > >

Re: Input event reduction

2017-03-30 Thread Gabriele Greco
> > > 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 of g_idle_add(func, data); As far as I can see from the

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Thu, 2017-03-30 at 10:21 +0100, Emmanuele Bassi wrote: > g_idle_add() or, better yet, g_main_context_invoke(). Thanks. While I can remember have read your explanations somewhere already, I really missed that g_main_context_invoke() function. ___

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Thu, 2017-03-30 at 11:10 +0200, Nicola Fontana wrote: >  > > As said you can leverage the main loop and unroll yours, e.g.: > > gboolean my_idle_callback() > { > gint n; > for (n = 0; n < 100; ++n) { > ... > } > return FALSE; > } > > should become: > > gboolean

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

Re: Input event reduction

2017-03-30 Thread Nicola Fontana
Il Thu, 30 Mar 2017 09:38:41 +0200 Stefan Salewski scrisse: > On Wed, 2017-03-29 at 23:26 +0200, Nicola Fontana wrote: > >  > > > > idle functions do *not* run in the background so if you don't > > release the CPU you will experience what you described. > > > > AFAIK all the

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Thu, 2017-03-30 at 09:38 +0200, Stefan Salewski wrote: > Currently I wonder if the call of gtk3.mainIteration() inside the > idle > function is possible and if it would help updating the display. In my > first draft of the Nim toy chess I used something like this > > while

Re: Input event reduction

2017-03-30 Thread Stefan Salewski
On Wed, 2017-03-29 at 23:26 +0200, Nicola Fontana wrote: >  > > idle functions do *not* run in the background so if you don't > release the CPU you will experience what you described. > > AFAIK all the GMainLoop code is single-threaded hence, as a > consequence, you will block the UI whenever

Re: Input event reduction

2017-03-29 Thread Nicola Fontana
Il Wed, 29 Mar 2017 21:27:48 +0200 Stefan Salewski scrisse: > ... > > Problem is the idle function added with > > https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-idle-add > > I have the strong feeling, that the provided function is not running >

Re: Input event reduction

2017-03-29 Thread Stefan Salewski
On Wed, 2017-03-29 at 16:47 +0200, Stefan Salewski wrote: > On Wed, 2017-03-29 at 09:42 +0200, Stefan Salewski wrote: > > > > It is still the old problem: > > Well, after some thinking I have the feeling that it may work with > only > an idle function, so no separate thread and message passing

Re: Input event reduction

2017-03-29 Thread Stefan Salewski
On Wed, 2017-03-29 at 09:42 +0200, Stefan Salewski wrote: > It is still the old problem: Well, after some thinking I have the feeling that it may work with only an idle function, so no separate thread and message passing is necessary: The callback set a flag indicating that there is work to do,

Re: SpinButton size

2017-03-29 Thread Rúben Rodrigues
Hi, Thsnks. I need for GTK3 On 29-03-2017 08:51, Stefan Salewski wrote: > On Mon, 2017-03-27 at 14:23 +, Rúben Rodrigues wrote: >> hi guysm >> >> it's possible to change size of spinbuttons? In touchscreen mode >> spinbutton are still small.. We can change it's size with css >> provider?

Re: SpinButton size

2017-03-29 Thread Stefan Salewski
On Mon, 2017-03-27 at 14:23 +, Rúben Rodrigues wrote: > hi guysm > > it's possible to change size of spinbuttons? In touchscreen mode  > spinbutton are still small.. We can change it's size with css > provider? > >  That may be possible... I found some example code in gedit C sources for

Input event reduction

2017-03-29 Thread Stefan Salewski
Well, I think I have asked this already some years ago at gtk-list. (And I spent some hours experimenting with stuff like event_pending() and such, without success.) It is still the old problem: We have input events, for example keystrokes, and a function that can only process a few events per

Re: gdk_threads_leave is possible to cause segmentation fault?

2017-03-28 Thread Rúben Rodrigues
Thanks! So i could replate enter and leave to g_iddle_add, right? gdk_threads_enter(); g_printf("UpdateConfigNow\n"); iUpdateConfigNow(); gdk_threads_leave(); To g_idle_add((GCallback)iUpdateConfigNow, NULL); Why i get this error? Main.c:1824: undefined reference to `g_iddle_add' Thanks

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

2017-03-28 Thread David C. Rankin
On 03/28/2017 10:38 PM, David C. Rankin wrote: > Emmanuele, > > I need more help. I have implemented the watch with 'g_file_monitor_file' > and registered a callback on the "changed" signal for the file, but I cannot > get it to respond to any changes in the underlying file. I got it -- it was

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

2017-03-28 Thread David C. Rankin
On 03/28/2017 01:34 PM, David C. Rankin wrote: > On 03/28/2017 02:06 AM, Emmanuele Bassi wrote: >> Use GFileMonitor from GIO instead of directly dealing with inotify. >> >> Ciao, >> Emmanuele. >> > > Now that is the type of answer I was looking for! Thanks Emmanuele. That > definitely keeps it

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

2017-03-28 Thread David C. Rankin
On 03/28/2017 02:06 AM, Emmanuele Bassi wrote: > Use GFileMonitor from GIO instead of directly dealing with inotify. > > Ciao, > Emmanuele. > Now that is the type of answer I was looking for! Thanks Emmanuele. That definitely keeps it much cleaner. -- David C. Rankin, J.D.,P.E.

GtkIconView with custom icons

2017-03-28 Thread zahlenmeer
Usually, a GtkIconView uses a GtkTreeModel with a few important columns. A column of type G_TYPE_STRING for the label or the markup and a column of type GDK_TYPE_PIXBUF for the icon. In my application I have a G_TYPE_OBJECT derived object that resembles such an icon in the few, a row if you wish.

Re: gdk_threads_leave is possible to cause segmentation fault?

2017-03-28 Thread Gabriele Greco
> But now this functions aren't running. This is my main thread > void *vGtkMain_Thread(gpointer data) > { > gdk_threads_enter(); > gtk_main(); > gdk_threads_leave(); > return NULL; > } > You should remove everywhere in your code gtk_threads_ calls. You cannot call

SpinButton size

2017-03-28 Thread Rúben Rodrigues
hi guysm it's possible to change size of spinbuttons? In touchscreen mode spinbutton are still small.. We can change it's size with css provider? Thanks ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: gdk_threads_leave is possible to cause segmentation fault?

2017-03-28 Thread Gabriele Greco
> > > In gdk manual i see thath gdk_threads_enter and leave has been > deprecated and alll gdk and gtk+ calls should be made from main thread. > How we do this? Someone have any example? > > You have to call g_idle_add (that is thread safe) every time you need to update one or more widgets from an

gdk_threads_leave is possible to cause segmentation fault?

2017-03-28 Thread Rúben Rodrigues
Hi guys, My application sometimes have segmentation fault error. In debug mode and using g_print() i see that the applications stops in gdk_thread_leave function. In gdk manual i see thath gdk_threads_enter and leave has been deprecated and alll gdk and gtk+ calls should be made from main

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

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

2017-03-28 Thread David C. Rankin
All, I have a small editor project I've worked on the past several months[1]. I want to add an `inotify` watch on the current filename after each open or save to detect modification by a foreign process. I have the details of adding the watch and polling the file descriptor with `pselect`,

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-26 Thread Marcin Kolny
Thanks everyone, I'll try all the suggested solutions and pick best that works for me. 2017-03-21 11:20 GMT+00:00 Joël Krähemann : > Hi > > If you do it using cairo you might be interested in the following function. > > cairo_image_surface_get_data() > > You get the pixels

Re: How can i change background color of first column data

2017-03-24 Thread Tilo Villwock
> But i don't know how to change first column background just in the > data. There are two ways. If you need to have individual colors for each row you would define a column that you use to store your background color in for every entry of your GtkListStore. Let's say you define a column as

How can i change background color of first column data

2017-03-24 Thread Rúben Rodrigues
Hi guys, I have a problem with treeview. My first column of treeview where we have data, is yellow. I want to change to other color. How i make this in css? I changed the background color of column header with this code: column-header .button{ background-color: #5b5b5b; color: black;

Re: How use gnome-calculator in my gtk+ app

2017-03-24 Thread Rúben Rodrigues
the best is full interface, if it possible to add gnome-calculator. If not, i will implement just a basic calculator. But i think that is a way to insert other application inside mine, i'm wrong? Thanks On 22-03-2017 09:43, Roth Robert wrote: Hi Ruben, That depends on what do you mean by

Re: GDBus: Implementing multiple interfaces with a single object

2017-03-23 Thread Colin Walters
On Wed, Mar 22, 2017, at 09:12 PM, Colin Walters wrote: > This is for rpm-ostree, so I'll just make it concrete; I started by > doing this For the curious, more information in the PR: https://github.com/projectatomic/rpm-ostree/pull/701#issuecomment-288832291

GDBus: Implementing multiple interfaces with a single object

2017-03-22 Thread Colin Walters
Hey, Is there some example code out there that implements multiple GDBus interfaces using a single GObject? I have an existing subclass of the $prefix_TYPE_$iface_SKELETON and I'd like it to *also* implement a new interface. This is for rpm-ostree, so I'll just make it concrete; I started by

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-22 Thread Stefan Salewski
On Sun, 2017-03-19 at 22:12 +, Marcin Kolny wrote: > I'd like to write very simple application for drawing lines. You can restrict all drawing operations to a rectangle enclosing your line. For each move with button pressed, fill that rectangle with background color and then draw the line

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

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

Is GtkAssistant a toplevel widget?

2017-03-22 Thread songqing shan
Hi, I want anybody can help me as follows. On the GTK3.0 manual, "gtk_widget_is_toplevel()" part says that "Currently only GtkWindow and GtkInvisible (and out-of-process

Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-22 Thread Marcin Kolny
Hi everyone, I'd like to write very simple application for drawing lines. 1) User press button - app saves x and y coordinates 2) User moves the mouse - app dynamically draws potential line on each mouse move event 3) User releases button - app "saves" the line on the canvas. I've tried to

Re: How use gnome-calculator in my gtk+ app

2017-03-22 Thread Roth Robert
Hi Ruben, That depends on what do you mean by adding a calculator: * do you only need a text-field to evaluate calculations from? (easier to implement, spawn a process for the command-line version of calculator to calculate the result, just like the calculator gnome shell search provider does) *

How use gnome-calculator in my gtk+ app

2017-03-22 Thread Rúben Rodrigues
Hi guys, I need to add to my app a calculator. It's possible to add gnome-calculator as child of a container in my app? Thanks Ruben --- Este e-mail foi verificado em termos de vírus pelo software antivírus Avast. https://www.avast.com/antivirus

2 - Touch pan gestures

2017-03-21 Thread Prashant Kumar
Hi everyone, As you might know Gtk currently supports pan gesture with single touch only. I want my application to support 2 - touch panning. More Specifically,I want to keep track of 2nd finger while panning in the process. Is there any way I achieve this ? Thank you.

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

Re: Best practise inheritance

2017-03-21 Thread S. Jacobi
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 > creates for you. > So you say whenever I need access to the objects

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.

Re: Best practise inheritance

2017-03-21 Thread Nicola Fontana
Il Tue, 21 Mar 2017 17:55:31 + Tristan Van Berkom scrisse: > ... >   o I believe the lookups with G_TYPE_INSTANCE_GET_PRIVATE() are just >     as cheap as the pointer dereference (as it will be implemented >     using simple pointer arithmetic). Hi

Re: Best practise inheritance

2017-03-21 Thread Tristan Van Berkom
On Tue, 2017-03-21 at 18:27 +0100, S. Jacobi wrote: > On Mon, 20 Mar 2017 16:01:39 + > Tristan Van Berkom wrote: > > > > > > > Use instance private data, this will not need any priv pointer and > > can be done with th G_DEFINE_TYPE_WITH_PRIVATE() macro,

Re: Best practise inheritance

2017-03-21 Thread S. Jacobi
On Mon, 20 Mar 2017 16:01:39 + Tristan Van Berkom wrote: > > Use instance private data, this will not need any priv pointer and > can be done with th G_DEFINE_TYPE_WITH_PRIVATE() macro, and another > to lookup your private data inside your C file (under

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-21 Thread Joël Krähemann
Hi If you do it using cairo you might be interested in the following function. cairo_image_surface_get_data() You get the pixels stored in your picture. It can be restored using memcpy() what is actually quiet fast. Bests, Joël On Tue, Mar 21, 2017 at 8:26 AM, F.Reiter

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-21 Thread F.Reiter
Hallo, for lightning-fast, xor, rubberbanding, zooming, clipping ..  why not consider Open-GL ? Franz (https://github.com/gcad3d/gcad3d) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-20 Thread rbd
Hello Marcin, I have written a number of gtk3 apps that perform the type of rubberband line drawing you have described. Although I was originally porting apps from an Xlib drawing environment where XOR was available to do lightning-fast 'undraws' of existing line segments and was skeptical

Detect user idle time or inactivity

2017-03-20 Thread Rúben Rodrigues
Hi guys, There is any way to detect user inactivity in my application? Thanks Ruben ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: drawing GtkDrawingArea surface on motion-notify-event

2017-03-20 Thread Eric Cashon via gtk-app-devel-list
Hi Marcin, One approach is to use a GtkOverlay. Draw the shape on the top and then save the coordinates of the shape if it is what you want. Then you can draw the saved shapes on the lower drawing area.

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-20 Thread Dov Grobgeld
The key is to not draw directly, but to invalidate one or more rectangles needed to for changing the image from the old to the new one. I worked on this problem some years ago and I think my solution is very relevant to your question. See the gtk3 branch at: https://github.com/dov/dovtk-lasso .

Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-20 Thread Marcin Kolny
Hi everyone, I'd like to write very simple application for drawing lines. 1) User press button - app saves x and y coordinates 2) User moves the mouse - app dynamically draws potential line on each mouse move event 3) User releases button - app "saves" the line on the canvas. I've tried to

Re: Best practise inheritance

2017-03-20 Thread Joël Krähemann
Hello Mr. Jacobi What I personally like to see is doing events. It makes your OOP extensible. And is the usual way how things are done in GUI programming. But it is not limited to GUI. For instance this event is handled by a GUI callback to toggle a button.

Re: Best practise inheritance

2017-03-20 Thread Joël Krähemann
Hi You don't have to use myWidget->parent since you dereference the pointer. A pointer to a struct always points to the first field of the topmost nesting level. so it would be: gtk_widget_set_name(myWidget); Bests, Joël On Mon, Mar 20, 2017 at 6:29 PM, S. Jacobi

Re: Best practise inheritance

2017-03-20 Thread S. Jacobi
On Mon, 20 Mar 2017 18:10:16 +0100 Joël Krähemann wrote: > Hi > > As Tristan told you. The struct contains the other struct as not using > a pointer. > > struct MyCompositeWidget > { > GtkAlignment alignment; > > GtkBox *box; > }; > The parent-is-a-pointer mistake

Re: Best practise inheritance

2017-03-20 Thread S. Jacobi
On Mon, 20 Mar 2017 16:01:39 + Tristan Van Berkom wrote: > > Use instance private data, this will not need any priv pointer and > can be done with th G_DEFINE_TYPE_WITH_PRIVATE() macro, and another > to lookup your private data inside your C file (under

Re: Best practise inheritance

2017-03-20 Thread Joël Krähemann
Hi No, you can talk in C of direct inheritance. Or implementing an interface. As Tristan told you. The struct contains the other struct as not using a pointer. struct MyCompositeWidget { GtkAlignment alignment; GtkBox *box; }; The properties are inherited, too. As long you use

Re: Best practise inheritance

2017-03-20 Thread Tristan Van Berkom
On Mon, 2017-03-20 at 16:36 +0100, S. Jacobi wrote: > First of all, inheritance may be the wrong word here in plain c, but > I > don't know how else to name it. Sorry replied to this from my phone and missed some things... > In different projects I see different approaches how to derive custom >

Re: Best practise inheritance

2017-03-20 Thread Tristan Van Berkom
Hi > On Mar 20, 2017, at 3:36 PM, S. Jacobi wrote: > > First of all, inheritance may be the wrong word here in plain c, but I > don't know how else to name it. > > In different projects I see different approaches how to derive custom > widgets from existing ones. I

Best practise inheritance

2017-03-20 Thread S. Jacobi
First of all, inheritance may be the wrong word here in plain c, but I don't know how else to name it. In different projects I see different approaches how to derive custom widgets from existing ones. I can roughly group them into 2 to 3. 1) The header only has a typedef to make the struct

Re: Cross platform developmentG

2017-03-20 Thread Nicola Fontana
Il Mon, 20 Mar 2017 03:30:54 +0100 Dirk Gottschalk via gtk-app-devel-list scrisse: > ... > I'll take a look at this. The question was which DLLs are nedded. Hi, in my cross-compiled installer script [1] I've the following list: File

Re: Cross platform development

2017-03-19 Thread Dirk Gottschalk via gtk-app-devel-list
Hi. Am Samstag, den 18.03.2017, 10:07 -0600 schrieb Michael Torrie: > On 03/18/2017 09:16 AM, pelzflorian (Florian Pelz) wrote: > > MSYS2 ships with the pacman package manager. After you have > > followed the > > instructions on the website, launch the MSYS2 shell from the MSYS2 > > folder and

Re: Cross platform development

2017-03-19 Thread Dirk Gottschalk via gtk-app-devel-list
Hi Lucas. Am Sonntag, den 19.03.2017, 10:44 +0100 schrieb Lucas Levrel via gtk- app-devel-list: > Le 18 mars 2017, à 14:37, Dirk Gottschalk via gtk-app-devel-list a > écrit : > > > Am Samstag, den 18.03.2017, 11:42 +0100 schrieb pelzflorian > > (Florian > > Pelz): > > > > > Note that if your

Re: Cross platform development

2017-03-19 Thread jcupitt
On 17 March 2017 at 22:02, Dirk Gottschalk via gtk-app-devel-list wrote: > I'm developing a multi platform application with GTK+ for Windows and > Linux. I make Windows binaries with jhbuild and mingw from linux. I have it all wrapped up in a docker container, so

Re: Cross platform development

2017-03-19 Thread Lucas Levrel via gtk-app-devel-list
Le 18 mars 2017, à 14:37, Dirk Gottschalk via gtk-app-devel-list a écrit : Am Samstag, den 18.03.2017, 11:42 +0100 schrieb pelzflorian (Florian Pelz): Note that if your application is not libre software (it should be, please make it libre!), then static linking means you need to provide your

Re: Cross platform development

2017-03-18 Thread Tomas Hlavaty
"pelzflorian (Florian Pelz)" writes: > On 03/18/2017 08:41 AM, Tomas Hlavaty wrote: >> nixos already supports cross-compilation using mingw out-of-the box. > I did not know. Sounds interesting. It also creates an $out directory with bin dir and symlinks for all

Re: Cross platform development

2017-03-18 Thread Michael Torrie
On 03/18/2017 10:07 AM, Michael Torrie wrote: > He wants to put just the GTK3 dependencies in a tree > somewhere. To do that simply, he could unpack the GTK3 (and glib2) > binary pacman packages if they could be located. Got it. I think they can be downloaded individually here:

Re: Cross platform development

2017-03-18 Thread Michael Torrie
On 03/18/2017 09:16 AM, pelzflorian (Florian Pelz) wrote: > MSYS2 ships with the pacman package manager. After you have followed the > instructions on the website, launch the MSYS2 shell from the MSYS2 > folder and then this command installs everything you need to run gedit > into a filesystem

Re: Cross platform development

2017-03-18 Thread pelzflorian (Florian Pelz)
On 03/18/2017 04:03 PM, Michael Torrie wrote: > On 03/18/2017 07:37 AM, Dirk Gottschalk via gtk-app-devel-list wrote: >> The only chance is, to grab the DLLs from MinGW via objdump ore some >> similar, like recommended and pack them into the applications working >> directory, because Windows

Re: on screen keyboard error with gtk_main_do_event

2017-03-18 Thread Rúben Rodrigues
Someone could help me? Thanks On 16-03-2017 16:54, Ruben ROdrigues wrote: > HI guys, > > I have a on-screen keyboard that was made for gtk2. Now in gtk3 i get > this errors: > > Gdk-CRITICAL **: gdk_window_get_user_data: assertion 'GDK_IS_WINDOW > (window)' failed > > Gdk-CRITICAL **:

Re: Cross platform development

2017-03-18 Thread Michael Torrie
On 03/18/2017 07:37 AM, Dirk Gottschalk via gtk-app-devel-list wrote: > The only chance is, to grab the DLLs from MinGW via objdump ore some > similar, like recommended and pack them into the applications working > directory, because Windows searches DLLs in its System, System32 > subfolders and

Re: Cross platform development

2017-03-18 Thread Dirk Gottschalk via gtk-app-devel-list
Hi Florian, Am Samstag, den 18.03.2017, 11:42 +0100 schrieb pelzflorian (Florian Pelz): > Note that if your application is not libre software (it should be, > please make it libre!), then static linking means you need to provide > your application’s source code or compiled object files upon user

Re: Cross platform development

2017-03-18 Thread pelzflorian (Florian Pelz)
On 03/18/2017 11:25 AM, Lucas Levrel via gtk-app-devel-list wrote: > Le 17 mars 2017, à 23:02, Dirk Gottschalk via gtk-app-devel-list a écrit : > >> I'm developing a multi platform application with GTK+ for Windows and >> Linux. >> >> >> IIRC is GTK+ and it's dependencies not linkable statically,

Re: Cross platform development

2017-03-18 Thread Lucas Levrel via gtk-app-devel-list
Le 17 mars 2017, à 23:02, Dirk Gottschalk via gtk-app-devel-list a écrit : I'm developing a multi platform application with GTK+ for Windows and Linux. IIRC is GTK+ and it's dependencies not linkable statically, which i would prefer. Yes, they are! I use this http://mxe.cc/ for my GTK2 app,

Re: Cross platform development

2017-03-18 Thread pelzflorian (Florian Pelz)
On 03/18/2017 08:07 AM, pelzflorian (Florian Pelz) wrote: > gedit deploys msys2 but removes a bunch of files it does not need. This > way, the binary will end up in a bin/ directory though. Of course you > can make a link or a bat script for launching it in the main directory. > >

Re: Cross platform development

2017-03-18 Thread pelzflorian (Florian Pelz)
On 03/18/2017 04:07 AM, Michael Torrie wrote: > I think some programs stick their binary and libraries in a bin folder, > and GTK can still find it's files. It's more typical for windows apps > to put the EXE in the toplevel folder though. > gedit deploys msys2 but removes a bunch of files it

Re: Cross platform development

2017-03-17 Thread Michael Torrie
On 03/17/2017 04:02 PM, Dirk Gottschalk via gtk-app-devel-list wrote: > 1. Which DLLs do i have to copy from the bin directory of MinGW for my > GTK+-Application. I don't want to install MinGW on all Workstations > where the app should rum. AFAIK it is enough to copy the DLLs into the >

Fwd: Re: Cross platform development

2017-03-17 Thread michinari.nukazawa
Oops! sorry I forget CC for gtk-app-devel-list. Thanks. Forwarded Message Subject:Re: Cross platform development Date: Sat, 18 Mar 2017 08:54:53 +0900 From: michinari.nukazawa To: Dirk Gottschalk

Check if a resource exists

2017-03-17 Thread Iñigo Martínez
Hello, Recently when dealing with css providers I have been trying to figure out a way to check if a given resource exists. This is something that can be achieved by using the error parameter in some functions[0] in GTK 3.0 but it does not exist anymore in GTK 4.0. I could create a GFile with a

Re: Seperating Multiple processes

2017-03-17 Thread Eric Cashon via gtk-app-devel-list
Some follow up on this. If you are starting a separate process to run your transcoding you need to use an async version of your run_cmd(). Otherwise the program will wait until the function returns and bind up the main glib thread if the function takes a while. This might be the easiest way

Re: Unusual behavior of locale switch in GTK2.0 application

2017-03-17 Thread Igor Chetverovod
Hello again, I found solution here: https://mail.gnome.org/archives/gtk-app-devel-list/2008-May/msg00077.html " ... The code in the GNU gettext-runtime that decides what message catalogs to use calls getenv() to check for values of LC_ALL or LANG environment variables. So, what you should do is

Unusual behavior of locale switch in GTK2.0 application

2017-03-17 Thread Igor Chetverovod
Hello All, About 5 years ago a had developped win32 application which is using 2 locales: En and Ru. Application is using GTK v2.24.10, glib v.2.28.8. Lacalization is based on get_text() function and dictionaries genereted by Poedit. Nullsoft NSIS v3.x script is used for installator generation.

Re: How to change GTK+3 label color dynamically

2017-03-16 Thread Rúben Rodrigues
Thanks! In some containers we can't change color of label? I have labels inside GtkLayout, and don't change color with Css but other labels out of this layout change. Why don't works? I do this dynamically but don't works too: GtkCssProvider *css_provider = gtk_css_provider_new();

<    5   6   7   8   9   10   11   12   13   14   >