Re: How do I get the number

2018-10-08 Thread Chris Moller
    │   ├── Topless_Dancers_of_Corfu.ogg     │   └── Total_Bells_and_Tony.ogg     ├── Kitaro     │   ├── Silk_Road_II.ogg     │   └── Silk_Road_I.ogg     ├── Tomita     │   ├── Compilation On 08/10/2018 14:48, Igor Korot wrote: On Mon, Oct 8, 2018 at 12:11 PM Chris Moller wrote: Hi, Igor, The row

Re: How do I get the number

2018-10-08 Thread Chris Moller
cteristics of the whole column. (See https://developer.gnome.org/gtk3/stable/GtkTreeViewColumn.html) On 08/10/2018 14:44, Igor Korot wrote: Hi, Chris, On Mon, Oct 8, 2018 at 12:11 PM Chris Moller wrote: Hi, Igor, The row-activated handler calls: void user_function (GtkTreeView

Re: How do I get the number

2018-10-07 Thread Chris Moller
Take a look at gint * gtk_tree_path_get_indices (GtkTreePath *path); with the  "GtkTreePath  *path"  parameter you get from the row-activated callback. https://developer.gnome.org/gtk3/stable/GtkTreeModel.html#gtk-tree-path-get-indices On 07/10/2018 20:04, Igor Korot via gtk-list wrote:

Re: GTK3 + gnuplot

2018-09-18 Thread Chris Moller
That would be awkward in gnuplot--you'd have to create the plot and then load it as a pixmap or some such.  But there's a utility call plplot that's designed to be embedded in other applications and it might work better.

Re: Any way to access treeview in GtkFileChooser?

2018-09-17 Thread Chris Moller
Have you checked out gtk_tree_view_column_set_widget (GtkTreeViewColumn *tree_column, GtkWidget *widget); ? On 17/09/18 11:11, Marco Ricci via gtk-app-devel-list wrote: I want to modify the column headers to be consistent with the style/theme of the rest of the application I am working on.

Re: "draw" icon with string

2018-09-10 Thread Chris Moller
of Pycairo is not helpfull. No examples, no class trees. I still don't know how to draw text to a cairo surface. It is also unclear to me which surface I should use. On 2018-09-09 18:22 Chris Moller wrote: Here's a sample I came across some time ago.. Basically, you need to do all the drawing

Re: "draw" icon with string

2018-09-09 Thread Chris Moller
Here's a sample I came across some time ago.. Basically, you need to do all the drawing using cairo primitives. /*     Test drawing on a toggle button.     gcc -Wall cairobutton.c -o cairobutton `pkg-config --cflags --libs gtk+-3.0`     C. Eric Cashon */ #include gboolean draw_button1

Re: "draw" icon with string

2018-09-01 Thread Chris Moller
You probably can't do that--GTK has gotten just about impossible to customise--but if you can do it at all, you'll probably have to use CSS. On 01/09/18 17:20, c.buhtz--- via gtk-app-devel-list wrote: I want to use my own drag-icon in a Gtk.TreeView where this is set as an instance of

Re: GTK+ 4 suggestions

2018-07-22 Thread Chris Moller
All of which is why I'm slowly abandoning GTK for Qt.  GTK has been turned into an inflexible bureaucratic nightmare.  I can either spend my time trying to figure out how to outwit the limitations GTK has been saddled with, or I can spend my time learning a new toolkit.  The latter is far more

Re: Unable to capture mouse events of GtkGLArea

2018-07-02 Thread Chris Moller
Some years ago, I used GtkGlArea in C with: GtkWidget *gl_area = gtk_gl_area_new (); gtk_widget_add_events (gl_area, GDK_BUTTON_PRESS_MASK); g_signal_connect (gl_area, "button-press-event",     G_CALLBACK (button_press), molecule);

Re: Simple question...

2018-07-01 Thread Chris Moller
10:06, Stefan Salewski wrote: On Fri, 2018-06-29 at 22:38 -0400, Chris Moller wrote: ...but I can't figure it out: How do I make a tiny little button, like 10x10 pixels, gtk_widget_set_size_request (button, 10, 10); doesn't work. gtk_widget_size_allocate (GtkWidget *widget, GtkAllocation

Re: Simple question...

2018-06-30 Thread Chris Moller
Thanks. I'm writing a complex-number spinbutton widget that needs two sets of up/down buttons, and the default buttons are just too bloody huge. Chris On 29/06/18 22:55, Michael Gratton wrote: On Sat, Jun 30, 2018 at 12:38 PM, Chris Moller wrote: ...but I can't figure it out:  How do I

Simple question...

2018-06-29 Thread Chris Moller
...but I can't figure it out:  How do I make a tiny little button, like 10x10 pixels, gtk_widget_set_size_request (button, 10, 10); doesn't work.  gtk_widget_size_allocate (GtkWidget *widget,    GtkAllocation *allocation); doesn't work. ( can't make anything work using CSS.  Nothing seems to

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

2017-09-15 Thread Chris Moller
t; and all the rest of it. Chris Moller On 09/15/17 14:50, Michael Torrie wrote: On 09/14/2017 10:56 PM, Daniel Kasak wrote: Come on. It's troll bait. ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: GdkPixbuf and click events

2017-08-03 Thread Chris Moller
I'm not sure it will work, but have you tried wrapping the pixbuf in a GtkEventBox? On 08/02/17 18:02, Ferdinand Ramirez via gtk-app-devel-list wrote: I have a program that adds a GdkPixbuf to a GtkTextView. I would like to right click on the image and capture the mouse click event and

Re: Fwd: GtkDrawingArea size request

2017-06-21 Thread Chris Moller
There's no reason the drawing area code you're showing shouldn't work. The most obvious possibility is that the size of your enclosing widget (GTK_BOX(gtk_builder_get_object(builder, "box30"))) isn't set right--the default is that your drawing area will expand to fill its parent. On 06/21/17

Re: questions regarding gtkcheckbutton

2017-05-22 Thread Chris Moller
In theory, this should probably be done with CSS, but I've been unable to make that work. Instead, I'm using the sequence GtkWidget *image = gtk_image_new (); gtk_widget_set_size_request (image, 16, 16); g_signal_connect (G_OBJECT (image), "draw", G_CALLBACK

Re: gtk_spin_button_set_adjustment without triggering value-changed signal

2017-02-06 Thread Chris Moller
I've used constructs along the lines of: GtkWidget *spin_button = gtk_spin_button_new_with_range (...); gulong spin_handler = g_signal_connect (...); // whatever g_signal_handler_block (spin_button, spin_handler); gtk_spin_button_set_value (spin_button, ...);

Re: deprecated gtk_cairo_create

2016-12-30 Thread Chris Moller
Generally, what you need is something like: cairo_surface_t *surface; static gboolean da_configure_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data) { surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),

Re: GtkGLArea

2016-12-19 Thread Chris Moller
From your response, it sounded like GtkGLArea should be working--I installed a newer version of GTK+ and it works fine. Cool. On 12/19/16 15:31, Emmanuele Bassi wrote: Hi; On 19 December 2016 at 20:05, Chris Moller <mol...@mollerware.com> wrote: Over the last few days I wrote a

GtkGLArea

2016-12-19 Thread Chris Moller
Over the last few days I wrote a little OpenGL/glut app and in the process noticed the existence of GtkGLArea. Giving it a try, I'm getting the strong impression it's not ready for prime time, at least not in GTK 3.18.8--I keep getting "Unable to create a GL context" errors. Will a newer GTK

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: Watch for mouse

2016-10-21 Thread Chris Moller
Usually, that sort of thing is done by connecting to the enter-notify-event and leave-notify-event signals. You might have to add those events to the to the widget event mask with something like: gtk_widget_add_events (, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK ); But I have no idea

Re: Make parent aware of drag and drop

2016-10-18 Thread Chris Moller
Have you looked into g_signal_emit () in any of its variants? https://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-emit On 10/19/16 00:40, Jim Heald wrote: Hi, I have a slightly weird situation. I have two widgets that are both eventboxes, and I'm trying to make it

Re: javascript alert function analog in gtk, probably some kind of modal dialog, but looking for a quickie

2016-07-31 Thread Chris Moller
Take a look at GtkMessageDialog. Three lines rather than one, but it seems to do what you describe. On 07/31/16 16:11, Dan Hitt wrote: For front end web development, javascript provides a very handy alert( ) function. alert("this is a message") just pops up a message for the user to click

Re: argv revisited

2016-05-08 Thread Chris Moller
Welcome to my Trash folder; you'll be directed there by the filter I just put in place. Watch out for the falling banana peels. On 05/08/16 12:24, Andrew Robinson wrote: Because you are entertaining. On 5/8/2016 at 9:09 AM, Chris Moller <mol...@mollerware.com> wrote: If you don'

Re: argv revisited

2016-05-08 Thread Chris Moller
If you don't like the people on this forum, and you don't like the answers you've gotten, why are you still here? On 05/08/16 11:45, Andrew Robinson wrote: Like most people in this forum, you don't listen: My issue isn't with GTK2, it is with GTK3. I know Fedora has precompiled

Re: Interactive data plotting application

2016-01-10 Thread Chris Moller
There's a great package out there called plplot that seems to do a lot of what you want to do, but I've never tried integrating it into GTK. I have a package on github (https://github.com/ChrisMoller/aplplot) that shows plplot in use if you want a quick look at how its used. By the way, you

Re: Howto set horiz space/padding between vbox and statusbar?

2015-12-07 Thread Chris Moller
Kinda guessing--I've never used it--but maybe try setting the child margin-start property? On 12/08/15 00:13, David C. Rankin wrote: All, I have been pulling my hair out trying to tweak the padding between a GtkVBox and a GtkStatusbar. I have the following main window layout: main

Re: Auto-resize scrolled window

2015-09-21 Thread Chris Moller
Try gtk_window_set_default_size () On 09/21/15 20:33, Subsentient wrote: When I resize the window, I'm having difficulty finding a way to make a scrolled window automatically resize with it. I can't use gtk_widget_set_size_request(), because then I won't be able to shrink it down again.

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

2014-09-05 Thread Chris Moller
What do you mean, fails? What happens? And what do you want to happen? On 09/05/14 21:12, Gary Kline wrote: = Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 28 years of service to the Unix community. things that I *thought* might work by

Re: Can array data be displayed in GTK? How?

2014-08-29 Thread Chris Moller
GtkGrid is probably your best option. On 08/28/14 23:59, Rajib Bandopadhyay wrote: Dear Sirs / Madams, Can array data be displayed in GTK? How this can be achieved? A c program generates data in the form of array that changes over time. How can I grab the data and display it in GUI colours?

Re: nuts!

2014-07-29 Thread Chris Moller
It's actually gtk_*label*_set_justify (). On 07/29/14 15:22, Gary Kline wrote: = Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 28 years of service to the Unix community. On Tue, Jul 29, 2014 at 10:36:03AM +0100, Chris Vine wrote: On Mon, 28 Jul

Re: need help putting up/down arrows into Small square

2014-07-19 Thread Chris Moller
Compiles fine for me under gtk3-3.10.9-1, only complaining about line 67: box = gtk_hbox_new (FALSE, 0); That's deprecated and should be box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); It creates a wide, mostly empty, window with a couple of big up/down buttons at the left. On

Re: Polar drawing widget, gearwheel drawing

2014-06-20 Thread Chris Moller
+1 on cairo. He's a doc page that covers the basics: http://cairographics.org/documentation/ On 06/20/14 15:27, John Coppens wrote: On Fri, 20 Jun 2014 19:54:28 +0200 Arne Pagel a...@pagelnet.de wrote: Point is that I don't want to spend a lot of time in this feature, so I am searching

Re: Hello world not show

2014-06-04 Thread Chris Moller
How did you compile it? Putting your code in a file called try.c and running the following: gcc -c try.c `pkg-config --cflags gtk+-3.0` gcc -o try try.o `pkg-config --libs gtk+-3.0` worked okay and running it put up an empty window. On 06/04/14 09:21, Zhengrong Zang wrote: I compiled code

Re: Hello world not show

2014-06-04 Thread Chris Moller
On 06/04/14 10:55, Zhengrong Zang wrote: 2014/06/04 23:30?Florian HEGRON hog...@iiiha.com ??: $ gtk3-demo ** ERROR:/usr/src/ports/gtk3/gtk3-3.10.7-2.i686/src/gtk+-3.10.7/demos/gtk-demo/main.c:892:setup_default_icon: assertion failed: (pixbuf) Is there a cygwin package for pixbuf that is

A bug or a screw up?

2014-05-07 Thread Chris Moller
a third label The problem is that the top of drawing area is lined up with the top of the enclosing vbox, or maybe at the top of the window, rather than at the bottom of the second label. Is there something new I'm missing? It didn't used to work that way. Thanks, Chris Moller Fedora release

Re: A bug or a screw up?

2014-05-07 Thread Chris Moller
, DA_HEIGHT); cairo_fill (cr); On 05/07/14 09:30, LRN wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07.05.2014 17:22, Chris Moller wrote: I just did a good-size upgrade I'd been putting off for too long that took me from GTK 3.2 to GTK 3.10.8, and some stuff that used to work doesn't any

Re: A bug or a screw up?

2014-05-07 Thread Chris Moller
, Nicola Fontana wrote: Il Wed, 07 May 2014 09:22:48 -0400 Chris Moller mol...@mollerware.com scrisse: Is there something new I'm missing? It didn't used to work that way. Hi, I just removed what seems wrong to me (cairo_identity_matrix) and it appears to work the way you want. Ciao

Re: A bug or a screw up?

2014-05-07 Thread Chris Moller
-model/ and this bug: https://bugzilla.gnome.org/show_bug.cgi?id=700674#c10 both should explain the issue and the fix. ciao, Emmanuele. On 7 May 2014 18:03, Chris Moller mol...@mollerware.com wrote: Yep, that did it. And to think I stuck that in just to guarantee a known initial condition

Re: Gtk Graph drawing

2014-03-12 Thread Chris Moller
So far as I know, gtk_drawing_area_new and cairo are about it. On 03/08/14 11: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

Re: GTK signals question.

2014-03-05 Thread Chris Moller
be a compiler bug. One way or the other, thanks for all the responses. -cm On 03/05/14 04:21, A. Walton wrote: On Tue, Mar 4, 2014 at 10:43 PM, Chris Moller mol...@mollerware.com mailto:mol...@mollerware.com wrote: Okay, I'm out of ideas... I'm writing an app, that among a lot of other

Re: GTK signals question.

2014-03-05 Thread Chris Moller
On 03/05/14 12:07, Chris Vine wrote: On Wed, 05 Mar 2014 09:44:48 -0500 Chris Moller mol...@mollerware.com wrote: I was actually writing that testcase when I found a correlation: I'm using gcc and my callbacks were nested functions. Pull the callbacks out and make them normal, top-level

Re: GTK signals question.

2014-03-05 Thread Chris Moller
On 03/05/14 13:52, Chris Angelico wrote: On Thu, Mar 6, 2014 at 5:43 AM, Chris Moller mol...@mollerware.com wrote: gcc supports nested functions as an extension to standard C. I tend to use them a lot because they operate within the stack frame of the enclosing function, thereby minimising

GTK signals question.

2014-03-04 Thread Chris Moller
Okay, I'm out of ideas... I'm writing an app, that among a lot of other stuff, has three mutually interacting spinbuttuns, i.e., if I increment spinbutton A, its callback then updates values in B and C. B and then would try to update A, and C, etc., resulting in a bottomless recursion. So,

Re: What are eggs?

2010-01-01 Thread Chris Moller
On 01/01/10 09:31, Behdad Esfahbod wrote: I've heard stories about eggs and bacon Particularly if you're on the right mailing list at the right company... :-) and breakfast, that kind of stuff. Cheers, behdad Thanks! Dov ___ gtk-list

Re: dynamically growing 2D aray of structues

2009-11-26 Thread Chris Moller
On 11/26/09 12:23, Ian Liu wrote: You can always map a 2d coordinate intto 1d: (i, j) - i * w + j where w is the width of the matrix That works poorly for dynamic arrays--every time you resize the array, in either dimension, you basically have to copy all the elements to new locations.

Re: Why there's still ONE element left after g_slist_free () ?

2009-05-14 Thread Chris Moller
american.communist.pa...@gmail.com wrote: Its old hat to C programmers that you set any object to NULL when you're done with it, which returns the memory used to the heap. That's specifically /not/ true in C: You have to explicitly free allocated space--setting a pointer to null doesn't

Re: How to debug helloworld gtk+ application

2009-01-15 Thread Chris Moller
N1829 wrote: Hi, I am totally new for linux and gtk+. I want to debug sample gtk+ program in ddd. Does your code fail the same way without using the debugger? Looks like ddd/gdb can't find a shared library, which might mean the problem is in your gtk+ installation. (The shared symbols

Re: How to install GTK in linux

2008-11-02 Thread Chris Moller
Jean Bréfort wrote: You should add /usr/local/lib to your /etc/ld.so.conf And then run /sbin/ldconfig (as root) ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: Question about Threads y gtk+

2008-10-03 Thread Chris Moller
Richard Boaz wrote: Inexplicably (read: I don't know), there is no glib equivalent for the function pthread_kill(). Blowing a thread's brains out is generally a bad idea. The whole idea of threads is that they share address spaces and if you kill them at arbitrary times it's not impossible

Multi-thread problem

2008-09-23 Thread Chris Moller
()) didn't help. Is there anything else I could try? Thanks, Chris Moller ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Dumb question

2006-03-07 Thread Chris Moller
), or just gtk_button_new() and gtk_container_add() various things (labels, labels in boxes, etc) to the button later. Anyone have a clue what's happening? Thanks, Chris Moller Red Hat signature.asc Description: OpenPGP digital signature ___ gtk-list ma

Re: Dumb question

2006-03-07 Thread Chris Moller
Much appreciated, and thanks for saving me a couple of months. cm Mark Leisher mumbled something on 03/07/2006 11:39 AM: Not so dumb. I struggled with this one for a couple months. I discovered with GTK+ 2.7 and later that when creating subclasses of GtkContainer, you *have* to

Re: Scrollkeeper won't make-install

2003-09-17 Thread Chris Moller
Are you installing as root? Usually ${prefix} is empty and the permissions for /var/log are set to be writable only by root. Try sudo make install or su to root before doing make install. Chris Moller Red Hat Anthony wrote: How come I'm the only one asking questions about installing Gnome

Re: Refreshing window other

2003-09-17 Thread Chris Moller
that catches the progress bar cancel button, allowing the user to stop things if desired. You could probably build a separate cancel button to do that. You can check the existance of a file with the stat library function; check the stat man page. Chris Moller Senior Tinker Red Hat, Inc. P.S. -- I

GTK+ documentation

2003-09-15 Thread Chris Moller
is: Is there a tagged text version of the GTK docs I could use to extract the relevant info? Something that identifies function names as such, associated arg lists, etc. with SGML or Docbook semantic tags, or something similar. Thanks, Chris Moller Senior Tinker Red Hat, Inc