Re: GtkSelectionMode

2019-02-13 Thread richard boaz via gtk-list
sorry, typing too fast and missed the word *not*, should have read: so no functionality was *not* lost between 2 and 3 On Wed, Feb 13, 2019 at 4:20 PM richard boaz wrote: > i think you're getting confused: > > from the GTK-3 manual > <https://developer.gnome.org/gtk3/stabl

Re: GtkSelectionMode

2019-02-13 Thread richard boaz via gtk-list
i think you're getting confused: from the GTK-3 manual explaining how this option: GTK_SELECTION_MULTIPLE Any number of elements may be selected. The Ctrl key may be used to enlarge the selection, and

g_thread_exit()

2018-06-27 Thread richard boaz via gtk-list
hello, (not sure if this is a glib question, or a linux kernel question, any helpful hints appreciated...) i have a server-side program that is responsible for managing hundreds (increasing daily) of IoT connections, where this program listens for a connection request and then spawns a separate

Re: Gtk3 portability

2017-02-11 Thread richard boaz
> > On 11 February 2017 at 19:17, richard boaz <ivor.b...@gmail.com> wrote: > > not a GTK-based solution, but are you familiar with Docker? it solves > these > > problems for you and more. > > > > you will never worry about having to satisfy run-time depe

Re: Gtk3 portability

2017-02-11 Thread richard boaz
not a GTK-based solution, but are you familiar with Docker? it solves these problems for you and more. you will never worry about having to satisfy run-time dependencies on the target platform ever again. well, everything except needing a docker engine, that is. richard On Sat, Feb 11, 2017

Re: Tooltips not working in application

2016-10-23 Thread richard boaz
for the widgets where tooltips fail, wrap them in an event widget and attach the tooltip to that. from the documentation : Description The GtkEventBox widget

Re: Interactive data plotting application

2016-01-10 Thread richard boaz
hi, i've done all this in my data anlysis display app (pqlx), except for scrolling, and i've created an example of most of this using GTK3 and Cairo that you can find here: https://gitlab.com/ivor/GTK3-Cairo i use a drawing area inside a container widget, using Cairo for drawing, that is wholly

Re: help: a small example of program with gtk3

2015-10-21 Thread richard boaz
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 wrote: > Hi all > > > I am looking for an example of program with the new functions in gtk3.0, > for zooming with the

Re: How to grey out menu items

2015-09-20 Thread richard boaz
> > > just a note: doing this "properly" should involve Actions, not widgets. > > it is unfortunate that neither GTK's own documentation, along with > most stuff I've read on GUI programming, doesn't emphasize the concept > of Actions as a more basic element of GUI programs. > > and i think this

Re: How to grey out menu items

2015-09-20 Thread richard boaz
Hi Stefan, this question also came up a few years ago, where i detailed the solution i have employed for this problem here: https://mail.gnome.org/archives/gtk-list/2010-September/msg00047.html i subsequently formalized this into a self-contained library, with a complete description of it here:

Re: GTK3 Frame Border - Bug #659926

2015-09-10 Thread richard boaz
eba...@gmail.com> wrote: > Hi; > > On 10 September 2015 at 15:06, richard boaz <ivor.b...@gmail.com> wrote: > > After some google-reading, it seems that with GTK-3, control of frame >> decorations has been 100% given over to whatever WM is running whatever >&g

GTK3 Frame Border - Bug #659926

2015-09-10 Thread richard boaz
hi, (I am posting to both GTK lists in the hope that perhaps someone has a work-around for this issue, and if not, then the developers can perhaps comment?) After some google-reading, it seems that with GTK-3, control of frame decorations has been 100% given over to whatever WM is running

Re: GTK3 Frame Border - Bug #659926

2015-09-10 Thread richard boaz
if it's ultimately an illusion at this point. (old dogs and all that...) r- On Thu, Sep 10, 2015 at 10:21 AM, Emmanuele Bassi <eba...@gmail.com> wrote: > Hi; > > On 10 September 2015 at 16:08, richard boaz <ivor.b...@gmail.com> wrote: > > thanks for the e

Re: Desktop as transient window

2015-08-10 Thread richard boaz
hi, i think this is a case when the warning, (which can be ignored), is meant for the developer, and not the end-user. i would trap the error, ignore it, and definitely not forward to the end-user; following the dictum avoid confusing them as much as possible... richard On Mon, Aug 10, 2015 at

Re: What should be used?

2015-07-30 Thread richard boaz
Hi Stefan, I am also in the process of converting my app from v2 to v3, where I do *lots* of drawing. So before jumping in, I decided to revisit a drawing example I posted some years ago to first convert it to v3 and its drawing to Cairo. In the hope of being useful for others, I have posted

Re: gtk_main_quit() as button callback?

2015-07-23 Thread richard boaz
emmanuele, thanks for the additional details, that solved all the issues... r- On Wed, Jul 22, 2015 at 6:25 PM, Emmanuele Bassi eba...@gmail.com wrote: To be more precise (I was on my phone earlier)… On 22 July 2015 at 23:09, richard boaz ivor.b...@gmail.com wrote: g_signal_connect

gtk_main_quit() as button callback?

2015-07-22 Thread richard boaz
hi, I'm in the process of converting my app from v2 to v3 and have come across something strange: Attaching gtk_main_quit() to a button's click callback does not result in the application quitting. What I see: 1. attaching gtk_main_quit() to the to the top window destroy signal works

Re: Misconduct of GTK+/glib Bugtracker Admins

2015-06-04 Thread richard boaz
oh my, all that time, what luxury... can you luxuriate on another list, please? On Thu, Jun 4, 2015 at 5:11 PM, IgnorantGuru ignorantg...@openmailbox.org wrote: On Thu, 4 Jun 2015 17:53:22 -0400 Paul Davis p...@linuxaudiosystems.com wrote: You are the person who began their first post on

Re: Strategy for unit testing GTK+ applications in C

2015-05-17 Thread richard boaz
you also might want to have a look at google test. at first glance, it seems to satisfy your needs: http://en.wikipedia.org/wiki/Google_Test On Sat, May 16, 2015 at 4:45 AM, John Tall mjta...@gmail.com wrote: Hello. I'm about to start working on a new GTK+ application that will be written

Re: g_idle_add() clarification

2015-01-20 Thread richard boaz
, richard boaz wrote: hi, you are calling the function Scanning() in the g_idle_add() call. richard On Tue, Jan 20, 2015 at 3:23 PM, Ian Chapman ichap...@videotron.ca wrote: Hi all, Sorry to bother but I'm lost with the workings of guint g_idle_add () My code is as follows extern C

Re: Accuracy of motion events

2014-08-29 Thread richard boaz
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 r- On Fri, Aug 29, 2014 at 4:29 PM, ax487 ax...@gmx.de wrote: Hello all, I am wondering about the rate at which pointer motion events are

Re: Re: Would it be possible that gtk implementation in C++

2014-08-09 Thread richard boaz
i'm confused... if you think it's such a good idea, why don't you do it yourself? or, rather, why do you expect others to do it for you? or are you another one of many who thinks that software simply magically appears free of charge when someone asks for it? so, please go do it yourself and

Re: Routing scroll events in a Gtk.Overlay

2014-06-05 Thread richard boaz
for what it's worth (i.e., without necessarily delving into all the possible finer points): instead of using GTK to route the events correctly, is it not possible (possibly preferable) to route all events to your own handler which you yourself can further negotiate and forward to the necessary

Re: How to add a callback that will be called each time when the event queue becomes empty

2013-07-19 Thread richard boaz
let's step back one second. your description implies that it is not possible for your UI to be directly aware of the events that require follow-on updates to the UI's widgets. but i don't understand this. can you explain a little more how/why this makes sense on a design level? what exactly

Re: How to add a callback that will be called each time when the event queue becomes empty

2013-07-19 Thread richard boaz
to the current states. And I need to call that function when idle. This approach is simpler and cleaner. Thanks, Gang 2013/7/20 richard boaz ivor.b...@gmail.com let's step back one second. your description implies that it is not possible for your UI to be directly aware of the events that require

Re: Re-attaching tab to notebook via close event

2013-07-12 Thread richard boaz
to re-parent. On Fri, Jul 12, 2013 at 12:35 AM, richard boaz ivor.b...@gmail.comwrote: hi, connect a callback to the delete-event associated with the new window. you are keeping track of which tabs are where at any given moment, so when you receive the delete-event callback, simply move

Re: Re-attaching tab to notebook via close event

2013-07-11 Thread richard boaz
hi, connect a callback to the delete-event associated with the new window. you are keeping track of which tabs are where at any given moment, so when you receive the delete-event callback, simply move the tabs found in that window back over to the notebook in the original window. it is a

Re: Remove Minimize Button from GTK Window?

2013-07-01 Thread richard boaz
hi, i'm afraid that instructions to the WM are regarded as advice and that the WM has no responsibility in actually honoring the request. it can work one place, and not the other, sorry. richard On Mon, Jul 1, 2013 at 3:52 PM, Mitchell Verter mitchell.ver...@gmail.comwrote: Thanks so much

Re: glib: processing events in multiple threads

2013-04-30 Thread richard boaz
and i do it a different way. you say you the main loop is not a part of the main processing of your program, but this really doesn't matter. in this case, you could: - start a g_main_loop() in a separate thread from the main processing thread, at startup, executing the whole time the

Re: glib: processing events in multiple threads

2013-04-30 Thread richard boaz
On Tue, Apr 30, 2013 at 11:59 AM, Patrick Ohly patrick.o...@intel.comwrote: On Tue, 2013-04-30 at 11:27 +0200, richard boaz wrote: and i do it a different way. you say you the main loop is not a part of the main processing of your program, but this really doesn't matter. in this case

Re: glib: processing events in multiple threads

2013-04-30 Thread richard boaz
[...] I've heard from quite a few people in particular in the GNOME camp who believe that everything should be asynchronous and that multithreading is evil. i don't know who these GNOME people are (very short?), but going with multi-threading is evil is an unbelievable statement: i'm

Re: Knowing if a GThread is still alive

2012-10-01 Thread richard boaz
On Sun, Sep 30, 2012 at 9:36 PM, Vivien Malerba vmale...@gmail.com wrote: So I'm looking for some advice on how to check if a GThread (say A) is still alive while my code executes in another thread (say B). I've thought about two ways to do this but could find none which seems to work: ...

Re: Clarification of GTK/GDK locking pre GTK 4.0

2012-09-14 Thread richard boaz
if you're only using GTK+ for an application, and you're not using threads directly, then you can skip the gdk_threads_add_* API, and use the GMainLoop API for idle and timeout sources. not using threads directly? what's an indirect thread? i too was confused that it seems g_idle_add() is

Re: allocating mem using glib

2012-09-02 Thread richard boaz
a few things of note: 1. you're printing the elements after you free the memory, that's not gonna work 2. use (iterator = g_slist_next(iterator)) to increment; do not refer to (iterator-next) directly 3. after you've freed the list data elements, you need to free the list

Re: allocating mem using glib

2012-09-02 Thread richard boaz
be the way to go. r- On Sun, Sep 2, 2012 at 11:02 AM, Jasper St. Pierre jstpie...@mecheye.netwrote: On Sun, Sep 2, 2012 at 5:00 AM, richard boaz ivor.b...@gmail.com wrote: a few things of note: you're printing the elements after you free the memory, that's not gonna work use (iterator

Re: Search and replace on a string

2012-02-03 Thread richard boaz
or as a macro, i.e., in-line as opposed to calling a function: #define strReplace(a, b, c, d) {char **strs = g_strsplit(a, c, -1); b = g_strjoinv(d, strs); g_strfreev(strs);} where a = input string b = output string, def'ed as (char *) c = string to be replaced d = string to replace with r- On

Re: combined mouse and button event in a drawing area

2012-01-06 Thread richard boaz
well, regardless the documentation, it does what it does. (really? we programmers expect code execution to follow the description in documentation? granted, it can cause confusion; but still, we know better, no?) if you want to ignore the motion event when a button is not pressed, then check

Re: gtk3 replacement for gdk_pixmap_foreign_new

2012-01-06 Thread richard boaz
(well, my previous comment on documentation aside) i have been caught by this in the past as well: that documentation related to deprecated functions is woefully lacking. it is emminently unhelpful to simply state stop using this call. in all cases, there is a story behind why something has

Re: App on MAC - and Pango

2011-11-27 Thread richard boaz
On Sun, Nov 27, 2011 at 12:31 AM, Paul Davis p...@linuxaudiosystems.comwrote: On Fri, Nov 25, 2011 at 4:08 AM, richard boaz ivor.b...@gmail.com wrote: Hello, I'm attempting to get my GTK-based app packaged for delivery to MAC platforms. Everything is going okay except for one last

App on MAC - and Pango

2011-11-25 Thread richard boaz
Hello, I'm attempting to get my GTK-based app packaged for delivery to MAC platforms. Everything is going okay except for one last implementation issue. The current solution (not one I'm absolutely committed to, btw): 1) Install GTK+-2 using macports onto build machine. 2) Build the app

Re: GdkDrawable from GtkDrawingArea and it's cairo surface

2011-07-25 Thread richard boaz
hi, i do this same sort of thing in my stuff, but written before cairo was. i plan on converting all my drawing to cairo one day, thus must eventually solve this problem myself. so i took your original sample/example and expanded on it to demonstrate pixmap backing stores and how to

Re: GdkDrawable from GtkDrawingArea and it's cairo surface

2011-07-25 Thread richard boaz
ah! i knew it. thanks paul, richard On Mon, Jul 25, 2011 at 2:41 PM, Paul Davis p...@linuxaudiosystems.comwrote: 2011/7/25 richard boaz ivor.b...@gmail.com: but i deliver this with a huge caveat: i do not like the solution, something about the design is wrong (i can feel it). so

Re: How to improve performance of this example?

2011-07-23 Thread richard boaz
hi, the problem isn't the mouse going too fast (this is not possible, if it can go fast, it can), it's that you're wanting to draw a line using points. drawing a real line between the last point received by the drag event and the new/next point will get you what you want, example code below.

Re: Confirm Installed Run-Time Version

2011-07-19 Thread richard boaz
, GTK_MICRO_VER_MIN); printf(%s\n, (verCheck ? FAILURE : SUCCESS)); return 0; } == VERSION CHECK END On Mon, Jul 18, 2011 at 11:05 PM, jcup...@gmail.com wrote: Hi Richard, On Monday, 18 July 2011, richard boaz ivor.b...@gmail.com wrote: i'm trying to create an installer of my

Re: Confirm Installed Run-Time Version

2011-07-19 Thread richard boaz
, On 19 July 2011 13:04, richard boaz ivor.b...@gmail.com wrote: i have to do this for MAC platforms as well, (where installing gtk+ is a right-old PITA), so i will use solution 2 and simply provide all the necessary gtk+ libraries as part of the app install itself. I use gtk-osx

Confirm Installed Run-Time Version

2011-07-18 Thread richard boaz
i'm trying to create an installer of my program for all variants LINUX, but am having trouble with something i had hoped/though would be trivial. how does one confirm from the shell which version of the *run-time* GTK+ libraries are installed? - pkg-config won't work since destination machine

Re: Compiling a GTK application on windows

2011-06-01 Thread richard boaz
hi lothar, really, you should know the subject deeper before making absolute statements, for otherwise you run the risk of being wrong and just looking silly. multi-threading is primitive with GTK? are you crazy? if you refer to drawing with Pango, then yes, this must be done in the main

Re: Compiling a GTK application on windows

2011-06-01 Thread richard boaz
hi lothar, i guess i'm too sensitive when/where it comes to gtk+. how you can see past everything and know that i'm quite bad at what i do is pretty amazing, commendable, even. good luck, richard On Wed, Jun 1, 2011 at 5:16 PM, Lothar Scholz llot...@web.de wrote: Hello richard,

Re: Compiling a GTK application on windows

2011-05-30 Thread richard boaz
no, gtk on windows doesn't suck, but at the same time, isn't issued by microsoft either, thus different (wrt IDE's), requiring some by-hand work. i have a rather large project, designed under linux, also cross-compiled into windows binaries. i've gone down both roads of compiling directly under

Re: GtkComboBox

2011-04-27 Thread richard boaz
well, i guess i wonder how it's possible to fill in the combo box with entries, while not being able to count them at the same time. richard 2011/4/27 Emmanuel Gontcho gont...@gmail.com Hello, It seems to me that it is impossible to know the item count in a combobox declared with

Re: GtkComboBox insanely slow on large models (GTK 2.22)

2011-04-27 Thread richard boaz
hi lothar, i'm not familiar with the details of your app, but i wonder if looking at this from the user's perspective might lead you to a way out. first, does your model assume a single list of items? or are there several levels of hierarchy involved? because when it's a single list: if, as a

Re: How many times can I call gtk_label_set_markup()?

2011-04-08 Thread richard boaz
yes, one can only conclude that you are using global variables for data that changes over time. -r On Fri, Apr 8, 2011 at 8:00 PM, Igor Korot ikoro...@gmail.com wrote: Hi, David, 2011/4/8 David Nečas y...@physics.muni.cz: On Fri, Apr 08, 2011 at 10:30:32AM -0700, Igor Korot wrote: $

Re: gtk_file_chooser_get_filenames multiple folders

2011-02-08 Thread richard boaz
= gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(fileSel)); while(selected) { getFiles(selected-data); g_free(selected-data); selected=selected-next; } g_slist_free(sel); } On Tue, Feb 8, 2011 at 11:06 AM, richard boaz ivor.b...@gmail.com wrote: i do this just fine. but you must do the recursive

Re: How to implement a global hot-key listener ?

2010-12-06 Thread richard boaz
indeed. and if i'm not wrong, it seems the future here will be solved by D-Bus: http://www.freedesktop.org/wiki/Software/dbus in time, i hope, this solution/implementation will take hold at the WM level and this problem will be solved in a generic and universal manner for now and ever. but, as

Re: How to implement a global hot-key listener ?

2010-12-04 Thread richard boaz
not entirely sure what you mean: global to your application, or global to the window system? if you mean your application, then it's easy: - make your top level window - connect key-press-event signal to the top level window - process the key press action in your registered callback

Re: Status for long-running operation

2010-09-20 Thread richard boaz
On Sun, Sep 19, 2010 at 8:33 PM, Paul Davis p...@linuxaudiosystems.comwrote: On Sat, Sep 18, 2010 at 3:24 AM, richard boaz ivor.b...@gmail.com wrote: yep, i concur with the set sensitive method. all good, except that in an ideal world, the sensitivity changes are applied to GtkAction's

Re: Status for long-running operation

2010-09-18 Thread richard boaz
yep, i concur with the set sensitive method. the way i do this is: when the user: - executes something that gets done in the background, - that requires some time, - is non-interruptable, - and must complete before any next user action loop over a list of GtkWidget pointers i have

Re: g_strcmp0

2010-09-01 Thread richard boaz
2010/9/1 David Nečas y...@physics.muni.cz On Tue, Aug 31, 2010 at 10:38:13PM +0200, Milosz Derezynski wrote: Well, to be honest, the g_ stuff serves as an abstraction layer; I don't think that currently there is any problem with using the plain C type instead of the g_ type in this (or

Re: GIOChannel Intercepting stdout

2010-08-26 Thread richard boaz
On Thu, Aug 26, 2010 at 11:01 AM, Hrvoje Niksic hrvoje.nik...@avl.comwrote: The good news is that libraries shouldn't require a terminal for stdout because then they wouldn't work with stdout being redirected to a file (highly unlikely). The bad news is that this is harder to do correctly

GIOChannel Intercepting stdout

2010-08-25 Thread richard boaz
So, after tweaking the attached program and pulling veritable tufts of hair, I am not one inch closer to understanding how GIOChannel should work, nor how it is actually working, in my particular case. Which leads me to conclude that I suffer from a rather fundamental lack of understanding as to

Re: GThreads and GThreadPool help for a dummy

2010-07-24 Thread richard boaz
, not much different than writing in-line...). In the provided solution, a single lock is required around g_queue_pop_head() (which executes very fast), making the likelihood of a thread having to wait on the lock to be free very low indeed. cheers, richard 2010/7/23 richard boaz ivor.b

Re: GThreads and GThreadPool help for a dummy

2010-07-24 Thread richard boaz
indeed. the way i solve this is by programmatically determining the number of CPU's available on the machine at program startup, knowing (through testing) how much of the CPU a particular task requires, taken in conjunction with how much the program should be allowed to take over the machine.

Re: GThreads and GThreadPool help for a dummy

2010-07-23 Thread richard boaz
this is how i do it (not using pools), i have modified my code for your purposes, though it's probably wrong somewhere in the implementation details (i didn't even compile it), but i leave that to you. this is very easily generalizable to do any kind of background work on a list of items.

Re: How to bring up tooltip text for certain words in a GTK textview?

2010-05-19 Thread richard boaz
i have had to do this and solved it just like you have proposed. if you do go with this method, some heads-ups: the extra issues one must handle when doing this are: - unless gtk is now providing direct access to tooltip style pop-ups, you must create it yourself - meaning that you must

Re: how can I let application emit configure event signal?

2010-04-16 Thread richard boaz
the easiest way is to force it, by calling the function gtk_widget_queue_resize() on the widget you want the configure event to be called on. richard On Fri, Apr 16, 2010 at 4:10 PM, Randy randyqi...@hotmail.com wrote: Hi list, I know when I change the widget's size,it will emit the

Re: Question About Hash

2010-04-09 Thread richard boaz
show your code, without it your comment is an opinion and not likely to get much of an interesting response. why? because there are multiple ways of setting up hash tables, their contents, and the automatic (or not) destroy functions which should be used. try again, richard On Fri, Apr 9,

Re: Question About Hash

2010-04-09 Thread richard boaz
(key_3), value); } func3() { ... g_hash_table_foreach_remove(table_3, NULL, NULL); g_hash_table_destroy(table_3); ... } 2010/4/9 richard boaz ivor.b...@gmail.com show your code, without it your comment is an opinion and not likely to get much of an interesting response. why

Re: How to move focus to another window by program?

2010-04-03 Thread richard boaz
--- On *Thu, 1/4/10, richard boaz ivor.b...@gmail.com* wrote: From: richard boaz ivor.b...@gmail.com Subject: Re: How to move focus to another window by program? To: Ken Resander kresan...@yahoo.com Date: Thursday, 1 April, 2010, 4:53 PM you might try this in a different way. instead

Re: Is the guint32 time of GdkEventKey the timestamp?

2010-02-01 Thread richard boaz
what kind of values to you get when you print out the variable during the execution of the callback? does it like like the current time according to the computer clock? then yes, otherwise, no. r- On Mon, Feb 1, 2010 at 10:58 PM, Teste123 Teste123 asb1...@gmail.comwrote: Please, Can anyone

Re: how to leave a specific thread?

2009-07-12 Thread richard boaz
the question should be changed to: how do i tell a thread to kill itself? glib does not allow for killing a thread from another thread. this is a bad idea since killing a thread from another does not allow for the thread being killed to shutdown any processing it is doing in a graceful manner.

Re: Setting background color for a GtkFrame

2008-12-30 Thread Richard Boaz
hi, you need to use an event box, GtkFrame does not have its own X window, so you must make one yourself using GtkEventBox and then modify it, e.g., your background color. discussion and example at: http://www.pygtk.org/pygtk2tutorial/ch-ContainerWidgets.html richard 2008/12/30 Harinandan S

Re: A problem about programming with Gtk+

2008-12-28 Thread Richard Boaz
Hi, You're doing a couple of things wrong in the setup: 1) you are not using any gdk() routines in threads, therefore, you do not need to call gtk_threads_init(). (call all gtk_ and gdk_ routines only from routines executing as part of the main loop and strange behaviours are minimized.) 2)

Re: A problem about programming with Gtk+

2008-12-28 Thread Richard Boaz
that bit of documentation is a bit confusing and definitely misleading. what it essentially says is that if you make calls to gtk_ or gdk_ then the thread calls are required. but if all calls to gtk_ and gdk_ are executed within routines executing as part of the main loop, thread calls are not

A problem about programming with Gtk+

2008-12-20 Thread Richard Boaz
what exactly are you trying to do? cause your program's not gonna do much as it is, and it's not obvious to me what exactly you're trying to achieve here. if it's related to modifying the cursor as a result of user interaction, you should try another model. that is, set up a different thread to

Re: Questions about combobox.

2008-10-13 Thread Richard Boaz
you really are making this way more complicated than necessary, i think. all your problems will be solved if you: 1. simply make the title you want to be seen to be the first item in the list. 2. set this item to be the item on display any time you want to force the user to make a new

gdk_visual_get_best_depth() - Usage Question

2008-09-18 Thread Richard Boaz
I have the following code (snippet): == depth = gdk_visual_get_best_depth(); pmap=gdk_pixmap_new(NULL, 100, 100, depth); ctxt = gdk_gc_new(pmap); gdk_gc_set_rgb_fg_color (ctxt, fg); == I have recently upgraded my OS to Ubuntu and after the upgrade, this code caused the program to fail to start

Re: gtk_print

2008-08-28 Thread Richard Boaz
(CEST) Richard Boaz [EMAIL PROTECTED] wrote: [snip] [ ... snip snip snip ... ] this sounds like a disaster of an API. most other GTK/GDK APIs that involve things that ultimately come down to pixels seem to have variants that allow you to provide unstructured data

gtk_print

2008-08-22 Thread Richard Boaz
On Thu, Aug 21, 2008 at 11:44 PM, Chris Vine [EMAIL PROTECTED] wrote: No, you are not missing anything obvious. Doing it in the ordinary way means I think writing your own postscript interpreter for writing the pages to the cairo surface via pango. It will be hard work, but

gtk_print

2008-08-21 Thread Richard Boaz
On Tue, Aug 19, 2008 at 3:41 PM, Chris Vine [EMAIL PROTECTED] wrote: On Tue, 19 Aug 2008 10:47:54 +0200 (CEST) Richard Boaz [EMAIL PROTECTED] wrote: Hi, The documentation for gtk_print states that once the user is finished with gtk_print_operation_run(), the ::draw

gtk_print

2008-08-19 Thread Richard Boaz
Hi, The documentation for gtk_print states that once the user is finished with gtk_print_operation_run(), the ::draw-page signal will be emitted. This signal is then to be caught by the program, using Cairo to render to the GtkPrintContext. Except that I have a Postscript file that needs to be

Re: load a gtkimage from Bytes string

2008-07-16 Thread richard boaz
if you mean an image that is contained (in some format) in memory that you want to render to the screen, then you need to first convert this data to an array of RGB values for each pixel, and then call: gdk_draw_rgb_image() with all the appropriate parameters. fill the array properly and get

Re: Alt+Button click and events

2008-07-09 Thread richard boaz
not sure what's could be going wrong since you didn't supply any code, but... first, see the accelerator documentation: http://library.gnome.org/devel/gtk/stable/gtk-Keyboard-Accelerators.html#gtk-accelerator-set-default-mod-mask and to see if the ALT key is pressed, in your mouse callback:

Re: bug(s) in all-in-one bundle?

2008-06-01 Thread Richard Boaz
Shouldn't the instructions include such a thing? What instructions? ;) and we programmers wonder why we have such a poor reputation re: documentation of our work. :( ___ gtk-list mailing list gtk-list@gnome.org

Re: Setting up GTK+ on Windows using Mingw

2008-05-14 Thread Richard Boaz
Well, it is kinda assumed that people interested in developing GTK+-using software have a broad understanding of concepts like pkg-config, make, shell commands, environment variables PATH and PKG_CONFIG_PATH etc. For people who really don't have a clue about stuff like that, a MinGW and

Re: Setting up GTK+ on Windows using Mingw

2008-05-14 Thread Richard Boaz
On Wed, 2008-05-14 at 14:04 +0200, Richard Boaz wrote: i've said it before (many years ago now) and i'll say it again: providing a product without good documentation that will allow new users to both learn how to use it and get the job done at the same time is a product that has yet to even

problem with callback

2008-03-21 Thread Richard Boaz
you have gotten your panties into a serious twist. start over: when wanting to receive key press events in a drawing area, you must do all of the following: 1. set up the drawing area to receive key press and/or release events. 2. set up the drawing area to receive enter and leave notify

Re: Does gtk have issues with STL?

2008-02-12 Thread richard boaz
a nice discussion (with examples) of all this here: http://irrepupavel.com/documents/gtk/gtk_threads.html and, g_idle_add() is indeed thread safe. it was written that way, on purpose. there's really no mystery to a function being thread-safe or not, either it was written intended to be, or it

GDK_POINTER_MOTION_HINT_MASK has no effect

2007-12-02 Thread Richard Boaz
Stewart, Yes, all philosophies must ultimately collapse to an actual workable frame at the end of the day. Sorry for any confusion caused. In an attempt to clear this up (and hopefully not make more), you will find below a complete workable program that does nothing, really, except to

drawingSample.c - addendum

2007-12-02 Thread Richard Boaz
To be complete: 1) the configMe() and exposeMe() routines are missing 'return TRUE;' 2) main() is missing 'return 0;' though no ill-effects occur without them, in this case, anyway. richard ___ gtk-list mailing list gtk-list@gnome.org

To Draw | ! To Draw in an Expose Handler

2007-11-30 Thread Richard Boaz
splitting this out into its own thread... 2) option 2 is simply impossible to make a one-to-one calculation as to which pixels must be refreshed, programmatically. for many (perhaps even for an overwhelming majority of applications (2) works just fine. if you application

Xlib calls and Multi-Threaded Apps

2007-11-29 Thread Richard Boaz
Thought I'd add my two cents here: Expecting an X server to honor a multi-threaded request is always an iffy proposition. First, you have no guarantee that the X server you will be executing against will actually understand the call, not all versions existing in the world are up-to-date in this

Re: GDK_POINTER_MOTION_HINT_MASK has no effect

2007-11-29 Thread Richard Boaz
This is the paradigm I use in all my drawing apps that has served me well: 1) Do all drawing to one or more background pixmaps. 2) Do all drawing in routines separate from your configure handler or your expose handler. 3) Call your drawing routine(s) from the configure handler. 4)

Re: GDK_POINTER_MOTION_HINT_MASK has no effect

2007-11-29 Thread Richard Boaz
On Nov 29, 2007 1:36 PM, Paul Davis [EMAIL PROTECTED] wrote: On Thu, 2007-11-29 at 09:51 +0100, Richard Boaz wrote: This is the paradigm I use in all my drawing apps that has served me well: 1) Do all drawing to one or more background pixmaps. GTK already does

Re: GDK_POINTER_MOTION_HINT_MASK has no effect

2007-11-29 Thread Richard Boaz
Paul, Thanks for the information, it's good to learn about how GTK+ does its double buffering in detail. However... On Nov 29, 2007 5:22 PM, Paul Davis [EMAIL PROTECTED] wrote: And this particular case is wholly not addressed in code sample 1; there, you must redraw the entire

Re: GDK_POINTER_MOTION_HINT_MASK has no effect

2007-11-27 Thread richard boaz
Hi, I'm not really sure what *is_hint* is intended to provide, but anyway, what you are trying to achieve is totally possible without its use (if I understand you properly). Going on the assumption I do understand what you are trying to achieve, I am providing below some code to illustrate this.

Re: GDK_POINTER_MOTION_HINT_MASK has no effect

2007-11-27 Thread Richard Boaz
Hi, I'm not really sure what is_hint is intended to provide, but anyway, what you are trying to achieve is totally possible without its use (if I understand you properly). Going on the assumption I do understand what you are trying to achieve, I am providing below some code to illustrate this.

PNG image creation without a physical display

2007-11-15 Thread Richard Boaz
or program? Or am I missing something obvious here (which I hope)? thanks for any tips or pointers, this is really the final open question that will make the system I've been developing for the last three years (graphically, at least) complete. cheers, richard boaz

Gdk GC and Associated Colormap

2007-10-16 Thread Richard Boaz
using color, e.g. firefox, display fine on machine A.) Any pointers or advice as to how I can track this down would be appreciated. cheers, richard boaz ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: g_option_context_parse under cron execution

2007-10-03 Thread Richard Boaz
Yes, I've fully debugged the cron-executed version. All arguments are identical to when executed from the command line, i.e., are properly constructed and fully valid. I was wondering, too: Does this particular glib routine require there be a display available? Still, I would expect the error

Re: g_option_context_parse under cron execution

2007-10-03 Thread Richard Boaz
Hi John, Thanks. Going through the exercise of providing a small example, the cause of the problem became known: I had included the following call when setting up the context: g_option_context_add_group (context, gtk_get_option_group (TRUE)); as indicated in the documentation example.

  1   2   >