RE: Current status of GtkPlug/GtkSocket and plans for the future

2009-08-18 Thread Vallone, Anthony
I am using GtkPlug/GtkSocket on a large space system program. It turned out to be incredibly useful to us. We have a docked window at the top of the screen that displays a summary of system status. This docked window has four GtkSockets that are plugged by four other applications. Doing it this

RE: Memory leaks

2009-07-13 Thread Vallone, Anthony
BTW, if anyone has a better way of tracing memleaks in glib/gtk based apps, without valgrind or using it in another way, steps are welcome! Here is some info on purify that someone may find useful: I have been using Purify for a few years to test gtk apps. Purify also gets very

RE: Memory leaks

2009-07-13 Thread Vallone, Anthony
I created a simple gtk app that uses all the widgets and functions that we use across our many GUIs.  I ran that app with purify, and created a suppression file to suppress all of the reported errors from this simple app.  I use that same suppression file when running the production GUIs, so

RE: Cache/Save parsed Gtk Builder file?

2009-05-04 Thread Vallone, Anthony
I'll never understand why Glade removed the code gen capability when it went from Glade2 to Glade3. Most of the time, the XML UI definition is best, but not in cases like yours. If startup performance is vital, I recommend manually coding via the widget API. However, a good portion of your

RE: GTK dialog which should not be draggable (ie; floating)

2009-04-29 Thread Vallone, Anthony
Removing the decoration is the only reliable way: http://library.gnome.org/devel/gtk/stable/GtkWindow.html#gtk-window-set- decorated -Anthony Vallone ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Maximized window that's not full screen

2009-04-13 Thread Vallone, Anthony
I am trying to create a window that has an absolute max size. By setting the max size via gtk_window_set_geometry_hints, my window's max size is obeyed when the user drags the edge of the window to resize. However, when the user clicks the Maximize Window button on the window decoration, the

RE: Changing Text Color for GTK_ENTRY Widgets

2009-02-26 Thread Vallone, Anthony
Here is a non-pango way: GdkColor color; color.red = 65535; color.green = 0; color.blue = 0; gtk_widget_modify_text(entry, GTK_STATE_NORMAL, color); See http://library.gnome.org/devel/gtk/stable/gtk-question-index.html -Anthony From: gtk-list-boun...@gnome.org

RE: GtkWindow title bar

2008-12-02 Thread Vallone, Anthony
That is controlled by the window manager's theme, not GTK+. However, if you want to do extra work, you can call gtk_window_set_decorated(window,false) and design your own window title/border. -Anthony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

RE: Multi-thread problem

2008-09-23 Thread Vallone, Anthony
gdk_threads_enter/leave doesn't work in all cases. Use g_idle_add in your worker thread to add a callback for your gtk main thread. -Anthony Vallone -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Moller Sent: Tuesday, September 23, 2008 4:52 PM

RE: Large GTK Application design tips

2008-09-11 Thread Vallone, Anthony
Hi Paul, I led a very large government project using GTK+ and C++ with great success. I don't know of any docs on the subject, but here are the top three tips that I had to learn the hard way: 1. GTK+ is not thread safe, and the gdk_threads_enter/gdk_threads_leave calls don't

RE: Large GTK Application design tips

2008-09-11 Thread Vallone, Anthony
: Thursday, September 11, 2008 6:28 PM To: Vallone, Anthony; gtk-list@gnome.org Subject: RE: Large GTK Application design tips Hi, Thanks, great advice! Using glade is an interesting idea I hadn't considered since this is for an embedded product. Anyone have experience using it on an embedded

RE: Using g_signal_connect in class

2008-07-21 Thread Vallone, Anthony
/mixing.html -Anthony Vallone -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Vine Sent: Saturday, July 19, 2008 4:51 PM To: Milosz Derezynski Cc: gtk-list@gnome.org; Vallone, Anthony Subject: Re: Using g_signal_connect in class On Sat, 19 Jul 2008 16:40:17

RE: Using g_signal_connect in class

2008-07-15 Thread Vallone, Anthony
Only if the member function is static. Calling a non-static member function requires two addresses: the instance address and the function address. Whether its public or private doesn't matter because access to function pointers is not checked by compilers. I frequently do something like this:

GtkTreeView Sorting Comparison Function

2008-06-26 Thread Vallone, Anthony
Hi, I am populating a tabular GtkTreeView using a GtkListStore and a GtkTreeModelSort for sorting. I use gtk_tree_view_colum_set_sort_column_id() and gtk_tree_sortable_set_sort_func() to allow some of my columns to be sorted using a custom sort function. I noticed that while a column is being

RE: Problems with aligning and spacing widgets

2008-05-08 Thread Vallone, Anthony
When you want vertical or horizontal alignment, use GtkVBox or GtkHBox. For both vertical and horizontal alignment, use GtkTable. Also, you may find it useful to design GUIs with glade. Even if you don't use it for XML or code gen, it will quickly point you in the right direction for layout

RE: Query regarding drawing gtk_draw_rectangle API

2008-03-31 Thread Vallone, Anthony
gdk_gc_new(your_widget-window) will allocate a graphics context that you can use to draw a rectangle. You should call gdk_gc_unref() when you are done with it. Alternatively, you could just create a GtkEventBox and use gtk_widget_modify_bg(). -Anthony Vallone

RE: Does gtk have issues with STL?

2008-02-12 Thread Vallone, Anthony
Interesting. So g_idle_add can be safely called from a different thread? Does it have to be a gthread, or will a pthread work as well? I have been using pthreads with g_idle_add for a few years. It seems to work fine. Just make sure you call g_thread_init(NULL) before gtk_main(). I've

RE: Does gtk have issues with STL?

2008-02-12 Thread Vallone, Anthony
You do not need to call gdk_thread_init() if you are only invoking GDK/GTK+ functions by message passing via g_idle_add() (that is, if you are not calling gdk_threads_enter()/leave()). That's interesting. g_idle_add() is thread safe without telling it to use mutex locking? Based on the

RE: Does gtk have issues with STL?

2008-02-12 Thread Vallone, Anthony
Hi, I'm interested to know more about that. Is there some source code example that I can follow? -- JP The pattern that Mathias supplied is a good one for C. Since we are talking STL, here is a rough sketch of the pattern that I follow for C++. Of course, there are many good ways to do

RE: Does gtk have issues with STL?

2008-02-11 Thread Vallone, Anthony
Myself, I avoid the enter/leave calls in favor of g_idle_add() as a mechanism to queue all gui calls for the main event loop thread. Let your other threads stick to performing the non-gui work, and you'll save yourself from many headaches. (I wish someone told me that 3 years ago). BTW, I always

RE: how to determine maximum possible window size?

2008-02-06 Thread Vallone, Anthony
Given all that, any suggestion how I could get the info I'm looking for in at least the case of GTK-on-GNOME? That's the platform most used by the folks I'm doing this work for, and it would be nice to make at least that one work properly. I was recently faced with the same problem. My

RE: gtk application taking 6 seconds to load

2008-02-04 Thread Vallone, Anthony
The project I am working on had the same problem after upgrading from GTK+ 2.1 to 2.12 on Solaris 9. Even a hello-world app was taking several seconds to open. So, I profiled hello-world and found that most of the time was spent on font rendering. Newer versions of GTK+ are now using fontconfig

RE: problems with gtk pointers

2007-12-27 Thread Vallone, Anthony
I think your best bet is to isolate the problem down to a small amount of stand-alone code. You will most likely discover the problem in the process of isolation. If you don't, re-post the isolated code (the smaller the better), and I'll take a look again. -Anthony Vallone Hi Anthony,

RE: problems with gtk pointers

2007-12-26 Thread Vallone, Anthony
I have checked their pointers and they are 0 in the third file (where the boxes are attached to the buttons, but in the second where the boxes are created(in constructor) the boxes' pointers are correct) Outside of your Gui constructor, none of the provided code actually changes the values of

RE: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?

2007-12-18 Thread Vallone, Anthony
I don't know what went wrong, but connecting to the popup-menu signal definitly works, as the attached program demonstrates. Ciao, Mathias Thanks for replying Mathias. When I run your code, the clipboard menu still opens. Does the menu open for you with this code? If not, does the menu

RE: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?

2007-12-18 Thread Vallone, Anthony
Turns out, you also have to connect to button-press-event and return TRUE there, when seeing event-button == 3 event-type == GDK_BUTTON_PRESS. Right, I should have thought of that. That does exactly what I want to do. Maybe you want to file a bug-report, that GTK+ should emit the

Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?

2007-12-17 Thread Vallone, Anthony
I am developing applications that run in a very user controlled environment (think big brother). When a GtkEntry or GtkTextView widget is clicked with button 3, a clipboard menu opens with basic clipboard options, an Input Methods sub menu, and an Insert Unicode ... sub menu. How can I disable