insert-at-cursor signal in GtkTextView
The insert-at-cursor signal in GtkTextView doesn't seem to be emitted. There are a few references to a similar problem with GtkEntry, for which using a signal for the GtkEditable ancestor worked around, but I cannot see any suggestions for GtkTextView. Anybody know what is going on? The key-press-event is working fine, but that leaves you with a lot more work since you have to decide whether a character would be inserted... Richard Shann ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
printing gtktextview and text layout
Hi, In brasero I recently started to work on a WYSIWYG cover editor. I ran into a problem when I try to print something: the layout of the text is not exactly similar to what is displayed on screen. For example, if I make a line of a that goes from the left side to the right side and if I try to print this line, then in the preview and on the paper I have a shorter line of 'a' that starts at the right place but that ends before the point it should reach. On screen: | full line of x a | On paper: | smaller line of x a | For text editing I use a GtkTextView with WRAP_CHAR set. I allocate its space by using the screen resolution (with gdk_screen_get_resolution ()) multiplied by the width and height (in inch) of a CD cover. For printing, I use a PangoLayout (from gtk_print_context_create_pango_layout ()) with WRAP_CHAR as well. I get the sizes for the borders the same way (gtk_print_context_get_dpi_x * cover_width, ...). These latter border sizes were correct when I checked. Could someone help me with that please? Regards, Philippe Rouquier ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Preventing Multiple instance of GTK application
Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. Regards, Ajax. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Preventing Multiple instance of GTK application
Ajax John wrote: Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. Regards, Ajax. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list You can write a .lock file everytime you start and then remove it when you close. To know if other instance is running, you just have to check if your .lock file exists. Carlos ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Preventing Multiple instance of GTK application
On Sat, 2008-04-12 at 16:46 +0530, Ajax John wrote: Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. there are many ways to achieve single instance applications. one is to use a X selection; another is to use a pipe/lock file; yet another one is to use D-Bus. you can use the unique library, or reuse parts of it: http://github.com/ebassi/unique/tree/master ciao, Emmanuele. -- Emmanuele Bassi, W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Preventing Multiple instance of GTK application
On Sat, 2008-04-12 at 17:14 +0200, G Hasse wrote: On Sat, Apr 12, 2008 at 03:36:47PM +0100, Emmanuele Bassi wrote: On Sat, 2008-04-12 at 16:46 +0530, Ajax John wrote: Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. there are many ways to achieve single instance applications. one is to use a X selection; another is to use a pipe/lock file; yet another one is to use D-Bus. you can use the unique library, or reuse parts of it: http://github.com/ebassi/unique/tree/master And if you set up a different DISPLAY variable how is a pipe/lock going to relate to this? it depends; the bacon backend works by simply not using the DISPLAY when creating the pipe. and the D-Bus is this running on every display you are using? you'll have a instance for each X session. ssh forwarding of D-Bus is a missing feature that should be implemented in ssh (there are patches, afair). it's not something that pertains single instance applications, though. Try to use something like, ssh -X remote.system yourapp, and other, to verify all kind of lock mechanisms. (You will have a problem). I know, and I check whenever it's possible. some things cannot be done, given the current state of things; but it's always possible to improve. I guess that for every project patches are, as always, welcome. but why are you replying to me? shouldn't this go to the list? ciao, Emmanuele. -- Emmanuele Bassi, W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list