Text always selected in entry
Hi, GTK2: It seems that the default text in an entry is always selected when entering the field. How do I prevent that from happening. I've tried gtk_editable_select_region with start and end set to 0, but this does not help. Do someone have an idea about how I get past this problem? /Egon ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Question about GtkWidget pointer?
Hi, David Wang (Wang Xin-lu) [EMAIL PROTECTED] writes: I wrote a function to create menu: void setupMenu(GtkWidget *window, GtkWidget *menu_bar, GtkWidget *menu_vbox, GtkWidget *root_menu, GtkWidget *menu, char *labelname, gboolean boo) [...] why GtkWidget pointer can not take back value in a function? How can I do if I want to use the value initialized in a function? this question is not at all GTK+ specific. Get yourself a book about C and look for the subject call by reference / call by value. Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Immovable columns
Third attempt with this mail. There was some confusion with my email address coming out as [EMAIL PROTECTED] even though I set it to [EMAIL PROTECTED] If you get this multiple times then I apologise. --- Hi, I have a situation where I want to display data in a tree view and have the leftmost columns not scroll. e.g. I have five columns abcde with only four columns visible (abcd) pressing right on the horizontal scrollbar should scroll bcde, possibly by an entire column at a time. Giving acde visible. The rows are both affected by this and should scroll as normal. I can think of three possible means to achieve this: 1) Two tree views side by side One tree view contains the first column. The second tree view contains all other columns The horizontal scroll bar only affects the second view. The vertical scrollbar affects both view. I expect a single model should be fine for both views Does this seem plausible? Can I do this with the vertical scrollbar? 2) Sub-class the TreeView Add the ability to mark columns as fixed. The column must be either the leftmost column or right of a fixed column. Scroll left and right is then handled by re-ordering the columns. e.g. start with columns abcde with column a fixed press scroll right, columns are re-ordered to acdeb This would also achieve scrolling by a whole column at a time. This is probably the most work but might be useful to others. 3) Use GtkTable widgets instead Construct 2 GtkTable widget one for the fixed columns and one for the scrollable columns. This also requires implementing the headers separately as they don't scroll vertically but will scroll horizontally for the second table. This gives me complete control over construction but requires me to implement things I give more cheaply with a tree control. i.e. multiple views, searching, sorting, etc. Whichever option I choose I have a fair bit of work ahead. I'm early enough into the project that I can choose the least painfully route I hope. Any suggestions? James -- James Durie Phone: +44 20 7749 7904 Anvil Software LimitedFax:+44 20 7749 7916 46-48 Rivington Streete-mail: [EMAIL PROTECTED] London EC2A 3QP ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
table problem
hi all, i want to make a table in gtk,so that i can send the parameters for row and coloumns to fill data in table.. can it possible ... reply soon.. regards, vinita.. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: table problem
[EMAIL PROTECTED] wrote: i want to make a table in gtk,so that i can send the parameters for row and coloumns to fill data in table.. can it possible ... reply soon.. Hi, sure, use the table widget. http://www.gtk.org/tutorial/sec-packingusingtables.html John == Fabric of Vision Dress and Drapery in Painting 19 June - 8 September 2002 For information and tickets: http://www.nationalgallery.org.uk/exhibitions/fabric/ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Can't correctly set data to an object (button)
Hi all, Well I have toggle button to wich I attached a default string (DEFAULT) using the gtk_object_set_user_data function. In the callback toggle function I reassign this string regarding the state of the button. I pick up the new string from a gtk_entry. The problem is when I get the attached data again, is not set to the rigth value. When I toggled the button: - the printf(attached data 1 = %s\n,attached_data); shows the rigth value. - the printf(Active profile name = %s\n,profile_name); shows the rigth value too.\ - the printf(attached data 2 = %s\n,attached_data); shows an unexpected value DEFAULT Just like below attached data 1 = DEFAULT Active profile name = CUSTOM attached data 2 = DEFAULT If on the line where I set the new string ( gtk_object_set_user_data(GTK_OBJECT (button),profile_name);) I replace profile_name by a static string (i.e CUSTOM) it works. Does someone can explain what is wrong in my code ? Thank you in advance Philippe Vivarelli void on_view_profile_toggled(GtkButton *button, gpointer EditEndpointWindow) { GtkWidget *button_label = NULL; GtkWidget *profile_entry = NULL; gchar *attached_data; static gchar *profile_name; // Save the current profile entry pointer and name profile_entry = lookup_widget(EditEndpointWindow, profile_combo_entry); profile_name = gtk_entry_get_text((GtkEntry *) profile_entry); button_label = lookup_widget(EditEndpointWindow, button_label); attached_data = gtk_object_get_user_data(GTK_OBJECT (button)); printf(attached data 1 = %s\n,attached_data); if(gtk_toggle_button_get_active((GtkToggleButton *) button) == TRUE) { printf(Active profile name = %s\n,profile_name); gtk_label_set_text((GtkLabel *) button_label,View Current); gtk_entry_set_text((GtkEntry *) profile_entry, DEFAULT); gtk_object_set_user_data(GTK_OBJECT (button),profile_name); attached_data = gtk_object_get_user_data(GTK_OBJECT (button)); printf(attached data 2 = %s\n,attached_data); } else { printf(Inactive profile name = %s\n,profile_name); gtk_label_set_text((GtkLabel *) button_label,View Default); gtk_entry_set_text((GtkEntry *) profile_entry, attached_data); gtk_object_set_user_data(GTK_OBJECT (button),DEFAULT); } } ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
gtk basic question
hi there, i have a window which is in a local fn, i have 2 buttons and 2 entry fields, when i click on the button how do i get the entry field text or value i know there is a way out - without declaring the entry fields as global! but i dont know ! in glade lookup_widget --sort of~ how do i get the value or text in entry field in the button clicked signal handler? please help, thanx in advance, Simith = PA href=http://www.mcamit.8k.com;http://www.mcamit.8k.com/A PA href=http://www.dblocks.8k.com;http://www.dblocks.8k.com/Anbsp;/P __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Can't correctly set data to an object (button)
Hi, [EMAIL PROTECTED] writes: Well I have toggle button to wich I attached a default string (DEFAULT) using the gtk_object_set_user_data function. In the callback toggle function I reassign this string regarding the state of the button. I pick up the new string from a gtk_entry. you use gtk_entry_get_text() which returns a pointer to the string owned by the GtkEntry. This pointer becomes invalid as soon as the text in the entry changes. You'll want to g_strdup() it and use g_object_set_data_full() with g_free() as destroy notifier. Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Sr. GTK Systems Programmer - US - NY - New York
POSITION: Senior GTK Systems ProgrammerLOCATION: New York, NYJOB TYPE: Permanent, In-houseJOB ID #: MA32-882 DESCRIPTION: Our client, an international news and media organization, is seeking a Senior GTK Systems Programmer. Developer must have intimate familiarity with GTK and Gnome internals and implementation, and provide guidance in porting GTK to a proprietary (read: non-X) network-based windowing API, making widget construction more accessible to the average programmer, and building out a proprietary window manager API. Candidate should also be familiar with Bonobo, to provide guidance in building out a COM/CORBA-like component architecture for Bloomberg widgets. REQUIREMENTS: Minimum requirement of 5 years IT experience, 10 or more years preferred. Must have 5+ years C/C++ development experience with substantive experience with GTK internals and GTK application development. BS in Computer Science, EE, or Mathematics required. COMMENTS: This Manhattan client has an excellent reputation in the industry for treating their employees well, staying current with technology, and providing opportunities for professional growth. They are also a strong example of growth, stability, and diversity. They are, however, extremely selective and strive to hire only the best and the brightest. Therefore, you will only be considered if your qualifications include all of the required skills/experience. LOCAL CANDIDATES ONLY please. Client will only consider U.S. Citizens or Permanent Residents at this time. HOW TO APPLY: If you or anyone you know is interested in this position, please send your resume to Donna M. Carroll, CPC at [EMAIL PROTECTED]. Or, feel free to call me at 413-258-4511. Greatsuccess to everyone in all of your career endeavors! Donna M. Carroll, CPCSYSTEMS PERSONNELPreferred Member of Top Echelon Network(Agency Code: MA32)Phone: 413-258-4511Fax: 413-258-4733 E-mail: [EMAIL PROTECTED]Visit us online at: www.ITNationwide.com "Obstacles are what you see when you take your eyes off the goal."
Urgent help on expose-event under gtk-2.0 win32
Hello at all the list I have a big problem: My program use the expose-event to draw a rectangle around a widget (the code is gtk_signal_connect_after(obj, expose-event, myfunc, mydata)). All works so good under Linux (the result is like glade). But under win32 don't go. Someone can help me? Thanks Dr Hammer __ Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità . http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: table problem
i want to make a table in gtk,so that i can send the parameters for row and coloumns to fill data in table.. can it possible ... GtkTable. now go RTFM. reply soon.. i would imagine that this type of comment at the end of your mail is construed by most native english speakers as rather rude. thanks in advance is considerably more polite. --p ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
drawingarea-window question.... what is it set to?
I have noticed that drawing areas have an element called window that only gets set when drawing areas are _packed_ into a hbox or vbox. Does anyone know what drawingarea-window points too?? I have printed out addresses of various widgets to see if drawingarea-window points to them but I haven't found it yet. I need to set this address myself for various reasons. It would be nice to know what to set it to before I pack the drawing area and it gets set automatically. Thanks, Chris -- ___ Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2363 53560 Hull Street San Diego, CA 92152-5001 U.S.A. Phone: (619) 553-7940 Fax: (619) 553-2836 Email: [EMAIL PROTECTED] ___ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: drawingarea-window question.... what is it set to?
I have noticed that drawing areas have an element called window that only gets set when drawing areas are _packed_ into a hbox or vbox. Does anyone know what drawingarea-window points too?? I have printed out addresses of various widgets to see if drawingarea-window points to them but I haven't found it yet. I need to set this address myself for various reasons. It would be nice to know what to set it to before I pack the drawing area and it gets set automatically. you can't set it. its a GdkWindow and its the one that the drawing area uses for rendering. all GtkWidget's have this pointer, and they all use it for the same thing, more or less. --p ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
What is parent of a widget like drawingarea set to?
I just tried to do gtk_widget_realize(myDrawingArea) and GTK+ complained about the parent of this widget not being set. *What is the parent of widget set to*? Chris -- ___ Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2363 53560 Hull Street San Diego, CA 92152-5001 U.S.A. Phone: (619) 553-7940 Fax: (619) 553-2836 Email: [EMAIL PROTECTED] ___ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: drawingarea-window question.... what is it set to?
Paul If one really wanted to set this GdkWindow for some drawingarea I found a way to do it!!! See this little known gem gtk_widget_realize(). (e.g. gtk_widget_realize(myDrawingArea); ) When I ran this function it gave me a warning about the parent not being set. Do you know what the parent of a widget is set to? If I can set the parent myself and call gtk_widget_realize then I think I may accomplish my madness. Sincerely, Chris On Wed, Jul 31, 2002 at 08:48:18PM -0400, Paul Davis wrote: I have noticed that drawing areas have an element called window that only gets set when drawing areas are _packed_ into a hbox or vbox. Does anyone know what drawingarea-window points too?? I have printed out addresses of various widgets to see if drawingarea-window points to them but I haven't found it yet. I need to set this address myself for various reasons. It would be nice to know what to set it to before I pack the drawing area and it gets set automatically. you can't set it. its a GdkWindow and its the one that the drawing area uses for rendering. all GtkWidget's have this pointer, and they all use it for the same thing, more or less. --p ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list -- ___ Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2363 53560 Hull Street San Diego, CA 92152-5001 U.S.A. Phone: (619) 553-7940 Fax: (619) 553-2836 Email: [EMAIL PROTECTED] ___ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Compilation ERROR..Please Help
I am trying to compile hello world prg.But its giving the error-gtk/gtk.h :No such file or directory Regards, Ajay __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: help on RGB to jpeg
simith nambiar wrote: hi does anyone know of a library for converting RGB24 data into jpeg for Linux. Look up jpeglib. can that be done using gtk only ? If you want to have a look at how the GIMP does it, the file you're looking for in the source tree is plug-ins/common/jpeg.c - you cxan ignore all the plug-in stuff, and go straight to the function save_image and it's children. Since GimpImages are either grey, greya, rgb or rgba, you should find what you're looking for there. Cheers, Dave. -- David Neary, Marseille, France E-Mail: [EMAIL PROTECTED] ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Immovable columns
Hi, I have a situation where I want to display data in a tree view and have the leftmost columns not scroll. e.g. I have five columns abcde with only four columns visible (abcd) pressing right on the horizontal scrollbar should scroll bcde, possibly by an entire column at a time. Giving acde visible. The rows are both affected by this and should scroll as normal. I can think of three possible means to achieve this: 1) Two tree views side by side One tree view contains the first column. The second tree view contains all other columns The horizontal scroll bar only affects the second view. The vertical scrollbar affects both view. I expect a single model should be fine for both views Does this seem plausible? Can I do this with the vertical scrollbar? 2) Sub-class the TreeView Add the ability to mark columns as fixed. The column must be either the leftmost column or right of a fixed column. Scroll left and right is then handled by re-ordering the columns. e.g. start with columns abcde with column a fixed press scroll right, columns are re-ordered to acdeb This would also achieve scrolling by a whole column at a time. This is probably the most work but might be useful to others. 3) Use GtkTable widgets instead Construct 2 GtkTable widget one for the fixed columns and one for the scrollable columns. This also requires implementing the headers separately as they don't scroll vertically but will scroll horizontally for the second table. This gives me complete control over construction but requires me to implement things I give more cheaply with a tree control. i.e. multiple views, searching, sorting, etc. Whichever option I choose I have a fair bit of work ahead. I'm early enough into the project that I can choose the least painfully route I hope. Any suggestions? James -- James Durie Phone: +44 20 7749 7904 Anvil Software LimitedFax:+44 20 7749 7916 46-48 Rivington Streete-mail: [EMAIL PROTECTED] London EC2A 3QP ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
treeview and forcing an edit on a cell
Hello All, I need to begin an edit on a cell in a treeview from a callback and don't see a way to do it. Does any one know of an example of this? Steve ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Can't correctly set data to an object (button)
Hi all, Well I have toggle button to wich I attached a default string (DEFAULT) using the gtk_object_set_user_data function. In the callback toggle function I reassign this string regarding the state of the button. I pick up the new string from a gtk_entry. The problem is when I get the attached data again, is not set to the rigth value. When I toggled the button: - the printf(attached data 1 = %s\n,attached_data); shows the rigth value. - the printf(Active profile name = %s\n,profile_name); shows the rigth value too.\ - the printf(attached data 2 = %s\n,attached_data); shows an unexpected value DEFAULT Just like below attached data 1 = DEFAULT Active profile name = CUSTOM attached data 2 = DEFAULT If on the line where I set the new string ( gtk_object_set_user_data(GTK_OBJECT (button),profile_name);) I replace profile_name by a static string (i.e CUSTOM) it works. Does someone can explain what is wrong in my code ? Thank you in advance Philippe Vivarelli void on_view_profile_toggled(GtkButton *button, gpointer EditEndpointWindow) { GtkWidget *button_label = NULL; GtkWidget *profile_entry = NULL; gchar *attached_data; static gchar *profile_name; // Save the current profile entry pointer and name profile_entry = lookup_widget(EditEndpointWindow, profile_combo_entry); profile_name = gtk_entry_get_text((GtkEntry *) profile_entry); button_label = lookup_widget(EditEndpointWindow, button_label); attached_data = gtk_object_get_user_data(GTK_OBJECT (button)); printf(attached data 1 = %s\n,attached_data); if(gtk_toggle_button_get_active((GtkToggleButton *) button) == TRUE) { printf(Active profile name = %s\n,profile_name); gtk_label_set_text((GtkLabel *) button_label,View Current); gtk_entry_set_text((GtkEntry *) profile_entry, DEFAULT); gtk_object_set_user_data(GTK_OBJECT (button),profile_name); attached_data = gtk_object_get_user_data(GTK_OBJECT (button)); printf(attached data 2 = %s\n,attached_data); } else { printf(Inactive profile name = %s\n,profile_name); gtk_label_set_text((GtkLabel *) button_label,View Default); gtk_entry_set_text((GtkEntry *) profile_entry, attached_data); gtk_object_set_user_data(GTK_OBJECT (button),DEFAULT); } } ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Adding Input Method for Vietnamese
Hello The input method system in Gtk+ 2.0 is very useful, especially for Vietnamese. However, VIQR input method is not easy to type. There are two other Vietnamese input methods, which are popular in Vietnam. I want to implement those in Gtk+ Could anyone give me some clue? (I tried to modify imviqr.c and failed) BTW, if i make a new input method, may i put it into Gtk+ or make a separate package? Thanks -- ._ _ | _ _| _ |_)(_ |(_)|_|(_|_ | ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Initial size of GtkDrawingArea or GtkScrolledWindow
How can I set an initial / default size for a GtkDrawingArea or a GtkScrolledWindow? gtk_widget_set_usize() sort of works, but then the user can't make the window smaller than the initial size. (I'm using gtk+ 1.2.) Thanks. Sal ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Urgent help on expose-event under gtk-2.0 win32
Hi, What are you using to trigger the expose event? I've seen some situations on win32 where queue_draw() needed to be called (but not in the same script on *nix). - Original Message - From: Matteo Frigerio [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 3:33 PM Subject: Urgent help on expose-event under gtk-2.0 win32 Hello at all the list I have a big problem: My program use the expose-event to draw a rectangle around a widget (the code is gtk_signal_connect_after(obj, expose-event, myfunc, mydata)). All works so good under Linux (the result is like glade). But under win32 don't go. Someone can help me? Thanks Dr Hammer __ Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità . http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: drawingarea-window question.... what is it set to?
Paul If one really wanted to set this GdkWindow for some drawingarea I found a way to do it!!! See this little known gem gtk_widget_realize(). (e.g. gtk_widget_realize(myDrawingArea); ) When I ran this function it gave me a warning about the parent not being set. Do you know what the parent of a widget is set to? If I can set the parent myself and call gtk_widget_realize then I think I may accomplish my madness. no, you will remain mad :) the parent is set when you add the widget (in this case a drawing area) to a container. i'm suprised that realize() requires it to be set, but then i'm suprised all the time. --p ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: table problem
hi i want to write text in tabular formso can this gtk-table be used for this purpose please help if anybody knows the answer. THANKS IN ADVANCE ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
does there exist a graph widget say to do math plots in GTK+?
I wrote code in expose handler to draw and update 4 scientific graphs in GTK+ I am getting bogged down in calculating positions and sizes of ticks, borders, axes labels, etc. Surely there must be a graph widget to escape all this low level tediousness in GTK+? Chris -- ___ Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2363 53560 Hull Street San Diego, CA 92152-5001 U.S.A. Phone: (619) 553-7940 Fax: (619) 553-2836 Email: [EMAIL PROTECTED] ___ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: does there exist a graph widget say to do math plots in GTK+?
I wrote code in expose handler to draw and update 4 scientific graphs in GTK+ I am getting bogged down in calculating positions and sizes of ticks, borders, axes labels, etc. Surely there must be a graph widget to escape all this low level tediousness in GTK+? Yes, there are a few plotting and graphing widgets in GtkExtra. There is also a GtkGraph (or something like that) widget which automatically plots graphs from data. Hope this helps. Rgds, Biswa. Chris -- ___ Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2363 53560 Hull Street San Diego, CA 92152-5001 U.S.A. Phone: (619) 553-7940 Fax: (619) 553-2836 Email: [EMAIL PROTECTED] ___ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list