Re: Overline for pango text?

2010-09-24 Thread Stefan Salewski
On Thu, 2010-09-23 at 15:15 +0200, Stefan Salewski wrote: Hello, I have to draw some simple technical diagrams, I am using cairo (from Ruby rcairo) with interactive GTK drawing-area and PNG, PDF export. Currently I am using cairos toy text for text labels. My intention was to using pango

GtkComboBoxTextEntry for input of multi-digits numbers

2012-03-20 Thread Stefan Salewski
enforce discrete, non equidistant values like 100, 50, 25, 10 when clicking on the arrows. I have found some people asking similar questions, but no answer. Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org

Re: GtkComboBoxTextEntry for input of multi-digits numbers

2012-03-20 Thread Stefan Salewski
On Tue, 2012-03-20 at 19:30 -0400, Paul Davis wrote: On Tue, Mar 20, 2012 at 7:13 PM, Stefan Salewski m...@ssalewski.de wrote: I was going to use http://developer.gnome.org/gtk3/stable/GtkComboBoxText.html with text entry. The problem is, that I have to connect to changed signal, which

Re: GtkComboBoxTextEntry for input of multi-digits numbers

2012-03-20 Thread Stefan Salewski
On Tue, 2012-03-20 at 19:30 -0400, Paul Davis wrote: On Tue, Mar 20, 2012 at 7:13 PM, Stefan Salewski m...@ssalewski.de wrote: I was going to use http://developer.gnome.org/gtk3/stable/GtkComboBoxText.html with text entry. The problem is, that I have to connect to changed signal, which

Re: Gtk / Cairo Question

2012-07-13 Thread Stefan Salewski
On Thu, 2012-07-12 at 18:12 -0700, Thomas Dineen wrote: Gentle People: I am planning a graphical application for plotting Stock Market related price and volume data and I have been experimenting with GTk and Cairo. I have been going through the tutorials on both the GTK and Cairo

Re: Hello, some of us still care about memory usage

2012-07-31 Thread Stefan Salewski
On Mon, 2012-07-30 at 18:48 -0400, Paul Davis wrote: had i started today, i would have used pygtk for the GUI. and if not that, I used ruby-gtk2 recently (http://www.ssalewski.de/PetEd.html.en) -- very fine GTK2 bindings including cairo support and a nice tutorial.

GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-17 Thread Stefan Salewski
to the pointing device, which is not available from keyboard event. Or in other words: In GTK3-demo there is an Drawing_Area application where we can draw when we held down the left mouse key: How can we draw a circle at the current mouse position when we press 'C' key? Best regards, Stefan

Re: GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-17 Thread Stefan Salewski
, i.e. delete object under mouse cursor when 'X' or 'DEL' key is pressed. That is much faster than context menu or button clicks. And professionals prefer working fast. Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https

Re: GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-17 Thread Stefan Salewski
by https://developer.gnome.org/gdk2/stable/GdkDisplay.html#gdk-display-get-pointer may give me the current mouse coordinates of pointer in my drawing area? Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org

Re: GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-17 Thread Stefan Salewski
On Fri, 2014-01-17 at 17:18 -0500, Paul Davis wrote: you can track where the mouse is with enter/leave events, and there are often good reasons for wanting to do that anyway. That should not work well for CAD applications. We have a large drawing area, where we draw objects using cairo

Re: GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-17 Thread Stefan Salewski
On Fri, 2014-01-17 at 17:11 -0500, Jasper St. Pierre wrote: Yeah. This is to maintain ABI compatibility. Technically, events have private internal data, and you can use gdk_event_get_device(); to get the keyboard device for a key event. This isn't documented very well; we should perhaps

Re: GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-17 Thread Stefan Salewski
() raises an exception and aborts my program. I will contact the authors of the Ruby bindings. Best regards Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-19 Thread Stefan Salewski
On Fri, 2014-01-17 at 17:26 -0500, Jasper St. Pierre wrote: It doesn't seem like there's anything wrong with using the deprecated methods, then. File a bug with the Ruby GTK3 bindings, and continue using window.get_pointer(); for now would be my suggestion. I sent a message to the Ruby-Gnome2

Widgets margins relative to character size (high DPI issue)

2014-02-10 Thread Stefan Salewski
. (Unfortunately I am not notified when user changes font size in gnome control center...) Are there betters solution? I.e direct access to users default font size in x and y pixels? Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org

Re: Widgets margins relative to character size (high DPI issue)

2014-02-10 Thread Stefan Salewski
) it was my impression that there is no High-DPI infrastructure for GTK3 yet -- seem that google gave me only old outdated discussions... Best regards Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk

Notebook widget with unequal page sizes in Scrolled_Window

2014-02-17 Thread Stefan Salewski
total...) Or is there a better way? (For label widgets, I may consider ellipsize property, which cuts names if they are too long for the visible area, but I am looking for a general best approach with works fine with all kind of widgets in pages of notebooks) Best regards, Stefan Salewski

Re: Notebook widget with unequal page sizes in Scrolled_Window

2014-02-19 Thread Stefan Salewski
On Mon, 2014-02-17 at 16:00 +0100, Stefan Salewski wrote: One solution may be: Do not put the whole notebook widget into a scrolled_window, but put each page of the notebook into its own scrolled_window. Will that work, and is that the the recommended way? Seems to work fine indeed -- I simply

TreeView/ListStore reordering by DND

2014-02-28 Thread Stefan Salewski
I have a simple list display built of a ListView and ListStore as described in https://developer.gnome.org/gtk3/stable/GtkTreeView.html I used gtk_tree_view_set_reorderable () to allow the user to reorder the list by grabbing rows and moving it up or down. From

Re: TreeView/ListStore reordering by DND

2014-02-28 Thread Stefan Salewski
On Sat, 2014-03-01 at 00:42 +, Lance Capser (lmcapser) wrote: The row_inserted and row_deleted signals in the GtkTreeModel are each called with the GtkTreePath of the row in question: That is true. But for my test with a list with only two rows I got numbers from 0 to 2 from

Re: TreeView/ListStore reordering by DND

2014-03-01 Thread Stefan Salewski
On Sat, 2014-03-01 at 02:08 +0100, Stefan Salewski wrote: On Sat, 2014-03-01 at 00:42 +, Lance Capser (lmcapser) wrote: The row_inserted and row_deleted signals in the GtkTreeModel are each called with the GtkTreePath of the row in question: That is true. But for my test

Re: TreeView/ListStore reordering by DND

2014-03-01 Thread Stefan Salewski
like row_inserted value = (null) row ins = 4 row_changed value = Capote row cha = 4 row_deleted row del = 1 which indicates a sequence insert-change-delete. At least I am understanding now what is going on and I should be able to use it in that way in my application. Thanks, Stefan Salewski

Re: Porting GTK+ app from defining custom stock items to using GtkIconTheme

2014-03-02 Thread Stefan Salewski
On Sun, 2014-03-02 at 12:52 +0100, Balint Reczey wrote: Hi, I'm trying to move Wireshark from using the deprecated gtk_toggle_tool_button_new_from_stock(), etc. API to use gtk_toggle_tool_button_new() and friends instead [1]. Wireshark defines many custom icons icons, but they can't be

Re: GtkLabel foreground color

2014-03-02 Thread Stefan Salewski
On Sun, 2014-03-02 at 11:55 +0800, Wiky wrote: I try to change the GtkLabel foreground color using following code: PangoAttrList *attrList = pango_attr_list_new(); pango_attr_list_insert(attrList, pango_attr_foreground_new(255, 0, 0));

Re: Porting GTK+ app from defining custom stock items to using GtkIconTheme

2014-03-02 Thread Stefan Salewski
specify not the desired, but the actual size. See bottom most answer here: http://stackoverflow.com/questions/12521134/gtktoolbutton-with-custom-icon-but-of-stock-icon-size Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https

Re: Gtk Graph drawing

2014-03-11 Thread Stefan Salewski
On Sat, 2014-03-08 at 16:18 +, Bill Vyzas wrote: Hi all, I want to draw some graphs and bar charts for some data I have and I am searching for any library available. I am using gtk+ with C. Do you have something in mind? A research on the internet didn't give any satisfactory results,

Re: replacement for GtkImageMenuItem

2014-03-23 Thread Stefan Salewski
. But is it OK for smart-phone kids? Well, if other operating systems will reduce images also, they may accept it. Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

GdkAtom. missing Asterisks * in Gdk3 Documentation?

2014-05-08 Thread Stefan Salewski
gtk+-3.12.1/gdk $ grep GdkAtom *.h gdktypes.h:typedef struct _GdkAtom*GdkAtom; https://developer.gnome.org/gdk2/stable/gdk2-Properties-and-Atoms.html#GdkAtom typedef struct _GdkAtom*GdkAtom; https://developer.gnome.org/gdk3/stable/gdk3-Properties-and-Atoms.html#GdkAtom

Re: Drawing an insensitive widget

2014-08-08 Thread Stefan Salewski
On Fri, 2014-08-08 at 00:11 +0200, ax487 wrote: My point is the following: when the widget is insensitive, it should look different to indicate this fact. Specifically the widget should look greyed out in some sense. The question is how to achieve this effect for a custom widget. Did you read

Re: Accuracy of motion events

2014-08-29 Thread Stefan Salewski
On Fri, 2014-08-29 at 16:58 -0500, richard boaz wrote: you can find a discussion and one possible solution of this in a previous thread: https://mail.gnome.org/archives/gtk-list/2011-July/msg00059.html I think unfortunately the solution is not that easy... I have a similar problem with my

Re: Accuracy of motion events

2014-08-29 Thread Stefan Salewski
window basis: https://developer.gnome.org/gdk3/stable/gdk3-Windows.html#gdk-window-set-event-compression your application should benefit from this API. Sounds great, thanks. Can not test with Ruby currently, it is 3.12, which is not available yet for Ruby bindings. Stefan Salewski

Re: Accuracy of motion events

2014-08-29 Thread Stefan Salewski
On Sat, 2014-08-30 at 02:18 +0200, Stefan Salewski wrote: Sounds great, thanks. Can not test with Ruby currently, it is 3.12, which is not available yet for Ruby bindings. Just for fun I have tested with GTK 3.12 for Nimrod, but I can not see an effect of event compression... (It was necessary

Re: Accuracy of motion events

2014-08-29 Thread Stefan Salewski
On Sat, 2014-08-30 at 03:46 +0200, Stefan Salewski wrote: Just for fun I have tested with GTK 3.12 for Nimrod, but I can not see an effect of event compression... (It was necessary to put set_event_compression() after window.show_all(), seem that Ruby bindings ensure that a Gdk window

How to get Gtk::Stock::APPLY icon back in 3.12?

2014-08-31 Thread Stefan Salewski
I have used the green checkmark icon button up to 3.10 release. (in toolbar,http://www.ssalewski.de/PetEd.html.en ) Since 3.12 it is not available any more, for a fast fix I replaced #@minor_grid_select = Gtk::RadioToolButton.new(@major_grid_select, Gtk::Stock::APPLY) with these two lines

Re: How to get Gtk::Stock::APPLY icon back in 3.12?

2014-08-31 Thread Stefan Salewski
On Sun, 2014-08-31 at 16:10 +0200, Stefan Salewski wrote: I have used the green checkmark icon button up to 3.10 release. (in toolbar,http://www.ssalewski.de/PetEd.html.en ) Since 3.12 it is not available any more, for a fast fix I replaced #@minor_grid_select = Gtk::RadioToolButton.new

Re: Accuracy of motion events

2014-09-01 Thread Stefan Salewski
On Mon, 2014-09-01 at 14:12 +0200, ax487 wrote: Ok, as far as I am concerned disabling the event compression solves the problem. In my case I have optimized the drawing routines such that the time needed to process a motion event (i.e. to draw a new segment onto the canvas) is 1ms. Since my

Re: Accuracy of motion events

2014-09-01 Thread Stefan Salewski
On Mon, 2014-09-01 at 23:29 +0200, ax487 wrote: Just as an illustration: http://picpaste.com/event-DmCNqCHZ.png It does make a difference :) Yes -- so my assumption was that you get events with better time resolution than 10 ms without compression. So I hacked together a small test in plain C.

Re: Accuracy of motion events

2014-09-02 Thread Stefan Salewski
On Tue, 2014-09-02 at 11:01 +1000, Lex Trotman wrote: As stated before, motion events are only *delivered* per frame, all the compress flag does is set it to deliver the motion as one event per frame or multiple events per frame. If you have compress true (as above) only one event is

GtkSourceView -- is scrolling to exact position working finally for latest GTK3?

2014-11-27 Thread Stefan Salewski
I would like to port the Aporia Nim-(rod) editor from GTK2 to GTK3 -- have already done large part of latest necessary wrappers involved, as glib, cairo, gdk, gtk... (nim-cairo is already at github because I got some requests to put the files there, other will follow, see

gdk_pixbuf_new_from_file_utf8 -- where it is defined?

2015-01-02 Thread Stefan Salewski
I am working on GTK3 wrappers/bindings for Nim language. For gdk-pixbuf-2.31.2 there seems to exist a function gdk_pixbuf_new_from_file_utf8 which is called in gdk-pixbuf-io.c: retval = gdk_pixbuf_new_from_file_utf8 (utf8_filename, error); and referenced in gdk-pixbuf-core.h: #define

Re: gdk_pixbuf_new_from_file_utf8 -- where it is defined?

2015-01-02 Thread Stefan Salewski
On Fri, 2015-01-02 at 16:29 -0800, Jasper St. Pierre wrote: On Fri, Jan 2, 2015 at 4:16 PM, Stefan Salewski m...@ssalewski.de wrote: I am working on GTK3 wrappers/bindings for Nim language. You sort of answered your own question here :) Think about what happens when this #define

Re: Gtk::BuilderError Invalid object type GtkSourceView

2015-03-18 Thread Stefan Salewski
On Wed, 2015-03-18 at 20:39 -0400, Scott Talbert wrote: Basically, GTK assumes that its libraries are loaded into the global symbol namespace. I'm guessing that Nim is probably loading them into a local namespace (RTLD_LOCAL) and thus when GtkBuilder tries to load GtkSourceView, it can't

Re: Gtk::BuilderError Invalid object type GtkSourceView

2015-03-18 Thread Stefan Salewski
explanation for the observed behavior. I will see if I can specify RTLD_GLOBAL -- but maybe there are disadvantages involved, so manually registering the GObject which do not belong to the GTK core before asking the builder to process the xml file may be sufficient. Best regards, Stefan Salewski

Gtk::BuilderError Invalid object type GtkSourceView

2015-03-18 Thread Stefan Salewski
Hello, in the last months I was working on GTK3 bindings for the Nim programming language (http://nim-lang.org/). Now that they are nearly complete (https://github.com/StefanSalewski?tab=repositories) I tried to make some example code. One is the gtksourceview test-completion.c example, currently

GTK3 bindings for Nim language available

2015-03-30 Thread Stefan Salewski
We have some basic Nim GTK3 bindings available now, see https://github.com/StefanSalewski?tab=repositories Of course this note is only for smart people interested in Nim language (http://nim-lang.org/) and GTK3 development. The bindings are not really high level -- there is no Nim

Re: Gtk::Window resize grip replacement

2015-05-15 Thread Stefan Salewski
On Thu, 2015-05-14 at 20:48 +0100, Emmanuele Bassi wrote: Client-side decorated windows when running under a compositor have 5 pixels around the border Interesting. I wonder if these pixel design works well with ultra-HD and 4k displays? I am going to buy a 27 or 28 inch display with 3840*2048

Re: Outdated win32 bundle

2015-06-10 Thread Stefan Salewski
On Mon, 2015-06-08 at 19:22 +0100, Emmanuele Bassi wrote: I plan starting with 3.16, but got no response so far regarding my request to access the build system. Likely because you're using gtk-list@, which nobody in the GTK team follows (except, I think, me). Interesting info -- indeed I

Re: Treeviews: changing the color of column headers

2015-06-14 Thread Stefan Salewski
On Sun, 2015-06-14 at 08:30 +0200, Juan L. Freniche wrote: What is wrong in the sample program? Unfortunately I couldn't guess their mail addresses to consult with the people involved in 2003. Yes, my short google search yesterday gave me also something from 2003 -- someone reported that it

Re: How to style a GtkLabel with CSS

2015-06-12 Thread Stefan Salewski
On Fri, 2015-06-12 at 16:50 +, Gulshan Singh wrote: I need some help with this question: https://stackoverflow.com/questions/30791670/how-to-style-a-gtklabel-with-css A commentor mentioned that I should attach the provider directly to the GtkLabel instead of the window, and that worked,

Re: How to style a GtkLabel with CSS

2015-06-12 Thread Stefan Salewski
On Fri, 2015-06-12 at 23:13 +, Gulshan Singh wrote: I actually asked in #gtk+ on Freenode, but didn't get any response. I asked again on the GNOME server, and I got an answer that worked: https://stackoverflow.com/questions/30791670/how-to-style-a-gtklabel-with-css/30813433#30813433 That

Re: Changing background of TextView makes selection invisible

2015-06-13 Thread Stefan Salewski
On Sat, 2015-06-13 at 11:03 +0100, Kasper Peeters wrote: I am trying to make the background colour of all TextViews white, Have you followed this page: https://developer.gnome.org/gtk3/stable/TextWidget.html ___ gtk-list mailing list

Re: Treeviews: changing the color of column headers

2015-06-13 Thread Stefan Salewski
On Tue, 2015-06-09 at 08:54 +0200, Juan L. Freniche wrote: I am trying to change the color of the column headers of a treeview, with no sucess at all. It is funny that currently many people try to change default colors of GTK widgets. Of course generally that is not a good idea -- common sense

Re: Treeviews: changing the color of column headers

2015-06-13 Thread Stefan Salewski
On Sat, 2015-06-13 at 20:43 +0200, Stefan Salewski wrote: On Tue, 2015-06-09 at 08:54 +0200, Juan L. Freniche wrote: I am trying to change the color of the column headers of a treeview, with no sucess at all. It is funny that currently many people try to change default colors of GTK

Re: What am I doing wrong?

2015-08-16 Thread Stefan Salewski
On Sun, 2015-08-16 at 01:42 -0400, Igor Korot wrote: However the image is not displayed on the button. I can't call gtk_window_set_icon_name() as GtkButton is not GtkWindow and I'm getting a compiler error. So how do I make a button display my named icon?

Re: double buffered documentation

2015-08-17 Thread Stefan Salewski
On Mon, 2015-08-17 at 01:05 -0400, Igor Korot wrote: Hi, This page: https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-double-buffered does not say what is the GTK+ version that deprecates the function. Could someone shed some light, please? Thank you. It is all

Re: What should be used?

2015-07-29 Thread Stefan Salewski
On Wed, 2015-07-29 at 15:12 +0100, Emmanuele Bassi wrote: Those examples, especially the one that uses Unix signals to interrupt the program flow, ought to be burned with fire. Not only they are questionable in GTK 2.x, but they are also unportable jumbles of code that work by sheer accident.

GTK3, assign custom keyboard shortcuts for menu items?

2015-07-29 Thread Stefan Salewski
Some years ago I managed to get it working for my Ruby App -- I am not sure if only for GTK2, think it worked for GTK3 also. Not that I need or want it myself, but maybe some users of my application do? As I remember, it was hovering the mouse over a menu item and then pressing the desired keys?

GTK3 menu bar

2015-07-30 Thread Stefan Salewski
I am still not really sure how to create a FINE pulldown menu bar. (http://ssalewski.de/PetEd.html.en) Currently I am still using this Ruby code, which originates from the initial GTK2 version and still works with GTK 3.14 -- I may have done some modifications for GTK3, can not really remember.

Re: GTK3 menu bar

2015-07-31 Thread Stefan Salewski
On Thu, 2015-07-30 at 13:25 +0100, Emmanuele Bassi wrote: Hi; the preferred way to make a menu bar in GTK+ 3.x is to use GMenu and GAction: * https://wiki.gnome.org/HowDoI/GMenu Just to let you know: That cited wiki page is a plain copy of the original gnome developer page

Re: GTK3 menu bar

2015-07-30 Thread Stefan Salewski
for the later, so that one still ignores g-menu? Guess the menu is too large for GMenu? Best regards, Stefan Salewski ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: What should be used?

2015-07-29 Thread Stefan Salewski
On Wed, 2015-07-29 at 13:05 +0100, Emmanuele Bassi wrote: If you have legacy code that requires disabling double buffering, you should probably invest some time into porting it to a proper solution integrated with the GTK drawing model; It would be great if someone could port this example to

Re: WHere is the icons

2015-08-13 Thread Stefan Salewski
On Wed, 2015-08-12 at 23:13 -0400, Igor Korot wrote: Now this code for 2.x is using GTK_STOCK_YES. Is there a named icon I can use instead. Or even more: is there a list of named icons I can check along with the actual icons? I have no idea how an icon for Yes may look :-( A list of names is

Re: WHere is the icons

2015-08-10 Thread Stefan Salewski
On Mon, 2015-08-10 at 12:28 -0400, Igor Korot wrote: But then how do I set the label for such button? It looks like this function can be used for bitmap buttons only (no labels). Of course you can continue using the deprecated stock item, as long as that still works... My impression is, that

Re: WHere is the icons

2015-08-10 Thread Stefan Salewski
On Mon, 2015-08-10 at 01:28 -0400, Igor Korot wrote: Hi, I'm trying to run the modified GTK+3 application. Sorry, no idea what the modified GTK+3 application is... I have KDE4 as my WM and trying to run the application I see that my button does not have a stock images. However my app

Re: help: a small example of program with gtk3

2015-10-22 Thread Stefan Salewski
On Wed, 2015-10-21 at 14:29 -0500, richard boaz wrote: > you can find a sample program doing all of this, and more, here: > > https://gitlab.com/ivor/GTK3-Cairo > > On Wed, Oct 21, 2015 at 1:45 PM, Reymond Dominique < > reymon...@labogeo.pf> > wrote: > > > Hi all > > > > > > I am looking for

gtk+-3.18.1/examples/application10 question

2015-10-14 Thread Stefan Salewski
gtk+-3.18.1/examples/application10 cd application10 glib-compile-schemas . glib-compile-resources exampleapp.gresource.xml --target=resources.c --generate-source gcc -o main main.c resources.c exampleapp.c exampleappwin.c exampleappprefs.c `pkg-config --libs --cflags gtk+-3.0` I am still

Re: Trigger a GtkEntryCompletion's popup

2015-10-08 Thread Stefan Salewski
On Thu, 2015-10-08 at 15:36 +1100, Daniel Kasak wrote: > Hi all. I have some GtkEntry widgets with a GtkEntryCompletion > attached. > I've set the minimum key length to 0, hoping this would make the > completion's popup appear on focus in, but it doesn't. I have noticed > that > if I type

Re: application10 -- does scrolling work reliable for you?

2015-10-10 Thread Stefan Salewski
On Sat, 2015-10-10 at 06:16 +0200, Marcus Karlsson wrote: > Sorry for the earlier misunderstanding. What pressing the buttons in the > word list actually do is enter the word into the search field, and the > text view is only scrolled if the search field changes. If you want the > example app to

Re: Trigger a GtkEntryCompletion's popup

2015-10-09 Thread Stefan Salewski
On Fri, 2015-10-09 at 09:56 +1100, Daniel Kasak wrote: > I had issues with GtkComboBoxText last time I tried it, though admittedly > that was a long time back. Anyway, yes I'm aware of these widgets, and use > GtkComboBox regularly. I'll look into GtkComboBoxText again. But the > question remains

application10 -- does scrolling work reliable for you?

2015-10-09 Thread Stefan Salewski
gtk+-3.18.1/examples/application10 cd aplication10 glib-compile-schemas . glib-compile-resources exampleapp.gresource.xml --target=resources.c --generate-source gcc -o main main.c resources.c exampleapp.c exampleappwin.c exampleappprefs.c `pkg-config --libs --cflags gtk+-3.0` ./main

Re: How to grey out menu items

2015-09-26 Thread Stefan Salewski
On Sat, 2015-09-26 at 13:14 +0200, Rafał Lużyński wrote: > > On 20.09.2015 01:05 Stefan Salewski <m...@ssalewski.de> wrote: > > [...] May it be better, and is it possible to do that on the fly, > > when the pulldown menu pops on? Maybe a signal which is emitted > &g

GTK3 application docs, unclear statement

2015-09-30 Thread Stefan Salewski
In https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5 we have Before we can make use of this schema in our application, we need to compile it into the binary form that GSettings expects. GIO provides macros to do this in autotools-based projects. I have still no idea what

Re: GTK3 application docs, unclear statement

2015-10-03 Thread Stefan Salewski
On Sat, 2015-10-03 at 12:44 +0200, Stefan Salewski wrote: > OK, seems that we have to replace given link > > https://developer.gnome.org/gio/stable/2.36/ch31s06.html > > by > > https://developer.gnome.org/gio//2.36/ch31s06.html I get the feeling that that guess was wrong

Re: GTK3 application docs, unclear statement

2015-10-03 Thread Stefan Salewski
On Wed, 2015-09-30 at 19:47 +0200, Stefan Salewski wrote: > In > > https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5 > > we have > > Before we can make use of this schema in our application, we need to > compile it into the binary form that GSettin

How to grey out menu items

2015-09-19 Thread Stefan Salewski
OK, gtk_widget_set_sensitive () will do it. But I wonder how to do it for menu items that change sensitively often, for example COPY menu item. I can set it sensitive whenever something is selected in my application, for example a word in a text editor, and make it insensitive if nothing is

Re: How to customize GtkCellRendererCombo ?

2015-12-06 Thread Stefan Salewski
On Sun, 2015-12-06 at 15:26 +0100, Miroslav Rajcic wrote: > Hi Stefan, > > thank you for the nice idea. I was not really happy with that fix myself. You may have seen http://www.kksou.com/php-gtk2/sample-codes/set-up-combobox-in-treeview-with-colors-Part-1.php Seems to be a related task, but

Re: How to customize GtkCellRendererCombo ?

2015-12-05 Thread Stefan Salewski
On Sat, 2015-12-05 at 16:47 +0100, Miroslav Rajcic wrote: > I am trying to customize GtkCellRendererCombo so that the items in the > combo box have different colors. Yes, that is not really easy. Looking at https://developer.gnome.org/gtk3/stable/GtkCellLayout.html#gtk-cell-layo

Re: Detect change with stack/ stackswitcher

2016-05-28 Thread Stefan Salewski
On Fri, 2016-05-27 at 14:32 +0530, Jay Aurabind wrote: > Hi, > > I have added a stackswitcher to the headerbar, and I also have few > more button on the header bar. Depending on the stack which user > selected, I'd like to make changes to the headerbar. I cant seem to > find a way to do it. >

Tooltip over dark background

2016-06-14 Thread Stefan Salewski
When I use a dark color scheme for GtkSourceView tooltips displaying syntax errors look not really nice. For example I am using a color scheme similar to this one currently: http://ssalewski.de/tmp/NEd-SHD.png Some weeks ago, when I still was using a light scheme, I could hover over a syntax

Re: set_visible_child

2016-06-22 Thread Stefan Salewski
On Wed, 2016-06-22 at 11:28 +0200, Stefan Salewski wrote: > https://developer.gnome.org/gtk3/stable/GtkStack.html#gtk-stack-set-v > isible-child > > https://developer.gnome.org/gtk3/stable/GtkStack.html#gtk-stack-set-v > isible-child-name > > Do we have something sim

set_visible_child

2016-06-22 Thread Stefan Salewski
https://developer.gnome.org/gtk3/stable/GtkStack.html#gtk-stack-set-visible-child https://developer.gnome.org/gtk3/stable/GtkStack.html#gtk-stack-set-visible-child-name Do we have something similar for GTK Notebook? https://developer.gnome.org/gtk3/stable/GtkNotebook.html

Re: Tooltip over dark background

2016-06-14 Thread Stefan Salewski
On Tue, 2016-06-14 at 22:50 +0200, infirit wrote: > Unfortunately documentation is really sparse Thanks for your reply. After some testing I have indeed been able to get black text on white background with this Nim code: const   str0 = ".tooltip {background-color: #fff; color: #000; \n}" proc

Re: Interactive data plotting application

2016-01-10 Thread Stefan Salewski
On Sun, 2016-01-10 at 14:21 +0100, Jean Bréfort wrote: > Such a widget already exists in GOffice Or you may search on github for terms like "gtk cairo", there are some hits. Such a widget would be nice, but I know that it is much work to make a really fine one. You intend to use plain C? A

Nim GTK3 toy chess is now available

2016-02-06 Thread Stefan Salewski
It is one more example which shows how GTK3 can be used with Nim: https://github.com/StefanSalewski/nim-chess It is currently not fully compatible with the one year old GTK3 3.15.xx bindings from https://github.com/StefanSalewski/ but that should be not a big problem. As we have currently no

Re: gtk-main-iteration -- use and understanding

2016-01-31 Thread Stefan Salewski
On Sun, 2016-01-31 at 09:19 -0500, Robert Schroll wrote: > My first thought would have been to trigger that callback via a > g_idle_add() [1] call Thanks for your responses. I think the idea of using "call gtk_main_iteration() in a while loop with gtk_events_pending()" is OK for now. Later I

gtk-main-iteration -- use and understanding

2016-01-31 Thread Stefan Salewski
https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-main-iteration I have some problems to understand and correctly use this function. Last week I wrote a toy chess game from scratch in Nim language, just to get some more experience with Nim and to have one more test and example for my

Re: gtk-main-iteration -- use and understanding

2016-01-31 Thread Stefan Salewski
On Sun, 2016-01-31 at 11:41 +, Chris Vine wrote: > On Sun, 31 Jan 2016 10:45:18 +0100 > Stefan Salewski <m...@ssalewski.de> wrote: > > https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-main-iteration > > > > I have some problems to understand a

gtk_widget_queue_draw_area() vs gdk_window_invalidate_rect()

2016-01-20 Thread Stefan Salewski
I am a bit confused... In the past I have used gtk_widget_queue_draw_area () when parts of my drawing area has changed. (http://ssalewski.de/PetEd.html.) In the gtk3-demo I just saw that gdk_window_invalidate_rect () is used. Both seems to work fine, but I have no good idea about the

glib-2.47.6/glib/gtypes.h:#define G_MININT8 ((gint8) -0x80)

2016-03-10 Thread Stefan Salewski
Recently I started preparing the gtk 3.20 bindings for Nim... Seems that some hexadecimal constants have now minus signs -- I am a bit confused? #define G_MININT8 ((gint8) -0x80) stefan@AMD64X2 ~/Downloads/glib-2.47.6/glib $ grep G_MININT8 ~/Downloads/glib-2.43.90/glib/*.h

glistmodel.h:G_DECLARE_INTERFACE(GListModel,

2016-03-21 Thread Stefan Salewski
Have started building the 3.20 bindings for Nim language... Currently we are not using GObject Introspection but generate the bindings from the header files using the Nim tool c2nim. ~/Downloads/glib-2.47.92/gio $ grep GListModel *.h glistmodel.h:G_DECLARE_INTERFACE(GListModel, g_list_model, G,

Glade, how to generate code for template

2016-05-23 Thread Stefan Salewski
As an exercise I tried to create the window.ui xml file below with glade UI editor from scratch. I have already learned that my current glade version 3.18.3 does not support stack and stack switcher, but that will change soon with version 3.20. But I was not able to generate the starting template,

Re: Glade, how to generate code for template

2016-05-23 Thread Stefan Salewski
On Mon, 2016-05-23 at 22:00 +0200, Stefan Salewski wrote: > As an exercise I tried to create the window.ui xml file below with > glade UI editor from scratch. I have already learned that my current > glade version 3.18.3 does not support stack and stack switcher, but > that will

GtkStackSwitcher with close (x) widget?

2016-05-18 Thread Stefan Salewski
https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5 Quote: "Our simple ui file puts a GtkHeaderBar on top of a GtkStack widget. The header bar contains a GtkStackSwitcher, which is a standalone widget to show a row of 'tabs' for the pages of a GtkStack." What is the recommended

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

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

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

Re: Embedding icons in Pango text, the "right" way?

2016-08-12 Thread Stefan Salewski
On Thu, 2016-08-11 at 11:04 -0400, Andy Meneely wrote: > One of the key features is to be able to draw an icon > into the text You do know that GTK3 textview is doing exactly that? See GTK3 gtk3-demo program, textview, "Multiple Views". No idea how that works internally, sorry.

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

Nim GTK3 editor

2016-07-10 Thread Stefan Salewski
Yesterday I pushed my Nim editor to github, see http://ssalewski.de/tmp/NEd.png https://github.com/ngtk3/NEd http://forum.nim-lang.org/t/2198 Lets try an easy question: I am using the font chooser button, which has default text (none) and later shows the name of the last opened file. For my

  1   2   3   >