Re: gtk thread begginer

2005-02-17 Thread Iago Rubio
On Thu, 2005-02-17 at 00:05, Boris Winter wrote: > do somebody can sand an simple example how to use gtk threads? > how can i application like counter? I don't completly understand what you say here, and what's the "counter" application you want to implement. I you'd narrow a bit your question, m

Re: gtk thread begginer

2005-02-17 Thread Pablo
This can help i hope: http://mail.gnome.org/archives/gtk-app-devel-list/2005-February/msg00083.html - Original Message - From: "Boris Winter" <[EMAIL PROTECTED]> To: Sent: Wednesday, February 16, 2005 8:05 PM Subject: gtk thread begginer > do somebody can sand an simple example how t

RE: RE: gtk thread begginer

2005-02-17 Thread Boris Winter
my app is and it counts only to 3 and not to 999. how can i do this? thanks.: #include #include #include GtkWidget *window; GtkWidget *poruka; GtkWidget *kredit; void izrada_prozora(){ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "ALLs JukeBOX 3"); gtk_co

http://www.gtk.org/tutorial/sec-anupgradedhelloworld.html

2005-02-17 Thread Gert Cuykens
static void callback( GtkWidget *widget, gpointer data ){ g_print ("Hello again - %s was pressed\n", (gchar *) data); } why do they put () around gchar ? why can it not be gchar *data ? What does %s do ? Are gpointer and gchar global variables of gtk ? Are gpointer and gchar data types or o

Re: http://www.gtk.org/tutorial/sec-anupgradedhelloworld.html

2005-02-17 Thread Hubert Sokołowski
On Thu, 17 Feb 2005 13:05:43 +0100 Gert Cuykens <[EMAIL PROTECTED]> wrote: > static void callback( GtkWidget *widget, gpointer data ){ > g_print ("Hello again - %s was pressed\n", (gchar *) data); > } > > why do they put () around gchar ? > why can it not be gchar *data ? > > What does %s

Re: http://www.gtk.org/tutorial/sec-anupgradedhelloworld.html

2005-02-17 Thread Keith Sharp
On Thu, 2005-02-17 at 13:05 +0100, Gert Cuykens wrote: > static void callback( GtkWidget *widget, gpointer data ){ > g_print ("Hello again - %s was pressed\n", (gchar *) data); > } > > why do they put () around gchar ? > why can it not be gchar *data ? gpointer is a void pointer and the cal

Re: http://www.gtk.org/tutorial/sec-anupgradedhelloworld.html

2005-02-17 Thread Claudio Bley
On Thu, Feb 17, 2005 at 01:05:43PM +0100, Gert Cuykens wrote: > static void callback( GtkWidget *widget, gpointer data ){ > g_print ("Hello again - %s was pressed\n", (gchar *) data); > } > > why do they put () around gchar ? In C, it's called a cast. > why can it not be gchar *data ? Bec

intercepting WM destroy signal

2005-02-17 Thread marcodev
In the GUI I'm developing I'd like to be able to save window information like size and placement when the user exits the application. I have connected the top level window to the destroy signal and placed the above mentioned functionality into the callback so it looks something like this: void

Re: http://www.gtk.org/tutorial/sec-anupgradedhelloworld.html

2005-02-17 Thread Leandro A. F. Pereira
On Thu, 2005-02-17 at 13:17 +0100, Hubert SokoÅowski wrote: >You should learn some more about programming in C before you start >writing GTK apps. Or consider using something else, such as Python. Leandro ___ gtk-app-devel-list mailing list gt

Re: intercepting WM destroy signal

2005-02-17 Thread David Necas (Yeti)
On Thu, Feb 17, 2005 at 03:16:44PM +, [EMAIL PROTECTED] wrote: > In the GUI I'm developing I'd like to be able to save window information like > size and placement when the user exits the application. I have connected the > top level window to the destroy signal and placed the above mentioned

Advice about gtk+2.4.x or gtk+2.6.x

2005-02-17 Thread Antonio Gomes
Hello all ... I think someone can advice me about what choice is the best for my situation ... How can I use use in my gtk+2.4.10 application a custom button that is available only by gtk+2.6.X ? This widget is called "", and it's a custon button that has a combo to provide more than one functiona

Re: Advice about gtk+2.4.x or gtk+2.6.x

2005-02-17 Thread Antonio Gomes
Sorry ... The widget's name is "gtkmenutoolbutton" ... and I have the gtkmenutoolbutton.cpp and gtkmenutoolbutton.h "in hands" ... On Thu, 17 Feb 2005 13:54:25 -0400, Antonio Gomes <[EMAIL PROTECTED]> wrote: > Hello all ... > > I think someone can advice me about what choice is the best for m

Why this simple threat program dont work properly?

2005-02-17 Thread Boris Winter
please help ?? #include #include GtkWidget *window; GtkWidget *poruka; GtkWidget *label; void *argument_thread(void *args){ unsigned long int b=0; char a[10]; for(b;b<1;b++){ sprintf(a, "%u", b); gtk_label_set(GTK_LABEL (label), a); g_usleep(100); } } int main(int argc, char *argv[]){ g

Re: Advice about gtk+2.4.x or gtk+2.6.x

2005-02-17 Thread Matt Jarjoura
Do what Mac OS X developers do. Apple updates Cocoa/Carbon with every release leaving all the new features only for the most current OS. use gmodule api to weak link to the function in the library and call it based on the running gtk+ library installed on the users machine. Then if they have tha

gtk timer

2005-02-17 Thread ALLs soft
I must run an function every 1000ms. I'm test with thread but then program stop responding or freeze. I need something like timer in visual basic. Do somebody can halp me or show some short example? thx. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Vir

Re: gtk timer

2005-02-17 Thread Matt Jarjoura
as long as you have a glib or gtk run loop going, you can create a "timer" using g_timeout_add() -Matt On Fri, 18 Feb 2005 01:20:16 +0100, ALLs soft <[EMAIL PROTECTED]> wrote: > I must run an function every 1000ms. I'm test with thread but then > program stop responding or freeze. > I need some

Re: gtk thread begginer

2005-02-17 Thread Stefan Kost
Hi Boris, beause inside the thread you need to do: gdk_threads_enter(); gtk_label_set(GTK_LABEL (kredit), a); gdk_threads_leave(); my app is and it counts only to 3 and not to 999. how can i do this? thanks.: #include #include #include GtkWidget *window; GtkWidget *poruka; GtkWidget *kredit; void

Re: Why this simple threat program dont work properly?

2005-02-17 Thread Iago Rubio
On Thu, 2005-02-17 at 23:02, Boris Winter wrote: > please help ?? Please read the answers to your previuos messages. Stefan Kost have answered you in the previously opened thread. [quoted from="Stefan Kost"] Hi Boris, because inside the thread you need to do: gdk_threads_enter(); gtk_label_set