Re: Quitting an application

2008-03-28 Thread Bastiaan Veelo
Sujith wrote: > Gabriele Greco writes: > > Intercept the delete_event or modify the callback where you do the > > gtk_main_quit() and insert there some thread sync code. > > > > You should take care also when you add the rows to your Tree/ListStore if > > you do that directly from the thread

List open modules

2008-03-28 Thread Bastiaan Veelo
Hi, I would like to know the name of the theme engine that is drawing my application. How do I do that? I failed to find a way to get a list of open modules. Thanks, Bastiaan. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mai

Re: sliding panel

2008-03-24 Thread Bastiaan Veelo
I think the problem is that no events are handled as long as you stay in your loop, i.e., the GTK loop is not visited. Change the usleep line with while (gtk_events_pending ()) gtk_main_iteration (); and see what happens. Regards, Bastiaan. Kevin DeKorte wrote: > -BEGIN PGP SIGNED MESSAGE-

Re: toolButton Disable

2008-03-23 Thread Bastiaan Veelo
gtk_widget_set_sensitive() probably does what you want. Regards, Bastiaan. Luiz Rafael Culik Guimaraes wrote: > Dear Friends > > Is their an way to disable an specific tool buton like the winapi? > > I read the docs, but could not find an reference > > Regards > Luiz > ___

Re: How do I spawn an unknown viewer for a known file?

2008-03-09 Thread Bastiaan Veelo
Thank you Allin and James, I will differentiate per platform then. Bastiaan. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

How do I spawn an unknown viewer for a known file?

2008-03-08 Thread Bastiaan Veelo
Hi, What is the platform independent way to spawn a viewer for, say, a PDF document? Thanks, Bastiaan. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Printing

2008-02-27 Thread Bastiaan Veelo
Bastiaan Veelo wrote: > Enrico Tröger wrote: > >>> 8) When exporting to PDF on Windows, trying to overwrite an existing >>> file, the program crashes (oops!). This works fine on Linux. >>> >>> >> I can't reproduce this, on my

Re: Printing

2008-02-22 Thread Bastiaan Veelo
Enrico Tröger wrote: > >> 8) When exporting to PDF on Windows, trying to overwrite an existing >> file, the program crashes (oops!). This works fine on Linux. >> > I can't reproduce this, on my Windows 2000 box I can overwrite existing > files as expected. > Now I cannot reproduce either.

Re: Printing

2008-02-22 Thread Bastiaan Veelo
Hi Enrico, I reported a bug on this. You can leave a note that you are able to reproduce this, and maybe mention your printer model and Windows version. See http://bugzilla.gnome.org/show_bug.cgi?id=518052 Thanks, Bastiaan. Enrico Tröger wrote: > > >> 7) When printing under Windows to a C

Re: Printing

2008-02-17 Thread Bastiaan Veelo
Enrico Tröger wrote: > On Wed, 13 Feb 2008 19:56:05 +0100, Bastiaan Veelo <[EMAIL PROTECTED]> > wrote: > > Hi, > > >> 1) In order to get approximately correctly scaled text I had to specify >> a resolution of around 27.2 on the pango context. This value was

Re: Printing

2008-02-13 Thread Bastiaan Veelo
Enrico Tröger wrote: >> You will find the code attached, these are the issues: >> > I don't ;-(. > > Let's try inline then: /* February 2008, Bastiaan Veelo, [EMAIL PROTECTED] */ #include #include #ifdef CAIRO_HAS_PDF_SURFACE #include #endif static G

Printing

2008-02-13 Thread Bastiaan Veelo
Dear list, In lack of a complete printing tutorial, I wrote one myself. There are still some open questions though. My objective is to get consistent output of text and graphics on screen, in PDF and printed on paper, cross platform. All drawing code is in one function, which should not need

Re: GTK+ 2.12.6 and wimp

2008-02-11 Thread Bastiaan Veelo
Tor Lillqvist wrote: > Did you expect the "wimp" theme to automatically get used? Yes, I have previously used an installer to get the runtime for 2.10, which probably took care of it. > You need to either put the line > > gtk-theme-name = "MS-Windows" > > in your gtkrc file Thanks, this works.

GTK+ 2.12.6 and wimp

2008-02-10 Thread Bastiaan Veelo
Hi, I installed version 2.12.6 on Windows according to http://www.gtk.org/download-windows.html, but I cannot get the wimp theme enigne to load -- all is in the default GTK theme. The archives have been unpacked in the same directory, and the bin subdirectory has been added to the PATH environ

Re: GTK equivalent to exit() function in callback

2008-01-14 Thread Bastiaan Veelo
Have a look at the concept proposed in the last paragraph of http://lists.ximian.com/pipermail/gtk-sharp-list/2004-November/005148.html Good luck, Bastiaan. [EMAIL PROTECTED] wrote: > Hi all, > > > How do I exit from callback function at my discretion[instead of quitting > by reaching end of cal

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-09 Thread Bastiaan Veelo
Bastiaan Veelo wrote: > The reason why this is not going to work (for the windows theme at > least, GTK+ 2.10) is a hard-coded check on the type of widget->parent in > draw_box() on line 1929 of msw_style.c: > So I faked the parent widget through some evil hacking in the e

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
Kristian Rietveld wrote: > On Mon, Oct 08, 2007 at 03:53:29PM +0200, Bastiaan Veelo wrote: > >>> Something like this seems to work for me: >>> >>> button = gtk_button_new_with_label ("..."); >>> style = gtk_rc

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
#include int main( int argc, char *argv[] ) { gtk_init (&argc, &argv); GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); GtkWidget *vbox = gtk_vbox_new (FALSE, 0);

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
One more try with attachments. Bastiaan Veelo wrote: I have done some more experimenting with styles, attached, and my confusion has only grown bigger. See comments in the source. I still cannot get an ordinary button to look like a tree view title

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
Hi, I have done some more experimenting with styles, attached, and my confusion has only grown bigger. See comments in the source. I still cannot get an ordinary button to look like a tree view title... Should I go ask on gtk-devel? Regards, Bastiaan. ___

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
I looked at modules/engines/ms-windows/msw_style.c, line 855, and tried the following, without succes: gchar* class_path = NULL; gtk_widget_class_path(button, NULL, &class_path, NULL); gchar buf[1024]; g_snprintf (buf, sizeof(buf), "widget_class \"%s\" style \

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
Kristian Rietveld wrote: > On Mon, Oct 08, 2007 at 03:53:29PM +0200, Bastiaan Veelo wrote: > >>> Something like this seems to work for me: >>> >>> button = gtk_button_new_with_label ("..."); >>> style = gtk_rc

How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
Kristian Rietveld wrote: > Hi, > > On Sun, Oct 07, 2007 at 12:35:01PM +0200, Bastiaan Veelo wrote: > >> I am a style newbie. I want some of the buttons in my widget to look >> like the column title buttons in a treeview. How do I do that? >> > > Some

How to use the treeview column title style for a button?

2007-10-07 Thread Bastiaan Veelo
Hi, I am a style newbie. I want some of the buttons in my widget to look like the column title buttons in a treeview. How do I do that? Thanks, Bastiaan. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/li

Re: g_object_ref and g_object_unref in widget implementations

2007-10-07 Thread Bastiaan Veelo
Tristan Van Berkom wrote: > On Sat, 2007-10-06 at 13:09 +0200, Bastiaan Veelo wrote: > >> Hi, >> >> I am writing my own widget, and while looking at the widgets in GTK I >> notice the following. >> >> If a widget draws on its parent GdkWindow, you g

g_object_ref and g_object_unref in widget implementations

2007-10-06 Thread Bastiaan Veelo
Hi, I am writing my own widget, and while looking at the widgets in GTK I notice the following. If a widget draws on its parent GdkWindow, you generally see > widget->window = gtk_widget_get_parent_window (widget); > g_object_ref (widget->window); But widget->window is not g_object_unref-ed an