Re: gtk_dialog_get_action_area() deprecation

2016-12-31 Thread Richard Shann
application. Solutions in between might be OK, but without > knowing what you want to achieve, it's hard to tell. Thank you for you quick reply. I guess the answer to my question was "no". There isn't the manpower to investigate the purpose of this bit of code nor to start re-imag

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

2016-12-30 Thread rbd
On Fri, 30 Dec 2016, cecas...@aol.com wrote: Hi Roger, Would this be similar to using a GtkLayout and a GtkDrawingArea? If you add a drawing area to a layout you get draw scrolling and the layout can update the part of the drawing area shown on the screen even though the drawing might be on

Re: deprecated gtk_cairo_create

2016-12-30 Thread Eric Cashon via gtk-app-devel-list
Message- From: rbd <r...@soest.hawaii.edu> To: gtk-app-devel-list <gtk-app-devel-list@gnome.org> Sent: Fri, Dec 30, 2016 12:24 pm Subject: Re: deprecated gtk_cairo_create Hello Sergei, Unfortunately the use of the gtk3 DrawingArea is a bit obscure and difficult to figure out. How

Re: deprecated gtk_cairo_create

2016-12-30 Thread rbd
Hello Sergei, Unfortunately the use of the gtk3 DrawingArea is a bit obscure and difficult to figure out. However, I have been able to make use of it very effectively in conjunction with Cairo drawing ops. For various reasons I have created a GUI toolkit library which lies between my app

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

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

Re: deprecated gtk_cairo_create

2016-12-30 Thread Colomban Wendling
Le 30/12/2016 à 18:25, Jim Charlton a écrit : > If one does want to draw into a cairo_surface_t, one can create a cairo > context for drawing? E.g. > > cairo_t * > cairo_create (/|cairo_surface_t >

Re: deprecated gtk_cairo_create

2016-12-30 Thread Jim Charlton
On 2016-12-30 05:45 AM, Colomban Wendling wrote: Hi, Le 30/12/2016 à 12:20, Sergei Kolomeeyets a écrit : Hi, everyone […] {draw_callback} gboolean draw_callback(GtkWidget *area, GdkEventExpose *event, GArray *ptLinePoints) { That's not the right signature for the GtkWidget::draw signal: it

Re: deprecated gtk_cairo_create

2016-12-30 Thread Colomban Wendling
Le 30/12/2016 à 15:09, Sergei Kolomeeyets a écrit : > Hi, Colomban > Thanks a lot for you hint! I realised the idea of wrong event hanling. > Do you mean that I SHOULD DO NOTHING to create a cairo context BECAUSE > IT IS in the draw event callback function obligatory parameters? And, if > yes, I

Re: deprecated gtk_cairo_create

2016-12-30 Thread Colomban Wendling
Hi, Le 30/12/2016 à 12:20, Sergei Kolomeeyets a écrit : > Hi, everyone > […] > > {draw_callback} > > gboolean draw_callback(GtkWidget *area, GdkEventExpose *event, GArray > *ptLinePoints) { That's not the right signature for the GtkWidget::draw signal: it takes a cairo_t* as the second

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

2016-12-13 Thread Ondrej Tuma
Sure, right, that is what i need. Thank you so much. V Tue, 13 Dec 2016 20:44:52 +0100 infirit napsáno: > Op 12/13/2016 om 08:03 PM schreef Ondrej Tuma: > > You are near. Application is Mind Map Architect. So I get / use > > system colors by default to set map background,

Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-13 Thread Ondrej Tuma
Hi, my critics: Missing Action Helper class: https://bugzilla.gnome.org/show_bug.cgi?id=768228 Non inherited classes like Gtk.FileFilter (https://bugzilla.gnome.org/show_bug.cgi?id=724347) or Gtk.Menu .. Missing to_css method to generate right css from PangoFontDescription and the last time,

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

2016-12-13 Thread infirit
Op 12/13/2016 om 08:03 PM schreef Ondrej Tuma: > You are near. Application is Mind Map Architect. So I get / use system > colors by default to set map background, selected / normal nodes etc. You probably will get what you want with gtk_style_context_get, so something like below: GdkRGBA

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

2016-12-13 Thread Ondrej Tuma
V Tue, 13 Dec 2016 16:46:51 +0100 infirit napsáno: > Op 12/13/2016 om 03:10 PM schreef Ondrej Tuma: > > Now, if I want to get these settings from GTK+, I must doing some > > breakneck magic, and I'm still don't know, if I'll get it. That are > > the obstacles. > > >

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

2016-12-13 Thread infirit
Op 12/13/2016 om 03:10 PM schreef Ondrej Tuma: > Now, if I want to get these settings from GTK+, I must doing some > breakneck magic, and I'm still don't know, if I'll get it. That are the > obstacles. Instead of complaining what was and is no more explain what you are trying to accomplish and

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

2016-12-13 Thread Ondrej Tuma
Thank's for your answer. I understand what is do under the public API. But when I'm using CSS (which is great idea for styling desktop application) in browser, i have still base tools (methods or access) to all display attributes like color, image, gradient, radius or what i need. Now, if I want

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 >

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

2016-12-13 Thread Ondrej Tuma
Hi, yeah, but what can i do, when i need to draw, yes really draw (mind maps) my own widgets. I don't need to gtk_render_frame, because, i need to draw all node on map with it's special attributes like size, color etc. And yes, I do that with cairo. GtkStyle is deprecated, get_border_color from

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

2016-12-12 Thread Joël Krähemann
... Further you might want to use GtkReliefStyle as doing borders. cheers, Joël On Tue, Dec 13, 2016 at 7:39 AM, Joël Krähemann wrote: > Hi > > I think all gtk drawing primitives are deprecated. You should use cairo > instead. > > bests, > Joël > > > On Tue, Dec 13,

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

2016-12-12 Thread Joël Krähemann
Hi I think all gtk drawing primitives are deprecated. You should use cairo instead. bests, Joël On Tue, Dec 13, 2016 at 7:37 AM, Joël Krähemann wrote: > Hi Ondrej > > What about using GtkStyle? > > gtk_widget_get_style() > > Bests, > Joël > > > On Tue, Dec 13, 2016 at

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

2016-12-12 Thread Joël Krähemann
Hi Ondrej What about using GtkStyle? gtk_widget_get_style() Bests, Joël On Tue, Dec 13, 2016 at 6:33 AM, 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 >

Re: Strange 'regression' in gtk+/gstreamer app

2016-12-12 Thread Eric Cashon via gtk-app-devel-list
My guess is that it has something to do with how GTK is drawing. Look at the double buffered reference. https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-double-buffered For drawing transparent backgrounds GTK changed something in the drawing code in 3.10. When I was

Re: Strange 'regression' in gtk+/gstreamer app

2016-12-12 Thread Nathanael D. Noblet
Hello Eric, Thanks for the reply. Yeah I forgot to mention that in the Glade file I had set double buffered to false for both GtkDrawingAreas. I also tried setting them to false directly in code once I finish loading/configuring it from the glade file. gtk_builder_connect_signals (builder,

Re: Strange 'regression' in gtk+/gstreamer app

2016-12-12 Thread Nathanael D. Noblet
Hello Eric, Thanks for the reply. Yeah I forgot to mention that in the Glade file I had set double buffered to false for both GtkDrawingAreas. I also tried setting them to false directly in code once I finish loading/configuring it from the glade file. gtk_builder_connect_signals (builder,

Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-11 Thread Eric Cashon via gtk-app-devel-list
You can create your own widgets to look and work like you want with GTK+. There is a good example on the gtkmm tutorial which is worth looking at if you are interested in doing this. It also shows a little on how you can use CSS to set some properties on your new widget.

Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-11 Thread Nicolas Brack
> 1. The 3 states button. > --- > > The most important, the most easy to implement is the idea of a button which > can take 3 different states. > > I had this idea because I often have the need of something that I have called > the triboolean logic. > > Which consist of

Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-11 Thread Tristan Van Berkom
On Sun, 2016-12-11 at 10:18 +0100, eddie wrote: > Hi to all gtk+ users, > > At first I get few ideas about some new widgets. > > > > 1. The 3 states button. > --- > > The most important, the most easy to implement is the idea

Re: Strange 'regression' in gtk+/gstreamer app

2016-12-09 Thread Eric Cashon via gtk-app-devel-list
It could be a problem with the double buffering. gtk_widget_set_double_buffered() Try to set that to false and see if that makes any difference. This is on Linux? Usually you don't need this function any more and it is deprecated but it can sometimes still be useful. I know to get gnuplot

Re: Cannot send a notifications onto a gnome desktop environment, what do I wrong.

2016-12-07 Thread Ben Iofel
For GNotification to work, you need a .desktop file installed with the same name as your application-id Otherwise you can use libnotify directly without a .desktop file On Tue, Dec 6, 2016, 2:01 PM eddie wrote: > Hi everybody, > > I have write the following code but

Re: The Big Gtk limitations: a reliable GUI builder

2016-12-01 Thread Jean-Philippe Chancelier
Pozz> So this is a Windows only *Gtk* bug, it isn't related to Glade. Pozz> Considering it affects all drag operations for every Gtk Pozz> applications, it's very strange it wasn't fixed yet. I think t's a recent bug ing gtk+-3. The bug did not exist in gtk+-3.18 but drag and

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-30 Thread Daniel Kasak
On Thu, Dec 1, 2016 at 12:32 AM, Pozz Pozz wrote: > So this is a Windows only *Gtk* bug, it isn't related to Glade. > Considering it affects all drag operations for every Gtk applications, > it's very strange it wasn't fixed yet. > > My first impression is Gtk is a product

Re: How to find replacements for deprecated functions

2016-11-30 Thread Emmanuele Bassi
Hi; for direct replacements, we use compiler warnings that will tell you what to use - or point you in the general direction; e.g. something like "The function X has been deprecated; use Y instead". If you're using a high level language, it depends on the language; AFAIK Python will emit a

Re: How to find replacements for deprecated functions

2016-11-30 Thread Erik de Castro Lopo
Emmanuele Bassi wrote: > There is no direct replacement for GtkUIManager, in the sense that > there is no API that you can use to immediately replace GtkUIManager. > > GtkUIManager has been deprecated for a long time — it was deprecated > in GTK+ 2.x, so it's not really a GTK+ 3.x issue. Ok, so

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-30 Thread Nicola Fontana
Il Wed, 30 Nov 2016 14:35:59 +0100 Pozz Pozz scrisse: > 2016-11-30 9:09 GMT+01:00 Nicola Fontana : > > > ... > > If your workflow heavily rely on a GUI > > builder, you have 4 options: (1) use glade as is, (2) prepare to > > file bugs and wait for the fixes,

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-30 Thread Pozz Pozz
2016-11-30 9:09 GMT+01:00 Nicola Fontana : > Il Wed, 30 Nov 2016 11:08:13 +1100 Daniel Kasak > scrisse: > > > ... > > My normal workflow is to lay things out *roughly* in glade, then > > actually run the app and see what it looks like. > > ... > > This is

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-30 Thread Pozz Pozz
2016-11-30 9:25 GMT+01:00 Jean-Philippe Chancelier : > > pozzugno> Another problem, is very difficult to drag one or more > pozzugno> widgets (under a sub-tree) between two places. When I click > on a > pozzugno> widget (or container) and start moving, the mouse

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

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-30 Thread Jean-Philippe Chancelier
pozzugno> Another problem, is very difficult to drag one or more pozzugno> widgets (under a sub-tree) between two places. When I click on a pozzugno> widget (or container) and start moving, the mouse pointer pozzugno> disappears at all, so the target place is very difficult to

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-30 Thread Nicola Fontana
Il Wed, 30 Nov 2016 11:08:13 +1100 Daniel Kasak scrisse: > ... > My normal workflow is to lay things out *roughly* in glade, then > actually run the app and see what it looks like. > ... This is my workflow too, apart the fact that after the first draft I prefer to edit

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-29 Thread Andrea Zagli via gtk-app-devel-list
Il giorno mer 30 nov 2016 01:08:13 CET, Daniel Kasak ha scritto: I can confirm both these bugs ( crash copying the treeview, margins not rendered under altering properties ) under Linux. Actually the top and bottom margins are rendered immediately, but the left and right margins need you to

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-29 Thread Michael Torrie
On 11/29/2016 04:28 PM, pozzugno wrote: > First of all, I'm using Glade 3.20.0 for Windows, installed through > Msys2 project. I don't know if Glade is more stable under Linux OS. In my opinion, GTK is definitely more stable under Linux than Windows. he truth is, 90% of GTK developers (or more)

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-29 Thread Daniel Kasak
simple fix for this one. No idea why the treeview is crashing for you - you've possibly gotten the XML file into an invalid state that Glade doesn't like. Anyway, you should enter these in bugzilla :) I don't drag + drop either - I just cut/copy/paste things around. Re: the treeview being rendered

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-29 Thread pozzugno
First of all, I'm using Glade 3.20.0 for Windows, installed through Msys2 project. I don't know if Glade is more stable under Linux OS. When I open a file, non-null margins aren't rendered correctly. Take a look at the screencast [1]. As soon as I change one margin (from 10 to 11, for

Re: The Big Gtk limitations: a reliable GUI builder

2016-11-29 Thread Daniel Kasak
Glade crashes sometimes, yes. It's been much better recently - 3.20 seems pretty stable for me. I don't edit liststores in glade at all, so I can't comment on that - I construct and populate them dynamically, and use glade just to place the treeview. I don't really have the other issues you're

Re: Debugging propagated events

2016-11-29 Thread zahlenmeer
I added some logic and after that I got a warning that there is a mismatch between cairo_save and cairo_restore. So I fixed that and I got it working. The cairo logic was faulty all the time but only some new lines of code triggered that warning. So I guess I was just lucky that I stopped

Re: Debugging propagated events

2016-11-28 Thread Jim Charlton
In Gtkmm (C++) you can overload the on_draw() function with your own. This might give you a foothold in the on_draw() routine that is called after a redraw event occurs. I guess in GTK you would have to connect a callback function to the "draw" signal. Might help.?? jim... On 2016-11-28

Re: Debugging propagated events

2016-11-28 Thread Alfonso Arbona Gimeno
Hi, Why don't you link against the debug version of the library so that it shows you the complete stack? It will give you some extra clues on why the segfault is happening. Regards, Alfonso Arbona On November 29, 2016 6:17:05 AM GMT+09:00, zahlenm...@gmx.de wrote: >For a custom widget I have a

Re: Debugging propagated events

2016-11-28 Thread zahlenmeer
This was one of the first things I did. Debug compilation option, debug CFLAGS, no stripping - without a change. The backtrace only shows 3 lines, my draw function and two from libc. The faulty address is not null. But the segfault happens after the return where all local variables are no longer

Re: accelerator keys for (right-click) menu only work after menu has been through a show-all

2016-11-25 Thread Dan Hitt
So Martin Horauer pointed out the solution to me, in private mail thanks Martin!! I'm recounting his solution here in case somebody else hits this problem and is searching the net for something and gets to this thread. He gave me a link to a site

Re: gtk+-3.10.4 bundle and gtk+3.6 or what bundle for application 1 -10

2016-11-22 Thread pelzflorian (Florian Pelz)
On 11/22/2016 12:04 AM, songqing shan wrote: > Hi, > > > I would like to have anyone to help me. > > > I use MinGW+msys and gtk+-3.10.4 bundle to compile examples on the >

Re: Font Description to CSS string

2016-11-21 Thread Ondrej Tuma
Hello, my mistake, I want to easy generate CSS data from PangoFontDescription https://developer.gnome.org/pango/stable/pango-Fonts.html#PangoFontDescription that i means generate string like: { font-family: Geneva CE; font-size: 12px; font-style: italic;

Re: Editable SpinButton on a TreeView: detect *every* changes

2016-11-15 Thread Pozz Pozz
2016-11-15 6:27 GMT+01:00 Tristan Van Berkom : > Hi, > > On Tue, 2016-11-15 at 02:09 +0100, pozzugno wrote: > [...] > > I have tried to catch "editing_started", "editing_canceled" and > > "edited" > > signals of CellRenderer. In "editing_started" callback, I

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

2016-11-15 Thread Damien Caliste
Hello, Le 14/11/2016, Pozz Pozz a écrit : > Of course, I'm supponsing the case of several parameters that have > different values but the same range properties (min, max, page > step, ...) You may implement your use case using bindings. You have a master GtkAdjusment, or even

Re: Editable SpinButton on a TreeView: detect *every* changes

2016-11-14 Thread Tristan Van Berkom
Hi, On Tue, 2016-11-15 at 02:09 +0100, pozzugno wrote: [...] > I have tried to catch "editing_started", "editing_canceled" and > "edited"  > signals of CellRenderer. In "editing_started" callback, I retrieve > and  > save the row and column of the cell the user is going to edit. I > also  >

Re: Editable SpinButton on a TreeView: detect *every* changes

2016-11-14 Thread pozzugno
Il 14/11/2016 18:19, Pozz Pozz ha scritto: I created with success a TreeView based on a ListStore. One column has a SpinButton (actually a GtkCellRendererSpin). Now I want to detect when the user *is* changing the value, i.e. every time he clicks on + or - buttons. If I connect the "edited"

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

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

2016-11-14 Thread Pozz Pozz
2016-11-14 16:39 GMT+01:00 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 >

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

Re: GtkEntry placeholder in GTK2

2016-11-14 Thread Colomban Wendling
Hi, Le 14/11/2016 à 14:30, Gabriele Greco a écrit : > I know GTK 3.2+ has a nice gtk_entry_set_placeholder_text() method, but I'm > wondering if there is some clever method to do something similar with GTK2, > I've not found anything googling around, but placeholder texts are a so > common

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 = >light[GTK_STATE_PRELIGHT]; > into proper Gtk3. The documentation says: > "One notable difference is the reduction from fg/bg/text/base colors to > only

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-03 Thread infirit
Op 11/03/2016 om 10:47 AM schreef pozzugno: > Another situation, similar to mine. You have a dialog window with a > SpinButton showing the volume speaker. When the dialog is shown, the > SpinButton value should be the current volume level. The user could > change the volume speaker by changing the

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-03 Thread pozzugno
Il 03/11/2016 01:20, infirit ha scritto: Op 11/03/2016 om 12:19 AM schreef pozzugno: Il 02/11/2016 18:55, Nicola Fontana ha scritto: Il Wed, 2 Nov 2016 14:40:58 +0100 Pozz Pozz scrisse: 2016-11-02 11:24 GMT+01:00 Nicola Fontana : ... you don't

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-03 Thread pozzugno
Il 03/11/2016 00:48, Michael Torrie ha scritto: On 11/02/2016 05:19 PM, pozzugno wrote: It seems pyGObject implementation gives only two "handler block" functions: handler_block(), that needs the handler_id that I don't have; handler_block_by_func() that needs the callback to block (the same

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-02 Thread Michael Torrie
On 11/02/2016 05:19 PM, pozzugno wrote: > It seems pyGObject implementation gives only two "handler block" > functions: handler_block(), that needs the handler_id that I don't have; > handler_block_by_func() that needs the callback to block (the same > problem of your solution, because I have

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-02 Thread pozzugno
Il 02/11/2016 18:55, Nicola Fontana ha scritto: Il Wed, 2 Nov 2016 14:40:58 +0100 Pozz Pozz scrisse: 2016-11-02 11:24 GMT+01:00 Nicola Fontana : ... you don't necessarily need the handler id. In C (I don't use python) you could write the following: void

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-02 Thread Nicola Fontana
Il Wed, 2 Nov 2016 14:40:58 +0100 Pozz Pozz scrisse: > 2016-11-02 11:24 GMT+01:00 Nicola Fontana : > > ... > > > > you don't necessarily need the handler id. In C (I don't use > > python) you could write the following: > > > > void my_set_value(GtkSpinButton

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-02 Thread Nicola Fontana
Il Wed, 2 Nov 2016 10:23:44 +0100 Pozz Pozz scrisse: > ... > How do you implement the generic function _my_set_value()? It should have > two parameters: spinbutton and value. signal_handler_block() function needs > the handler_id associated that I don't have. > Maybe during

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-02 Thread Nicola Fontana
Il Wed, 2 Nov 2016 00:09:29 +0100 pozzugno scrisse: > ... > A simple and clear sequence of instructions: > >_set_value() >_set_value() >.. > > will be transformed in a complex, long and cryptic sequence of > instructions: > >_block() >_set_value() >

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-01 Thread pozzugno
I already thought of blocking handlers during refresh, but it means adding two instructions (_block and _unblock) for each set_value(). A simple and clear sequence of instructions: _set_value() _set_value() .. will be transformed in a complex, long and cryptic sequence of instructions:

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-01 Thread Chris Moller
Have you tried g_signal_handler_block (gpointer instance, gulong handler_id); and g_signal_handler_unblock (gpointer instance, gulong handler_id); Putting these before and after your set_value() should temporarily block the handler. You get the handler_id from g_signal_connect(...):

Re: gtkdoc-scan make interfaces public

2016-10-28 Thread Joël Krähemann
Hi all I just substituted in libags-sections.txt the SUBSECTION from Standard to Public and it gives me the desired result. ags_applicable AgsApplicable AgsApplicableInterface ags_applicable_set_update ags_applicable_apply ags_applicable_reset AGS_TYPE_APPLICABLE ags_applicable_get_type

Re: GTK glade SQLite Problem

2016-10-24 Thread Daniel Kasak
Have a look at one of my projects. They're in Perl, but the logic flow is the same: http://search.cpan.org/~dkasak/Gtk3-Ex-DBI-3.2/lib/Gtk3/Ex/DBI/Form.pm Briefly, there are issues in your example code. In insert_sqlite() you need to fetch values back from your builder object. In perl, you'd do

Re: glade and signals connection

2016-10-19 Thread rastersoft
Hi: You can create a class (and instantiate an object) with the methods, and pass "self" to connect_signals. Something like: class myclass: def __init__(self): builder = Gtk.Builder() builder.add_from_file("example.glade") builder.connect_signals(self) def

Re: GTK menus on Ubuntu

2016-10-14 Thread Richard Shann
> Message: 1 > Date: Thu, 13 Oct 2016 09:49:53 -0400 (EDT) > From: Allin Cottrell <cottr...@wfu.edu> > To: Jason Benjamin <hexusne...@gmail.com> > Cc: gtk-app-devel-list@gnome.org > Subject: Re: GTK menus on Ubuntu > Message-ID: > <alpine.LNX.2.20.3.1

Re: g_date_time_format not utf8 under win?

2016-10-13 Thread Joël Krähemann
Hi you might want to use before gtk_init(): putenv("LC_ALL=C.UTF-8\0"); putenv("LANG=C.UTF-8\0"); Bests, Joël On Tue, Oct 11, 2016 at 9:11 AM, Andrea Zagli wrote: > i use g_date_time_format %A to get the full weekday name > > but under win i saw that the function

Re: GTK menus on Ubuntu

2016-10-13 Thread Allin Cottrell
On Tue, 11 Oct 2016, Jason Benjamin wrote: On Wed, 5 Oct 2016 21:11:41 -0400 (EDT) Allin Cottrell wrote: I'm wondering if anyone knows the machanism whereby Ubuntu "commandeers" the main menu system of a GTK application and sticks it into the global top-of-screen menu bar,

Re: GTK menus on Ubuntu

2016-10-11 Thread Jason Benjamin
On Wed, 5 Oct 2016 21:11:41 -0400 (EDT) Allin Cottrell wrote: > I'm wondering if anyone knows the machanism whereby Ubuntu > "commandeers" the main menu system of a GTK application and sticks > it into the global top-of-screen menu bar, or combines it with the >

Re: GTK+2 vs. GTK+3 signal ?expose/draw/render? events (F.Reiter)

2016-10-05 Thread Sébastien Le Roux
Dear all, thanks for your help and advise, I found out what I was doing wrong, and solved my problem, I was updating my window using: void update () { gtk_widget_hide (plot); gtk_widget_show (plot); } While I should have been using: gtk_widget_queue_draw (plot); That solves everything, to

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 >

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

2016-10-04 Thread F.Reiter
On Mo, 2016-10-03 at 22:54 +0200, Sébastien Le Roux wrote: ad: > * (a) GTK2 + GtkGlext : works great ! > * (b) GTK3 + X11 : works just fine ! > * (c) GTK3 + GtkGLArea : does not work :-( > The OpenGL rendering is significantly slower in (b) than in (a) .. > * (a) : once > * (b) : 5

Re: gtkdoc-scan make interfaces public

2016-09-26 Thread Matthias Clasen
On Wed, Jun 1, 2016 at 3:40 AM, Joël Krähemann wrote: > Hi > > I want to generate an API reference of my libraries. How to tell > gtkdoc-scan to make interfaces public? Currently interfaces don't have > cross references. I figured out how I can modify gtkdoc-scan to do >

Re: listening to stdin in the controlling terminal after gtk_main is called

2016-09-14 Thread Dan Hitt
Well thank you Ben for your very speedy reply. I'll see what i can do with it. dan On Wed, Sep 14, 2016 at 10:06 PM, Ben Iofel wrote: > create a GIOChannel with g_io_channel_unix_new() and then add it to the main > context with g_io_add_watch() > > On Thu, Sep 15, 2016 at

Re: listening to stdin in the controlling terminal after gtk_main is called

2016-09-14 Thread Ben Iofel
create a GIOChannel with g_io_channel_unix_new() and then add it to the main context with *g_io_add_watch() * On Thu, Sep 15, 2016 at

Re: Adding and removing widgets at runtime

2016-09-13 Thread Daniel.
I don't know the gtk specific case. But since the calls are synchronous and can take severals miliseconds, doing it on GUI thread would make the UI unresponsive. 2016-09-12 21:29 GMT-03:00 Ben Iofel : > Why not just make async network requests on the UI thread? > > > On Mon,

Re: Adding and removing widgets at runtime

2016-09-12 Thread Ben Iofel
Why not just make async network requests on the UI thread? On Mon, Sep 12, 2016 at 12:37 PM Daniel. wrote: > Well, if I wasn't clear before my layout is totally questionable. I > more generic question would be: > > How you guys aproaches when the problem is showing

Re: Adding and removing widgets at runtime

2016-09-12 Thread Nicola Fontana
Il Mon, 12 Sep 2016 13:37:04 -0300 "Daniel." scrisse: > Well, if I wasn't clear before my layout is totally questionable. I > more generic question would be: > > How you guys aproaches when the problem is showing applications > behavior on screen? Hi, I don't see any

Re: Adding and removing widgets at runtime

2016-09-12 Thread Daniel.
Well, if I wasn't clear before my layout is totally questionable. I more generic question would be: How you guys aproaches when the problem is showing applications behavior on screen? My backend logic is something like this: - Start a new thread for each address passed in command line. Address

Re: Adding and removing widgets at runtime

2016-09-12 Thread Daniel.
Hi thank you guys for the replies, Gergely, I can't really use FlowBox since I'm depending on gtk2, not 3. So the solution is really implementing my own widget as Joël said .. Joël in swing I usually use an event queue so that there is only one thread doing GUI modifications. Is that pattern used

Re: Adding and removing widgets at runtime

2016-09-12 Thread Joël Krähemann
Hi again Don't mess synchronized with a mutex. The closest thing to synchronized would be ags_task_thread_append_task() and run things exclusively http://git.savannah.gnu.org/cgit/gsequencer.git/tree/ags/thread/ags_task_thread.h?h=0.7.x bests, Joël On Mon, Sep 12, 2016 at 5:50 PM, Joël

Re: Adding and removing widgets at runtime

2016-09-12 Thread Joël Krähemann
Hi Since I know Javax/Swing I can tell you there is no synchronize keyword doing your magic. Please take a look at pthread_mutex_lock(), pthread_cond_wait(), pthread_cond_signal(), pthread_cond_broadcast() or pthread_barrier_wait(). Bests, Joël On Mon, Sep 12, 2016 at 5:17 PM, Joël Krähemann

Re: Adding and removing widgets at runtime

2016-09-12 Thread Joël Krähemann
Hi You can't do that without implementing your own widget because of thread-safety issues. To do your own GtkFlowBox implement GtkWidget:size-allocate and GtkWidget:size-request the rest is up to you. Don't forget doing mutices or use g_timeout_add() but this is single threaded and is invoked by

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: How to get objecttype

2016-09-12 Thread Thomas Rønshof
Thanks :-) I've found them all in the gtk include-files. /Thomas Den 09/11/2016 kl. 12:04 AM skrev Ben Iofel: > in C, you can use the GTK_IS_COMO_BOX and GTK_IS_ENTRY macros on > GtkWidget* > > > On Fri, Sep 9, 2016 at 9:14 AM Thomas Rønshof > wrote:

Re: How to get objecttype

2016-09-11 Thread Joël Krähemann
Hi You might want to use G_OBJECT_TYPE() or G_OBJECT_TYPE_NAME() take care that the appriopriate get_type() function is called else the type won't be found. GType button_type; gtk_button_get_type() button_type = g_type_from_name("GtkButton"); g_object_new(button_type,

Re: How to get objecttype

2016-09-10 Thread Ben Iofel
in C, you can use the GTK_IS_COMO_BOX and GTK_IS_ENTRY macros on GtkWidget* On Fri, Sep 9, 2016 at 9:14 AM Thomas Rønshof wrote: > Hi, > > We are converting some OLD COBOL applications to GTK. > The XML is created dynamically from SCREEN SECTIONS and we then use > gtk_builder

Re: How to reactivate (focus?) the main window,

2016-09-08 Thread Joël Krähemann
Hi If your application should get being accepted you should consider ATK https://developer.gnome.org/atk/ else forget the focus handling cheers, Joël Krähemann On Mon, Sep 5, 2016 at 3:25 PM, Joël Krähemann wrote: > Hi > > you might want to look at: > > *

Re: Preventing fade on loss of focus?

2016-09-08 Thread Mark Farver
On Tue, Sep 6, 2016 at 3:54 PM, Mark Farver wrote: > I launch gstreamer as if it was an embedded video, but the output > plugin supplied by the graphics vendor (imxeglvivsink) still causes > the GTK main window to lose focus even when handed a parent window id. I never

Re: Preventing fade on loss of focus?

2016-09-06 Thread Mark Farver
On Tue, Sep 6, 2016 at 3:26 PM, Gergely Polonkai wrote: > 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? I launch gstreamer as if it was an embedded video, but the output plugin supplied by

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 >

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