Re: How to get the widget's size before it has been shown?

2008-09-03 Thread G Hasse
On Wed, Sep 03, 2008 at 06:30:25PM +0800, Lazy Fox wrote: > /* How to get the widget's size before it has been shown? > * > * There are two "printf" statements below. I want to get the widget's > size at the first printf. > * How to do this? > */ > #include > > int main( int argc, char *arg

Re: quarks

2008-09-02 Thread G Hasse
On Mon, Sep 01, 2008 at 02:20:35AM -0300, Martin (OpenGeoMap) wrote: > > hi!, > > > Someone knows like quarks works in glib. I suppose quarks is a pun on "atoms" that is so often used as a lingo for som small item. Like atoms in X. > > I can not find the source code, only the header. It??

Re: Forking from Gtk - Problem solved!

2008-07-09 Thread G Hasse
On Tue, Jul 08, 2008 at 08:59:45PM -0400, James Scott Jr wrote: > > On Tue, 2008-07-08 at 23:23 +0200, G Hasse wrote: > > On Tue, Jul 08, 2008 at 01:52:00PM -0400, James Scott Jr wrote: > > > G, > > > > > > I've seen most of the other responses, and

Re: Forking from Gtk

2008-07-08 Thread G Hasse
On Tue, Jul 08, 2008 at 10:17:53AM +0200, Gabriele Greco wrote: > On Mon, Jul 7, 2008 at 11:03 PM, G Hasse <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > I have a small demo app. This works on FreeBSD but I can't > > get to work on Linux. I know that i

Re: Forking from Gtk

2008-07-08 Thread G Hasse
T interact with X that > placing the multi-thread restriction. There are elegant work-arounds > this issue. > > Here is a link to the classic FAQ answer on Multi-threaded GTK programs: > http://library.gnome.org/devel/gtk-faq/stable/x482.html > > Regards, > James, Tanks fo

Forking from Gtk

2008-07-07 Thread G Hasse
Hello, I have a small demo app. This works on FreeBSD but I can't get to work on Linux. I know that in Linux setsid will fail if the child has the same session_id as the parent. So on Linux you must fork twice. But it also seems that the parent must do an exit. And I don't want that. The code is n

Re: Code for placing a XML dock in a GtkTree?

2008-06-18 Thread G Hasse
you > will not regret going with Expat. > > Carlos > >G Hasse wrote: > >| Hello, > >| > >| To place an XML document in a GtkTree must be a fairly common > >| stuff to do. Can anyone point me to some examples or code I would > >| be happy. >

Re: Gtk performance

2008-06-12 Thread G Hasse
On Wed, Jun 11, 2008 at 09:49:46PM +0200, Gian Mario Tagliaretti wrote: > On Wed, Jun 11, 2008 at 6:30 PM, Gerardo Di Iorio > <[EMAIL PROTECTED]> wrote: > > >> You must ask yourself - comparing to what? > >> > >> Java? > >> QT? > > > > comparing to QT. > > As Tor already pointed out, if you have

Code for placing a XML dock in a GtkTree?

2008-06-10 Thread G Hasse
Hello, To place an XML document in a GtkTree must be a fairly common stuff to do. Can anyone point me to some examples or code I would be happy. -- Göran Hasse Göran Hasse email: [EMAIL PROTECTED] Tel: 019-450105 Radite

Re: Recalculation of timeouts with g_timeout_add

2008-05-16 Thread G Hasse
Let your callback return FALSE and reregister before the return #include #include #include #include #include gboolean callback (gpointer data) { int seconds = 0; struct tm *mytm; time_t mytime; mytime = time( NULL ); mytm = gmtime( &mytime ); printf("Called :"); printf(

Re: Query about handling OS signals

2008-04-10 Thread G Hasse
On Thu, Apr 10, 2008 at 09:12:21AM +0100, John M Collins wrote: > I have spent most of a day looking at the various documents about > emitting signals and articles here without finding the answers to the > questions - sorry if they seem stupid as I'm a comparative newcomer to > GTK. > > I am conve

Re: identify unused functions?

2008-03-30 Thread G Hasse
On Sun, Mar 30, 2008 at 10:25:05PM +0300, Stefan Kost wrote: > Hi, Undefined and unused is not the same. There is NO way to clerify all unused functions in a program. You could call functions by their addresses and those addresses could be calculated in runtime. So you don't know... Something li

Re: Quitting an application

2008-03-30 Thread G Hasse
On Thu, Mar 27, 2008 at 08:01:40PM +0530, Sujith wrote: > Hi, > > I am writing a music library manager and I have a small problem when > terminating the application. > On starting the app, I scan a DB and load the tracks into a treeview. > When this is in progress, if the user closes the applicat

Re: Add a button to the about dialog

2008-03-18 Thread G Hasse
On Fri, Mar 14, 2008 at 06:23:50PM +0100, Daniel Leidert wrote: > Hi, > > I would like to add some information to the About dialog of an > application. The About-dialog is created using gtk_show_about_dialog(). The About dialog is a very simple widget that is often used and threrefor made as a s

Re: app/window deactivation handling

2008-03-18 Thread G Hasse
On Wed, Mar 12, 2008 at 03:37:23PM -0700, Steve Splonskowski wrote: > Sorry for the loose terminology (thankfully I am not from the Windows > world!). > > I mean when the application looses focus (and is still running). Then there is no problem at all. When a Window lose focus you just register

Re: app/window deactivation handling

2008-03-18 Thread G Hasse
On Wed, Mar 12, 2008 at 03:20:15PM -0700, Steve Splonskowski wrote: > Hello, > > In an app we are working on we have some things that need to be done > when the app (or window since we only have one main window) is > deactivated. That is when the use switches to another application we > want

Re: Basic Differences

2008-03-18 Thread G Hasse
On Wed, Mar 12, 2008 at 03:24:03PM +0530, Aswathy Prasad wrote: > Hi > > > >Is there any basic difference between GTK+, Qt and Motif? Yes a lot! (As expected). Motif only runs att Unix:es (Look att openmotif). It has a small widgetset and are quite akward to work with. Qt has a "precompi

Train application

2008-02-13 Thread G Hasse
Hello, Some hints for your application... Keep the GUI separeded from the application. As I see it you have to small number of widgets to gain anyting from a pure object oriented design. I usally keep all widgets in one file(s), all callbacks to manipulate widgets in one file(s), and the program

Re: how the change the shape and color of Gtk Button

2008-01-04 Thread G Hasse
On Fri, Jan 04, 2008 at 07:36:40PM +0530, Ajax John wrote: > Hi All, > > I'm new to Gtk app. develoment. and trying to develop small applications. > I have 2 queries. > 1)By default the shape of GtkButton is rectangle. > I want to change it's shape to some other shape, say round rectangle. > How t

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread G Hasse
On Tue, Dec 18, 2007 at 07:05:18PM -0500, Michael McCann wrote: > Tomas Carnecky wrote: > > Michael McCann wrote: > >> Michael R. Head wrote: > >>> On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote: > >>> > I assume you meant > > g_threads_init(); > gdk_threads_

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread G Hasse
On Tue, Dec 18, 2007 at 04:45:50PM -0500, Michael McCann wrote: > I've got a multithreaded GTK application. One thread runs gtk_main(): > > gtk_threads_enter(); > gtk_main(); > gtk_threads_leave(); > > > The other thread is an infinite loop that sleeps for one second on each > loop. Every x seco

Re: App blueprint, advice please!

2007-12-16 Thread G Hasse
On Sun, Dec 16, 2007 at 08:57:01PM +0100, Dan H wrote: > On Sun, 16 Dec 2007 12:47:44 -0500 > Patrick <[EMAIL PROTECTED]> wrote: > > > With so many aspects to this does anyone think that using Bash > > would be useful? For example if we designed all the smaller > > programs to read and write from

Re: GtkScale GtkHScale with multiple sliders and values?

2007-09-05 Thread G Hasse
Hello, You could also look at http://www.raditex.se/~gh/TestHandleBar.gif The source is at http://www.raditex.se/~gh/HandleBar.tar In this widget you can move the left, right and slide the bar to move the center. -- Göran Hasse --

Re: serial ports

2007-05-14 Thread G Hasse
On Tue, May 15, 2007 at 02:46:22AM +0300, Tor Lillqvist wrote: > John Coppens writes: > > If I'm not mistaken (I don't use windows), look at the g_io functions, I > > believe they are portable to Windows too. There may be a problem with the > > names of the devices (COM1: vs /dev/ttyS0) or so, b

Re: About modal dialog windows

2007-05-01 Thread G Hasse
On Wed, May 02, 2007 at 08:40:42AM +0200, Marco Randazzo wrote: > My question in about the differences of behaviour between the modal windows Please don't use modal dialog boxes. They tend to upset the users... Very often the user configure the window manager so that modal boxes/windows need a cu

Re: Verifying input data before gtk_dialog_run returns

2007-03-21 Thread G Hasse
Hello, What you should do is void enter_callback(GtkWidget *widget, GtkWidget *entry) { gchar *entry_text = NULL; entry_text = gtk_entry_get_text(GTK_ENTRY(entry)); // Check to se what the entry contains... printf("the entry: %s\n", entry_text); } main() { entry = gtk_

To use --geometry in a Gtk application

2007-02-22 Thread G Hasse
Hello! I have panel PC without a window manager. I want to position the windows with -geometry 100x100+200+200 something. I have not found any way to do this. Funny though the option --display=XXX.XXX.XXX.XXX:0.0 does work. Accodingly one might try --geometry=100x100+200+200 but this does not w