Re: Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
On Sun, 2016-07-10 at 18:12 +0300, LRN wrote: > If you're using GSettings schema, it should come with a set of > default > values for settings, which would prevent the situation where settings > are > uninitialized. Have just added a few if statements in file ned.nim to fix that color parse proble

Re: Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
On Sun, 2016-07-10 at 19:19 +0200, infirit wrote: > You delete the whole file without restarting your session? Then you may > expect breakage like this, it is like forcefully removing the file you > are editing and then wondering why the editing application complains. > > Either restart the sessio

Re: Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
On Sun, 2016-07-10 at 18:12 +0300, LRN wrote: > If you're using GSettings schema, it should come with a set of default > values for settings, which would prevent the situation where settings are > uninitialized. Have done some basic investigations: proc nimEdAppActivateOrOpen(win: NimEdAppWindow)

Re: Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
On Sun, 2016-07-10 at 20:09 +0200, infirit wrote: > I have written most of my dealings with gsettings down on [1], perhaps > it is useful for you. Thanks for your advice. I have restarted my computer, started my editor and changed color scheme. Terminated and restarted to ensure that it is save i

Re: Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
On Sun, 2016-07-10 at 20:20 +0200, Stefan Salewski wrote: > output after "rm /home/stefan/.config/dconf/user" as long as user has > not selected a custom style scheme is > > gtksource.getStyle(style, "text") == nil > > so the problem is > > http

Re: Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
ur of gtk-source-style-scheme-get-style() does not change, maybe that is intended. Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: "Responsive Design" with Gtk+

2016-07-19 Thread Stefan Salewski
On Tue, 2016-07-19 at 21:29 +1000, sam@sam.today wrote: > In my reddit application, I have this terribly long buttonbox You may try https://developer.gnome.org/gtk3/stable/GtkLabel.html#gtk-label-set-ellipsize for your button labels. For example, I am using it in notebook tab labels in a paned

Setting font for GtkTextView

2016-07-22 Thread Stefan Salewski
From gedit 3.20 we have void gedit_view_set_font (GeditView   *view,  gboolean default_font,  const gchar *font_name) { PangoFontDescription *font_desc; gedit_debug (DEBUG_VIEW); g_return_if_fail (GEDIT_IS_VIEW (view));

Re: 'color-activated' signal not emitting

2016-07-25 Thread Stefan Salewski
On Sat, 2016-07-23 at 16:25 -0400, Craig Cabrey wrote: > According to the docs [0], the "color-activated" signal is emitted > upon > the user making any changes to the current color. No -- read again. ("changes" are not mentioned) For changes you may try the changed signal. The GtkColorChooser ha

Re: 'color-activated' signal not emitting

2016-07-25 Thread Stefan Salewski
On Mon, 2016-07-25 at 11:12 +0100, Emmanuele Bassi wrote: > I think you mean the `notify` signal. Yes, sorry. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

GDK_IS_WINDOW (window) failed

2016-08-07 Thread Stefan Salewski
I have still no concreate idea about this message from my Nim editor ht tps://github.com/ngtk3/NEd Gdk-CRITICAL **: gdk_window_move_resize_internal: assertion 'GDK_IS_WINDOW (window)' failed I get that message for GTK 3.18 when I launch the editor from the command line with two file arguments, a

Plain C code bug example for the experts

2016-08-09 Thread Stefan Salewski
I told you about this bug some days ago, I get it in my Nim editor https://github.com/ngtk3/NEd Here is some minimal C code which seems to show a very similar problem. This is for gtk+-3.18.9 Linux AMD64 The task is to replace a GTK notebook with a paned widget containing two notebooks. To repr

Re: GDK_IS_WINDOW (window) failed

2016-08-11 Thread Stefan Salewski
On Mon, 2016-08-08 at 09:16 +0200, Timm Bäder wrote: > That might be possible of course (especially if your code base does not > contain a widget that creates its own GdkWindows), but the advice is the > same for all criticals and warnings you get: Run in gdb with > G_DEBUG=fatal-warnings or G_DEBU

Re: GDK_IS_WINDOW (window) failed

2016-08-11 Thread Stefan Salewski
On Thu, 2016-08-11 at 13:21 +0200, Timm Bäder wrote: > Depends, lots of distributions offer -dev packages with debugging > symbols. I am using Gentoo, and I think all debugging symbols are stripped by default.  > > > I have some hope that that problem may vanish with GTK 3.20 -- but not > > too

Re: Dynamicly styling a widget

2016-08-26 Thread Stefan Salewski
On Thu, 2016-08-25 at 11:32 -0700, Jim Heald wrote: > figuring out how I can work with colors in Gtk+ You may be not watching the app devel list? There Mr Bassi explained CSS color use recently, and I pointed to a Nim example: https://mail.gnome.org/archives/gtk-app-devel-list/2016-August/msg000

Re: Dynamicly styling a widget

2016-08-26 Thread Stefan Salewski
On Fri, 2016-08-26 at 09:10 +0200, Stefan Salewski wrote: > Mr Bassi explained CSS color use recently, You used the term Event box in your post. If you really refer to https://developer.gnome.org/gtk3/unstable/GtkEventBox.html you should keep in mind that that ones are not graphical eleme

Gnome with high resolution display (4k, 27 inch)

2016-09-22 Thread Stefan Salewski
Recently a did a fresh Gentoo Linux install with Gnome 3.18 GUI. Skylake CPU with integrated graphics connected to a 4k monitor. Initial GUI is very tiny as expected, so I used skaling for Windows factor 2. This gives me this result: http://ssalewski.de/tmp/Gnome3.18_HighDPI.png Generally not t

Re: Gnome with high resolution display (4k, 27 inch)

2016-09-22 Thread Stefan Salewski
Am Donnerstag, den 22.09.2016, 20:08 +0100 schrieb Andrea Giammarchi: > Alternatively, you might try what's suggested in ArchLinux Wiki: Yes, I found the ArchLinux tipps already. export GDK_SCALE=2 seems to be the same as the window scaling in tweak tool, and that scales the windows by factor two

Re: Gnome with high resolution display (4k, 27 inch)

2016-09-23 Thread Stefan Salewski
Am Donnerstag, den 22.09.2016, 20:08 +0100 schrieb Andrea Giammarchi: > On GNOME on ArchLinux for years now Well, author Michael Kofler has reported is his test of Gnome 3.18 exactly my observations, unfortunately only in german language: https://kofler.info/fedora-23-gnome-3-18-im-hidpi-modus-re

Re: Gnome with high resolution display (4k, 27 inch)

2016-09-23 Thread Stefan Salewski
Am Donnerstag, den 22.09.2016, 20:28 +0200 schrieb Stefan Salewski: > Generally not too bad, Ah,main problem solved! http://robert.ocallahan.org/2016/04/gnome-hidpi-issues.html So gsettings set org.gnome.desktop.interface scaling-factor 2 is not really identical to setting scaling in tw

They broke the CSS custom color settings in 3.20

2016-11-12 Thread Stefan Salewski
You may know the Nim editor from https://github.com/ngtk3/NEd Getting tooltips with white background for a dark gtksourceview color scheme was already one of the harder task for GTK 3.18 -- but somehow I managed it. Recently I got GTK 3.20 and had to notice that setting background for tooltip doe

Re: They broke the CSS custom color settings in 3.20

2016-11-12 Thread Stefan Salewski
ented and > unstable: Thank you very much Timm Bäder and Emmanuele Bassi, your explanations will save me much work of try and error and Googling... Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: They broke the CSS custom color settings in 3.20

2016-11-12 Thread Stefan Salewski
On Sat, 2016-11-12 at 10:11 +, Emmanuele Bassi wrote: > If you change ".tooltip" to "tooltip", it should go back to working. As a first step, before trying to understand your responses more deeply, I just tried that. What I got: A tooltip with white background (not fully opaque, that was inde

Re: They broke the CSS custom color settings in 3.20

2016-11-12 Thread Stefan Salewski
On Sat, 2016-11-12 at 19:43 +0100, Stefan Salewski wrote: > Tried to make a > screenshot, Here it is, it works when we make snapshot of whole screen, not only for window http://ssalewski.de/tmp/tooltip_3.20.png Really strange. I can remember that I was not fully happy with the font ren

Re: They broke the CSS custom color settings in 3.20

2016-11-13 Thread Stefan Salewski
On Sat, 2016-11-12 at 21:59 +0100, Stefan Salewski wrote: > So it may be impossible to > avoid black shadow. Some initial great success. Found https://github.com/GNOME/gtk/blob/master/gtk/theme/Adwaita/_common.scss tooltip {   &.background { // background-color needs to be se

Re: They broke the CSS custom color settings in 3.20

2016-11-13 Thread Stefan Salewski
On Sun, 2016-11-13 at 10:45 +0100, Stefan Salewski wrote: > And chances are good that I will find out how to get > black text. No, that seems to be impossible for 3.20. Tooltip text color seems to be hard coded to white :-( ___ gtk-list mailing li

Re: They broke the CSS custom color settings in 3.20

2016-11-13 Thread Stefan Salewski
On Sun, 2016-11-13 at 13:37 +0100, Stefan Salewski wrote: > No, that seems to be impossible for 3.20. Tooltip text color seems to > be hard coded to white :-( And finally... str0 = "tooltip * {color: green;}" This star notation gives me indeed a green text. So I think I will no

Re: They broke the CSS custom color settings in 3.20

2016-11-13 Thread Stefan Salewski
f that info is valid at all for GTK >= 3.20. Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

GTK3 SourceView, "notify::cursor-position" gives too many events

2016-11-17 Thread Stefan Salewski
Yesterday I was looking again on the source code of my Nim editor https://github.com/ngtk3/NEd because I have the feeling that there may hide still a bug somewhere... As I saw the line buffer.handlerID = gSignalConnect(buffer, "notify::cursor-position", gCallback(onCursorMoved), win) I remembe

C atexit(), g_atexit -- how to cleanup when a gtk application crashes?

2016-11-30 Thread Stefan Salewski
On Wed, 2016-11-30 at 10:41 +, Emmanuele Bassi wrote: https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-atexit I have a related problem: In the last weeks I cleaned up the Nim GTK3 Editor application: https://github.com/ngtk3/NEd The primary problem was th

Re: C atexit(), g_atexit -- how to cleanup when a gtk application crashes?

2016-11-30 Thread Stefan Salewski
On Wed, 2016-11-30 at 12:05 +0100, Stefan Salewski wrote: > Unfortunately so the cleanup proc is called already, while the main > application is still running. I may have an idea: Call inside the cleanup proc https://developer.gnome.org/gio/stable/GApplication.html#g-application-get-d

Re: C atexit(), g_atexit -- how to cleanup when a gtk application crashes?

2016-11-30 Thread Stefan Salewski
On Wed, 2016-11-30 at 12:58 +0100, Stefan Salewski wrote: > I may have an idea: > > Call inside the cleanup proc Seems to work fine indeed: proc cleanup {.noconv.} =   var msg: StatusMsg   let app = applicationGetDefault()   if not app.isRemote: #echo "not app.isRemote&quo

Can we install a gtk program without root privileges?

2016-12-01 Thread Stefan Salewski
My Nim editor https://github.com/ngtk3/NEd can be launced from the directory with the binary by typing ./ned file.nim For testing that is fine. But to make it work from an arbitrary directory something like # And for making gsettings available system wide one method is, as root # https://develop

Re: Can we install a gtk program without root privileges?

2016-12-01 Thread Stefan Salewski
On Thu, 2016-12-01 at 16:49 +0100, Stefan Salewski wrote: > Thanks for all your responses, I will try your suggestions soon. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: CSS to look more like Gtk+ 2

2016-12-12 Thread Stefan Salewski
On Sun, 2016-12-11 at 14:48 -0800, Kyle Terrien wrote: > And now, I'm starting another theme, It would also be great to have a HiDPI theme, or even better to have something like a scaleable theme. A theme where the elements like scrollbars can be scaled by running a script on it? I have currently

Re: CSS to look more like Gtk+ 2

2016-12-13 Thread Stefan Salewski
On Mon, 2016-12-12 at 18:48 -0800, Kyle Terrien wrote: > What's the favored way to "fake" a HiDPI monitor?  Modify some pixel > density value in xorg.conf? Just increase the distance from your eyes to the display. What really matters is the viewing-angle. My feeling is, that for the popular 27 or

Re: CSS to look more like Gtk+ 2

2016-12-13 Thread Stefan Salewski
On Tue, 2016-12-13 at 11:07 +0100, Stefan Salewski wrote: > Indeed, the current available scaling of factor 2 may be really fine > for a 34 inch 4k display and a eye to display distance of about one > metre. Sorry, that was nonsence. Indeed my feeling was and is, that a 34 inch mon

Where is the Gnome3 application menu for Cinnamon?

2016-12-20 Thread Stefan Salewski
My NEd Nim editor follows the scheme from https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5 https://github.com/ngtk3/NEd So for Gnome shell it provides an application menu on top of screen which can open the preferences dialog. Very similar to gedit. Now someone tried my NEd ed

Re: Where is the Gnome3 application menu for Cinnamon?

2016-12-20 Thread Stefan Salewski
Thanks for your fast reply. So his complains seems to be justified, I will tell him and send him a link to your post. On Wed, 2016-12-21 at 01:13 +1100, Michael Gratton wrote: > On Wed, Dec 21, 2016 at 12:37 AM, Stefan Salewski >   > wrote: > > > > Now someone tried m

Re: CSS to look more like Gtk+ 2

2017-01-14 Thread Stefan Salewski
On Mon, 2016-12-19 at 14:01 +, Emmanuele Bassi wrote:https://ask.fedoraproject.org/en/question/84969/how-to-change- highlight-color-in-gnome-adwaita/ > The CSS theming classes and selectors were not API, they were > intentionally not documented, and thus fell under no stability > guarantee — un

GObject Introspection, g-field-info-get-size

2017-02-08 Thread Stefan Salewski
https://developer.gnome.org/gi/1.50/gi-GIFieldInfo.html#g-field-info-get-size Is someone still familiar with GObject Introspection? I am investigating creating high level GObject Introspection based Nim bindings. Most seems to work well, some not: For example g-field-info-get-size() seems to g

gobject-introspection unmaintained?

2017-02-13 Thread Stefan Salewski
Is gobject-introspection unmaintained? I found a github reposity at https://github.com/GNOME/gobject-introspection but the issue tracker is disabled. As you may know, I have done some work on a higher level GTK Nim wrapper recently. Starting with the API docs https://developer.gnome.org/gi/1.50

Re: gobject-introspection unmaintained?

2017-02-19 Thread Stefan Salewski
On Mon, 2017-02-13 at 11:41 +, Emmanuele Bassi wrote: > > but the issue tracker is disabled. > > Because GNOME uses Bugzilla, not GitHub issues: https://bugzilla.gnom > e.org Ah yes -- found it. Yesterday I wondered why I get "\" as Dir_Separator on my Linux box, I thought I was doing someth

Re: Turn off GTK+ warnings

2017-04-01 Thread Stefan Salewski
On Sat, 2017-04-01 at 16:53 +1000, Stuart Longland wrote: > How, as a user, do I go about silencing these warnings? I don't think it is a good idea to ignore such warnings as a user in general case. There may be very few warnings, for which it may be ok to ignore it. But generally, there is a reas

Re: Gray out a menu item Edit/copy etc

2017-04-07 Thread Stefan Salewski
On Thu, 2017-04-06 at 19:52 -0400, Ian Chapman wrote: > Now I need to turn it on/off so that I can use/disable it. For GTK3 we have https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-sensitive So there should be a similar function available for your programming language. Of c

Gnome 3.22 Wayland is eating my chess pieces (unicode chess font)

2017-04-10 Thread Stefan Salewski
Some days ago my Gentoo box finally updated to Gnome 3.22. First surprise: GtkSourceView ignores Text Scaling settings -- seems to be a well known bug: https://bugzilla.redhat.com/show_bug.cgi?id=1382840 Not a real problem, but surprising. Today I logged in using wayland session, selected by gear

Re: Gnome 3.22 Wayland is eating my chess pieces (unicode chess font)

2017-04-10 Thread Stefan Salewski
On Mon, 2017-04-10 at 10:37 +0200, Stefan Salewski wrote: > Any ideas? Well, maybe the problem is not the font dimensions, but the window itself. The size calculations occur in https://github.com/ngtk3/nim-chess2/blob/master/board.nim proc drawIt(cr: cairo.Context; widget: Widget) {.cd

Re: Gnome 3.22 Wayland is eating my chess pieces (unicode chess font)

2017-04-10 Thread Stefan Salewski
On Mon, 2017-04-10 at 11:07 +0100, Emmanuele Bassi wrote: > allocated size of > your widget Thanks. I think that is gtk_widget_get_allocation() for GTK3 as mentioned in http://stackoverflow.com/questions/2675514/totally-fed-up-with-get-gtk-widget-height-and-width I will try that soon.

Re: Gnome 3.22 Wayland is eating my chess pieces (unicode chess font)

2017-04-10 Thread Stefan Salewski
On Mon, 2017-04-10 at 12:28 +0200, Stefan Salewski wrote: > I will try that soon. Yes, works fine:   var w, h: cint #width: cint = widget.parentWindow.width #height = widget.parentWindow.height width = getAllocatedWidth(widget) height = getAllocatedHeight(wid

GObject introspection and cairo?

2017-05-09 Thread Stefan Salewski
I am currently working again on the gobject introspection based bindings for Nim language (https://github.com/StefanSalewski/nim-gi). And I wonder why there is only minimal support for cairo -- /usr/share/gir-1.0/cairo-1.0.gir is minimal. Of course cairo is not gobject based, but is that the real

g_object_add_toggle_ref

2017-06-03 Thread Stefan Salewski
My high level Nim wrapper (https://github.com/StefanSalewski/nim-gi2) is indeed basically working. Currently I am using g_object_add_toggle_ref() and g_object_set_qdata(). The first for the garbage collection tasks, and the later for retrieving the proxy object from the associated GTK GObject, for

Re: g_object_add_toggle_ref

2017-06-06 Thread Stefan Salewski
On Sat, 2017-06-03 at 15:37 +0200, Stefan Salewski wrote: What is a bit strange is void g_object_add_toggle_ref (GObject   *object,  GToggleNotify  notify,  gpointer   data) {   ToggleRefStack *tstack;   guint i;      g_return_if_fail

Floating references

2017-06-06 Thread Stefan Salewski
Some years ago I read about floating references as described in https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html Of course that makes sense. Newly created objects get ref count 1, but are floating. If they get put into a container element, floating ref is converted t

Re: g_object_add_toggle_ref

2017-06-06 Thread Stefan Salewski
On Tue, 2017-06-06 at 11:13 +0200, Stefan Salewski wrote: > On Sat, 2017-06-03 at 15:37 +0200, Stefan Salewski wrote: > > What is a bit strange is > Well, at least my understanding so far seems to be correct: // gcc -o test reftest.c `pkg-config --libs --cflags gtk+-3.0` #inclu

Re: g_object_add_toggle_ref

2017-06-25 Thread Stefan Salewski
On Tue, 2017-06-06 at 14:33 +0200, Stefan Salewski wrote: > so after call of g_object_add_toggle_ref() ref_count is indeed 2, and > after call of g_object_unref() the toggleNotify() callback is > activated. Some more investigations seems to indicate: When I create a widget

Re: g_object_add_toggle_ref

2017-06-25 Thread Stefan Salewski
On Sun, 2017-06-25 at 10:59 +0100, Emmanuele Bassi wrote: > I very much doubt anybody here has knowledge of toggle reference and > language bindings. Yes, I guess that is true, the original authors seems all to be retired. For IRC or devel list, I fear situation is not really better, and I do not

gtk_container_remove may generate some noise for a GC

2017-06-25 Thread Stefan Salewski
https://github.com/GNOME/gtk/blob/master/gtk/gtkcontainer.c void gtk_container_remove (GtkContainer *container,   GtkWidget*widget) {   g_return_if_fail (GTK_IS_CONTAINER (container));   g_return_if_fail (GTK_IS_WIDGET (widget));   g_object_ref (container);   g_object_ref

High level GI-based GTK3 bindings for the Nim programming language

2017-07-13 Thread Stefan Salewski
I have uploaded the first public release of the high level GObject- Introspection-based GTK3 bindings for the Nim programming language yesterday. If you have GTK3 and Nim compiler installed you may try them. Install is currently cd /tmp git clone https://github.com/stefansalewski/gintro cd gintr

GDM wayland login -- display shuts down and is hard to get on again

2017-07-13 Thread Stefan Salewski
Since a few months I have GTK 3.22 on my gentoo box, and so I tried to log in with Wayland support from the graphical GDM display manager. Works all fine. But one problem is, that the display is shut down after a few hours sometimes. Initially I had the impression that wayland does that shut down.

Re: GObject introspection and cairo?

2017-07-15 Thread Stefan Salewski
On Tue, 2017-05-09 at 17:05 +0200, Nicola Fontana wrote: > Il Tue, 09 May 2017 16:39:10 +0200 Stefan Salewski > scrisse: > > > I am currently working again on the gobject introspection based > > bindings for Nim language (https://github.com/StefanSalewski/nim-gi > > )

Re: GObject introspection and cairo?

2017-07-15 Thread Stefan Salewski
ion. Thanks, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

GTK's interfaces and language bindings

2017-07-18 Thread Stefan Salewski
Recently someone tried to style a widget using CSS, https://github.com/StefanSalewski/gintro/issues/2#issuecomment-316167963 and so I discovered that there is still some labor for me... Before I start coding, maybe it is better to verify my understanding of the gobject interfaces... For exampl

Re: GTK's interfaces and language bindings

2017-07-21 Thread Stefan Salewski
On Thu, 2017-07-20 at 13:44 +0200, Nicola Fontana wrote: > I see interfaces as a "contract" that (1) enforces an object > to implement some feature (properties and/or methods) and > consequently (2) gives the users a common API that can be used > across unrelated objects. Thanks for your explanati

Wait cursor animation does not work properly

2017-09-03 Thread Stefan Salewski
Since a few months I have observed that for my chess game the mouse pointer/cursor animation stopped working properly. Yesterday I tried cleaning up the code for moving the game GUI to the new high level Nim GTK GUI, but I was unable to get it working. When I moved the busy-cursor out of the appl

Re: Wait cursor animation does not work properly

2017-09-03 Thread Stefan Salewski
On Sun, 2017-09-03 at 16:43 +0200, Stefan Salewski wrote: > Since a few months I have observed that for my chess game the mouse > pointer/cursor animation stopped working properly. Well, I have added the g_idle_add() problem also. When I move the mouse pointer the first time into the

Re: Wait cursor animation does not work properly

2017-09-03 Thread Stefan Salewski
On Sun, 2017-09-03 at 16:54 +0100, Emmanuele Bassi wrote: > You're blocking the toolkit's main loop, When I add a background function with g_idle_add() I am blocking the GTK main loop? Well I just wanted to avoid that. But even without use of g_idle_add() the animation stops, when I move the curs

Re: Wait cursor animation does not work properly

2017-09-03 Thread Stefan Salewski
On Sun, 2017-09-03 at 17:23 -0400, cecas...@aol.com wrote: > With a jhbuild of GTK3.22 I get a wrist watch type clock cursor for > "wait" that doesn't have any animation. Thanks for testing. So problem is not my local Gentoo box, but GTK 3.22. ___ gtk-li

Re: Wait cursor animation does not work properly

2017-09-04 Thread Stefan Salewski
On Sun, 2017-09-03 at 16:54 +0100, Emmanuele Bassi wrote: > You're blocking the toolkit's main loop, here. If your application > does this, it's broken and needs to be fixed - regardless of what the > cursor looks like. > > The cursor is rendered by the Wayland compositor, but the animation > is >

Re: Wait cursor animation does not work properly

2017-09-04 Thread Stefan Salewski
On Mon, 2017-09-04 at 22:39 +0100, Chris Vine wrote: > If Stefan needs any further assistance I think he needs to explain > what > his issue actually is. Well, my first posting in this thread seems to indicate a real issue, as Mr cecas...@aol.com confirmed. Animation does not continue when mouse p

Re: Wait cursor animation does not work properly

2017-09-09 Thread Stefan Salewski
On Tue, 2017-09-05 at 08:50 +0200, Stefan Salewski wrote: > I will follow all your advice and start a new thread for the chess > engine to return the reply move. Well yes, but not now... For now I have pushed a still blocking release to github: https://github.com/StefanSalewski/nim-che

Pango library seems to be really hard for gobject-introspection?

2017-09-09 Thread Stefan Salewski
First I noticed that for pango_font_description_from_string() >From /usr/share/gir-1.0/Pango-1.0.gir we know that transfer- ownership="full" so we have to free it in our language bindings. But how to guess the function for freeing? For gobject there is generally a plain g_object_unref() necessar

Re: Pango library seems to be really hard for gobject-introspection?

2017-09-09 Thread Stefan Salewski
On Sat, 2017-09-09 at 21:46 +, Emmanuele Bassi wrote: > Boxed types use g_boxed_free() to release resources, and > g_boxed_copy() to copy them: > https://developer.gnome.org/gobject/stable/gobject-Boxed-Types.html > > Ciao, >  Emmanuele. Yes I know :-) But from https://developer.gnome.org/p

pango_script_get_sample_language()

2017-09-11 Thread Stefan Salewski
https://developer.gnome.org/pango/stable/pango-Scripts-and-Languages.html#pango-script-get-sample-language That function returns a pointer to PangoLanguage. From /usr/share/gir-1.0/Pango-1.0.gir we have transfer-ownership="full" generally indicates that we have to free the result. But I have

Re: Pango library seems to be really hard for gobject-introspection?

2017-09-11 Thread Stefan Salewski
On Mon, 2017-09-11 at 07:25 +, Emmanuele Bassi wrote: > If you're writing a language binding, you should use the GBoxed API > for all boxed types, as that defers to the correct function without > having to make up an annotation for copy and free functions. That is interesting, thanks. I will r

One more Gobject Introspection issue

2017-09-14 Thread Stefan Salewski
GtkIconSize type is reported as plain gint, but it is an enum. For this function all is correct, see last line of code segment:    This function sets the size of stock icons in the toolbar. You can call it both before you add the icons and after they’ve been added. The size you set w

Re: One more Gobject Introspection issue

2017-09-15 Thread Stefan Salewski
On Fri, 2017-09-15 at 09:57 +0100, Phil Clayton wrote: > Have a look at > https://bugzilla.gnome.org/show_bug.cgi?id=601425 Great, thanks. I had looked only into the list of gobject-introspection bugs mentioned at the bottom of this page: https://wiki.gnome.org/action/show/Projects/GObjectIntros

Re: One more Gobject Introspection issue

2017-09-15 Thread Stefan Salewski
On Fri, 2017-09-15 at 10:28 +0100, Emmanuele Bassi wrote: > All API that takes a GtkIconSize should have a `type int` annotation. Thanks. I learned that already from the reply of Mr. Phil Clayton. Seems that some functions like gtk_toolbar_set_icon_size() do not yet have a `type int` annotation.

g_signal_emitv -- where is it used in application code?

2017-09-15 Thread Stefan Salewski
https://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-emitv For the most recent issue https://github.com/StefanSalewski/gintro/issues/8 I have absolutely no idea currently. Is g_signal_emitv() generally used in applications code, or is it used for library development (creatio

Re: g_signal_emitv -- where is it used in application code?

2017-09-15 Thread Stefan Salewski
On Fri, 2017-09-15 at 12:25 +0100, Emmanuele Bassi wrote: > The g_signal_emitv() function is the vector-based function for > emitting signals in language bindings. > > The variadic argument version is a C convenience function, as > functions with variadic arguments are not introspectable. > > Thi

Re: g_signal_emitv -- where is it used in application code?

2017-09-15 Thread Stefan Salewski
On Fri, 2017-09-15 at 13:26 +0100, Emmanuele Bassi wrote: > I'm puzzled by this question. How do you test signal emission *now*? > Actually: how do you even implement it, if you're not already using > g_signal_emitv()? I never needed it! In my C and Ruby applications. And I can not remember that i

Re: How to get a "traditional" file-chooser

2017-09-16 Thread Stefan Salewski
On Fri, 2017-09-15 at 22:41 +0100, Emmanuele Bassi wrote: > Additionally, modify_bg() has never done anything about > sizing, Sometimes you seems to try very hard to misunderstand people? My English is not good, but I really think Chris Moller was refering only to the fact that modify_bg() was de

Re: Flickering with Socket and Plug

2017-09-24 Thread Stefan Salewski
On Sun, 2017-09-24 at 13:54 +0200, René Hansen wrote: > it starts flickering constantly I don't know what Socket and Plug is... But you seems to do the drawing completely wrong. Generally gtk_widget_queue_draw() is involved in the drawing process, that is that your timer does not do the drawing

How do we get GTYPE from gobject introspection language bindings

2017-09-28 Thread Stefan Salewski
I am just preparing a listview example for the Nim GTK3 mini tutorial. I followed the Z-Code C example. Was not too difficult. But I got one problem: For working with listviews, we have to provide GTypes, which are numerical values. For C we have the macros like G_TYPE_STRING which for my box gives

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

2017-09-30 Thread Stefan Salewski
On Fri, 2017-09-29 at 04:45 +, Gergely Polonkai wrote: > 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 consis

Re: gtk_icon_theme_load_icon and GDK_SCALE=2 results in blurry icon

2017-10-03 Thread Stefan Salewski
On Tue, 2017-10-03 at 17:28 +0400, Alexander Shaduri wrote: > I have a HiDPI Screen I also. 27 inch 4k display. I started also with scale of 2 to avoid tiny objects, but now I use scale=1 with larger fonts and I use some custom CSS to make vertical scrollbars a bit larger. Firefox can scale webpag

Why are signal names strings and not enums?

2017-10-06 Thread Stefan Salewski
We are using code like   g_signal_connect(G_OBJECT(btn), "clicked",    G_CALLBACK(gtk_main_quit), G_OBJECT(window));   g_signal_connect(G_OBJECT(window), "destroy",    G_CALLBACK(gtk_main_quit), NULL); Why strings and not enums for clicked and destroy parameter? I wondered about that m

Full nimble support for gintro package (high level GTK3 Nim GUI) available

2018-02-26 Thread Stefan Salewski
With latest nimble and nim a plain nimble install gintro should work now out of the box. (Well at least for 64 bit Linux and recent GTK 3.22 -- I can currently not test Windows, MAC or 32 bit Linux) The examples should compile and work with latest nim 0.17.3. Short tutorial at https://github.

Is GtkSourceView available for Windows 10 ?

2018-03-02 Thread Stefan Salewski
A windows 10 user seems to manage to get gintro package installed on his windows 10, see https://github.com/StefanSalewski/gintro/issues/24 All the shipped examples seems to work indeed, but he had to skip GtkSource install (generating GObject-Introspection based bindings) because GTKSourceView d

Re: Is GtkSourceView available for Windows 10 ?

2018-03-02 Thread Stefan Salewski
Thanks for that hint, I will add a note to the gintro tutorial. On Fri, 2018-03-02 at 13:32 -0500, Patrick Griffis via gtk-list wrote: > > A windows 10 user seems to manage to get gintro package installed > > on > > his windows 10, see > > > > https://github.com/StefanSalewski/gintro/issues/24 >

Testing GTK4 in /opt/gtk -- tiny fonts on HiDPI display

2018-03-24 Thread Stefan Salewski
Yesterday I tried for the first time GTK4 install as described in https://developer.gnome.org/gtk4/3.93/gtk-building.html Worked well, and I can successfully launch gtk4-demo. On my 27 inch 4k monitor all gtk4 apps seems to have only 11 point font, which is very small and does not allow real test

Re: Testing GTK4 in /opt/gtk -- tiny fonts on HiDPI display

2018-03-24 Thread Stefan Salewski
On Sat, 2018-03-24 at 19:50 +0100, Stefan Salewski wrote: > Yesterday I tried for the first time GTK4 install as described in > https://developer.gnome.org/gtk4/3.93/gtk-building.html > > Well, seems to be a wayland issue. When I log in in GDM with plain "Gnome" session,

Re: Testing GTK4 in /opt/gtk -- tiny fonts on HiDPI display

2018-03-24 Thread Stefan Salewski
On Sat, 2018-03-24 at 21:19 +0100, Stefan Salewski wrote: > On Sat, 2018-03-24 at 19:50 +0100, Stefan Salewski wrote: > > Yesterday I tried for the first time GTK4 install as described in > > https://developer.gnome.org/gtk4/3.93/gtk-building.html > > > > > >

gtk4-query-immodules: command not found

2018-03-25 Thread Stefan Salewski
Following GTK4 install into /opt/gtk from https://developer.gnome.org/gtk4/3.93/gtk-building.html I get for last step "ninja install" Running custom install script '/opt/gtk+-3.93.0/build-aux/meson/post- install.sh 4.0 4.0.0 /opt/gtk/lib64 /opt/gtk/share' Compiling GSettings schemas... Updating

Re: gtk4-query-immodules: command not found

2018-03-25 Thread Stefan Salewski
On Sun, 2018-03-25 at 13:43 +0200, Stefan Salewski wrote: > What may be the best way to fix this issue? Well, obvious PATH=$PATH:/opt/gtk/bin/ export PATH ninja install LD_LIBRARY_PATH="/opt/gtk/lib64" ninja install works, but then still I get tiny fonts with /opt/gtk/bin $ LD

Re: gtk4-query-immodules: command not found

2018-03-27 Thread Stefan Salewski
On Sun, 2018-03-25 at 14:05 +0200, Stefan Salewski wrote: > /opt/gtk/bin $ LD_LIBRARY_PATH="../lib64" ./gtk4-demo > > (gtk4-demo:14466): GLib-GIO-WARNING **: 14:03:06.071: Can't find > module > 'dconf' specified in GSETTINGS_BACKEND > GLib-GIO-Message:

Re: Beginners guide

2018-04-25 Thread Stefan Salewski
On Tue, 2018-04-24 at 19:39 +0100, Jim Reilly wrote: > I have put together a guide to help beginners >All GTK+3.0 programs contain the same basic instructions, and Well, maybe you should also mention the preferred GTK3 app style as I did in the second example in https://github.com/StefanSalewski

Re: Beginners guide

2018-04-27 Thread Stefan Salewski
On Fri, 2018-04-27 at 14:54 +0100, Emmanuele Bassi wrote: > There are various wiki pages that you may be interested in; see the > "How Do I" section: https://wiki.gnome.org/HowDoI/ I wonder that you do not recommend the page https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5 Is t

Re: How to shift surface?

2018-06-11 Thread Stefan Salewski
On Mon, 2018-06-11 at 08:29 +0100, Göran Hasse wrote: > Hello! > > I am trying to write a gtk + Cairo application that mimics the > animation in > wikipedias sine graph. > > https://en.wikipedia.org/wiki/File:Circle_cos_sin.gif > > There was posted an example some time ago -- in multiple vers

Re: How to shift surface?

2018-06-11 Thread Stefan Salewski
On Mon, 2018-06-11 at 16:11 +0200, Stefan Salewski wrote: > Various C codes you may find in this thread, I think first Uli > Schlachter post has a link to the most advanced C version. Ah -- forgot to copy that link: https://lists.cairographics.org/archives/cairo/2016-October/02779

Re: Size allocation warning message

2018-06-26 Thread Stefan Salewski
On Mon, 2018-06-25 at 23:20 +0200, Rafal Luzynski wrote: > I assume this is your application or at least an application > for which you have the source code and you are going to fix it. That are some of our applications, and at least some of ours get such messages since at least one year, for exam

<    1   2   3   >