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/

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 Shift

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 t

Re: Gtk3 portability

2017-02-11 Thread richard boaz
t really work for desktop applications as well > as they work for server applications. > > An attempt at containerisation is Flatpak, which follows the Open > Container Initiative like Docker, but it's aimed at desktop > applications. > > Ciao, > Emmanuele. > >

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 at

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 is

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 mouse inside a window co

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 is

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

Re: GTK3 Frame Border - Bug #659926

2015-09-10 Thread richard boaz
ntrol i prefer, even 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 wrote: > Hi; > > On 10 September 2015 at 16:08, richard boaz wrote: > > thanks for the explanation and path forward. > >

Re: GTK3 Frame Border - Bug #659926

2015-09-10 Thread richard boaz
Bassi wrote: > Hi; > > On 10 September 2015 at 15:06, richard boaz 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 >> theme. >> > > The WM is not involved

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 whateve

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 a

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 the

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 wrote: > To be more precise (I was on my phone earlier)… > > On 22 July 2015 at 23:09, richard boaz wrote: > > > g_signal_connect(topWindow, &qu

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 fine

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 wrote: > On Thu, 4 Jun 2015 17:53:22 -0400 > Paul Davis wrote: > > > You are the person who began their first post on the bug with "I > > realize that GTK development is

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 wrote: > Hello. > > I'm about to start working on a new GTK+ application that will be > written in C. I want to

Re: g_idle_add() clarification

2015-01-20 Thread richard boaz
r level than the gtk > window and thus the StartScan_active() would exit before the mainloop would > add Scanning() and then only execute Scanning() when nothing else (signals) > was active. > > I was also asking about the GLib-CRITICAL stuff on exiting Scanning(). > Ian. > >

Re: g_idle_add() clarification

2015-01-20 Thread richard boaz
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 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" > > void on_StartScan_activate()

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 wrote: > Hello all, > > I am wondering about the rate at which pointer motion events are > generated. In

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 r

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 wid

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 > >> let's step back one second. >> >> your description implies that it is not possible for

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 hap

Re: Re-attaching tab to notebook via "close" event

2013-07-12 Thread richard boaz
rent), then detach again I am unable to re-parent. > > > On Fri, Jul 12, 2013 at 12:35 AM, richard boaz wrote: > >> hi, >> >> connect a callback to the "delete-event" associated with the new window. >> you are keeping track of which tabs are where at an

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 que

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 wrote: > Thanks so much for the advice, but it w

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 go

Re: glib: processing events in multiple threads

2013-04-30 Thread richard boaz
On Tue, Apr 30, 2013 at 12:01 PM, Patrick Ohly wrote: > On Tue, 2013-04-30 at 10:44 +0100, jcup...@gmail.com wrote: > > You can do this very simple and reliably. For example: > > > > worker() > > { > > char *str; > > > > for(;;) { > > str = g_strdup("hello world!\n"); > > g_idle_add(fr

Re: glib: processing events in multiple threads

2013-04-30 Thread richard boaz
On Tue, Apr 30, 2013 at 11:59 AM, Patrick Ohly wrote: > 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

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 progr

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 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: > ... > 2) configu

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_ad

Re: allocating mem using glib

2012-09-02 Thread richard boaz
uld be the way to go. r- On Sun, Sep 2, 2012 at 11:02 AM, Jasper St. Pierre wrote: > On Sun, Sep 2, 2012 at 5:00 AM, richard boaz wrote: > > a few things of note: > > > > you're printing the elements after you free the memory, that's not gonna > > work >

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 itse

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

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 fo

Re: App on MAC - and Pango

2011-11-27 Thread richard boaz
On Sun, Nov 27, 2011 at 12:31 AM, Paul Davis wrote: > On Fri, Nov 25, 2011 at 4:08 AM, richard boaz 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 > &g

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 us

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 wrote: > 2011/7/25 richard boaz : > > > 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, this

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 use/referenc

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
gt; > On 19 July 2011 13:04, richard boaz 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 gt

Re: Confirm Installed Run-Time Version

2011-07-19 Thread richard boaz
GTK_MINOR_VER_MIN, GTK_MICRO_VER_MIN); printf("%s\n", (verCheck ? FAILURE : SUCCESS)); return 0; } == VERSION CHECK END On Mon, Jul 18, 2011 at 11:05 PM, wrote: > Hi Richard, > > On Monday, 18 July 2011, richard boaz wrote: >

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, 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 wrote: > Hello richard, > > > Wednesday, June 1,

Re: Compiling a GTK application on windows

2011-05-31 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 thread

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

Re: GtkComboBox

2011-04-26 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 > Hello, > > It seems to me that it is impossible to know the item count in a combobox > declared with gtk_combo_box_new_text.

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 wrote: > Hi, David, > > 2011/4/8 David Nečas : > > On Fri, Apr 08, 2011 at 10:30:32AM -0700, Igor Korot wrote: > >> $ ./ G_DEBUG=fatal-warnings > >> > >>

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 wrote: > i do this just fine. but you must do the recursi

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 fu

Re: Status for long-running operation

2010-09-19 Thread richard boaz
On Sun, Sep 19, 2010 at 8:33 PM, Paul Davis wrote: > On Sat, Sep 18, 2010 at 3:24 AM, richard boaz 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, not widgets. th

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 sa

Re: g_strcmp0

2010-09-01 Thread richard boaz
2010/9/1 David Nečas > 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 other) functions,

Re: GIOChannel & Intercepting stdout

2010-08-26 Thread richard boaz
On Thu, Aug 26, 2010 at 11:01 AM, Hrvoje Niksic wrote: > > 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 than it sounds.

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 h

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

Re: GThreads and GThreadPool help for a dummy

2010-07-24 Thread richard boaz
at a time, 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 ri

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

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 mus

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 wrote: > Hi list, > I know when I change the widget's size,it will emit the > "configure_event",so the fun

Re: Question About Hash

2010-04-09 Thread richard boaz
le_insert(table_3, GUINT_TO_POINTER(key_3), value); > > } > func3() > { > ... > g_hash_table_foreach_remove(table_3, NULL, NULL); > g_hash_table_destroy(table_3); > ... > } > > > > 2010/4/9 richard boaz > > show your code, without it your comment is an

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

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

2010-04-03 Thread richard boaz
these functions? > > Or, is there some other way to synthesize events? > > Ken > > > --- On *Thu, 1/4/10, richard boaz * wrote: > > > From: richard boaz > > Subject: Re: How to move focus to another window by program? > To: "Ken Resander" > Date: Thurs

Re: How to change the height of the top window from a program?

2010-03-27 Thread richard boaz
i would think about embedding the dialog window you want at the bottom within the top window itself. hiding and unhiding then, you can easily achieve the effect you want. that is, unless the dialog *must* be its own separate top window. is this true? on the other hand, try using gtk_window_resi

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 wrote: > Please, > > Can anyone help me? > > 2

Re: how to leave a specific thread?

2009-07-11 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. t

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

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

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 selec

Re: Question about Threads y gtk+

2008-10-03 Thread Richard Boaz
Inexplicably (read: I don't know), there is no glib equivalent for the function pthread_kill(). Not sure why, perhaps the glib gurus could elaborate on why it is not possible to externally kill a thread a la pthread_kill()? Or is there some equivalent I have not found? Assuming there is no glib

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 a

Re: gtk_print

2008-08-28 Thread Richard Boaz
> On Fri, 22 Aug 2008 13:40:20 +0200 (CEST) > > > "Richard Boaz" <[EMAIL PROTECTED]> wrote: > > > [snip] > > > > [ ... snip snip snip ... ] > > > > this sounds like a disaster of an API. > > > > most other GTK/GDK AP

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

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 the

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

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 http://mail.gnome.org/mailman/list

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

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 MSY

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

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 w

Re: Compilation of gtkmain.c file

2008-01-07 Thread Richard Boaz
Your problem description indicates very strongly that this is perhaps an initial foray into GUI programming. Before jumping into the deep-end of event-driven GUI interfaces, there is one very important design consideration of which you should be aware. GUI design and programming basically comes d

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 http://mail.

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 demonstrat

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 applicati

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

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

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)

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 r

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

  1   2   >