Re: how to hide close button in gtk dialog
Yogesh M wrote: > found it, sometimes it is neccessary to avoid > confusion. > > for example in a dialog i have a cancel button, now if > the window show a close button, it is a confusion that > whether the window closes or the cancel activates or both. It's common convention that title bar close buttons of windows do a cancel-close. Especially if inside the window there are both "Cancel" and "OK" buttons as well. Hint: only using the "OK" button should confirm input or changes. Closing the window by any other means (i.e. "Cancel"-button, title bar close button, hitting the [Esc] key, killing or crashing the application) never does. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
set current worlking directory to executable path
I am using Gtk in windows(as well as linux). I want to set the environment path to executable path so i can load icons present in the executable path. I will be happy if it works both on linux and windows. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Pango docs
Hi, I compiled pango. How do i turn the stuff in pango/docs/ in to some kind of manual? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: set current worlking directory to executable path
Yogesh M writes: > I am using Gtk in windows(as well as linux). I want to set the > environment path to executable path so i can load icons present in > the executable path. I will be happy if it works both on linux and > windows. On Linux, do a readlink on /proc/self/exe (if it exists), and g_get_dirname() on the result. On other Unixes, don't know. Some might have something like /proc/self/exe. Otherwise look at argv[0], and if it doesn't contain a directory already (possibly relative) look for the executable in $PATH, etc. Note that this method is trivial to spoof, so it shouldn't be used for anything that might have security consequences. On Windows, do GetModuleFileName() on the result of GetModuleHandle(NULL). If you want to be really correct, use the wide character version (and then convert pathname from UTF-16 to UTF-8 before passing to g_open() etc.) --tml ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: how to hide close button in gtk dialog
On Tue, 2005-08-09 at 09:56 +0200, Gus Koppel wrote: > It's common convention that title bar close buttons of windows do a > cancel-close. Especially if inside the window there are both "Cancel" > and "OK" buttons as well. It may be convention, but it still confuses people. The HIG would love to say that alert and dialog titlebars shouldn't have a Close button unless the dialog is instant apply. The only reason it doesn't say that is because it's not technically possible to hide the Close button in metacity, AFAIK. Cheeri, Calum. -- CALUM BENSON, Usability Engineer Sun Microsystems Ireland mailto:[EMAIL PROTECTED]Java Desktop System Group http://ie.sun.com +353 1 819 9771 Any opinions are personal and not necessarily those of Sun Microsystems ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GtkSpinbutton up/down buttons remain depressed
Hi all, I am trying to write a gtk2-based gui for an app that visualizes antenna properties for different frequencies. The user changes freq by clicking the up/down buttons of a GtkSpinbutton that holds the current value of the frequency. I use the value_changed signal to read the new freq and then re-calculate and re-draw the new data in a drawingarea widget. Apparently GTK issues the value_changed signal before updating the spinbutton widget so that program flow goes to the functions that calculate freq data, which results in the up/down buttons remaining depressed, with the spinbutton value continually stepping itself up to it limit. I would greately appreciate any hints on this probelm, since its the last remaining bug in the GUI ;-) My thanks in advance! -- Regards NeoklisHam Radio Call: 5B4AZ QTH Loc: KM64MR ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Bayer Pattern images in Pixbuf or Pixmaps
Hi I was wondering if Pixmaps or Pixbufs support Bayer Pattern data and if not if there is a simple conversion technique to get a Bayer Pattern image into an RGB or other image format that could be used properly by a Pixbuf or Pixmap. Thanks a lot, Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
extracting a portion of a GdkPixmap
I have a GdkPixmap. I need to programmatically extract a new GdkPixmap from this image based on x- and y-coordinates, plus width and height. The x, y, width, and height parameters will vary too much at runtime to store all the copies needed. Conceptually this seems simple. But from among the enormous number of different image formats and image-manipulation functions in GTK/GDK, I can't find a way to do it, after a *lot* of searching. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: extracting a portion of a GdkPixmap
On 8/9/05, Boncek, John <[EMAIL PROTECTED]> wrote: > I have a GdkPixmap. I need to programmatically extract a new GdkPixmap > from this image based on x- and y-coordinates, plus width and height. The > x, y, width, and height parameters will vary too much at runtime to store > all the copies needed. I think you just make a new small pixmap of the size you need, then copy the pixels you want from your big pixmap into the small pixmap. The copy will (usually) be done in hardware, so it's very fast. You could consider using a pixbuf instead and doing the manipluation on the client side, but perhaps that doesn't suit your application. If it does, there's a very convenient pixbuf constructor: http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-creating.html#gdk-pixbuf-new-subpixbuf John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: extracting a portion of a GdkPixmap
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Boncek, John wrote: > I have a GdkPixmap. I need to programmatically extract a new GdkPixmap > from this image based on x- and y-coordinates, plus width and height. The > x, y, width, and height parameters will vary too much at runtime to store > all the copies needed. Conceptually this seems simple. But from among > the enormous number of different image formats and image-manipulation > functions in GTK/GDK, I can't find a way to do it, after a *lot* of > searching. If you just need to copy a region of a GdkPixmap into another GdkPixmap, you can use gdk_draw_drawable(): http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html#gdk-draw-drawable Note that you need to create the destination GdkPixmap first, via gdk_pixmap_new(). If you want to copy a region of a GdkPixmap to a client-side GdkPixbuf, use gdk_pixbuf_get_from_drawable(): http://developer.gnome.org/doc/API/2.0/gdk/gdk-Pixbufs.html#gdk-pixbuf-get-from-drawable -brian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (MingW32) iD8DBQFC+Q7c6XyW6VEeAnsRAozhAJ48uuC/WHDB8NZnikarN4ve9OP9xACfXHcd e5rRRdz+qccNeAEha58z2Dg= =dpDM -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How to filter the font selection dialog in GTK-2.x
gtk_font_selection_dialog_set_filter and gtk_font_selection_set_filter do not exist in 2.x I want to filter the fonts shown in the dialog to fixed pitch fonts only. I searched the archive and the question has been asked before but never answered. Lets see what happens this time. Norman Saperion Inc. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
RE: extracting a portion of a GdkPixmap
Thanks to those who replied. gdk_draw_drawable is working. I know you have to unref certain kinds of objects. Do you have to unref a GdkPixmap when finished with it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian J. Tarricone Sent: Tuesday, August 09, 2005 3:15 PM Cc: gtk-app-devel-list@gnome.org Subject: Re: extracting a portion of a GdkPixmap -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Boncek, John wrote: > I have a GdkPixmap. I need to programmatically extract a new GdkPixmap > from this image based on x- and y-coordinates, plus width and height. The > x, y, width, and height parameters will vary too much at runtime to store > all the copies needed. Conceptually this seems simple. But from among > the enormous number of different image formats and image-manipulation > functions in GTK/GDK, I can't find a way to do it, after a *lot* of > searching. If you just need to copy a region of a GdkPixmap into another GdkPixmap, you can use gdk_draw_drawable(): http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html#gdk -draw-drawable Note that you need to create the destination GdkPixmap first, via gdk_pixmap_new(). If you want to copy a region of a GdkPixmap to a client-side GdkPixbuf, use gdk_pixbuf_get_from_drawable(): http://developer.gnome.org/doc/API/2.0/gdk/gdk-Pixbufs.html#gdk-pixbuf-get -from-drawable -brian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (MingW32) iD8DBQFC+Q7c6XyW6VEeAnsRAozhAJ48uuC/WHDB8NZnikarN4ve9OP9xACfXHcd e5rRRdz+qccNeAEha58z2Dg= =dpDM -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Bayer Pattern images in Pixbuf or Pixmaps
it would be helpful if you tell us what the heck a 'bayer pattern' is ... Michal Porzuczek wrote: Hi I was wondering if Pixmaps or Pixbufs support Bayer Pattern data and if not if there is a simple conversion technique to get a Bayer Pattern image into an RGB or other image format that could be used properly by a Pixbuf or Pixmap. Thanks a lot, Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Bayer Pattern images in Pixbuf or Pixmaps
Stefan Kost writes: > it would be helpful if you tell us what the heck a 'bayer pattern' is ... See for instance http://www.cambridgeincolour.com/tutorials/sensors.htm . That was the first Google hit when searching the words "bayer array" (without the quotes). > > I was wondering if Pixmaps or Pixbufs support Bayer Pattern Nope. That would be way too application domain specific for GTK+. > > if there is a simple conversion technique to get a Bayer > > Pattern image into an RGB or other image format that could be used > > properly by a Pixbuf or Pixmap. You mean a simple demosaicing (debayering) technique? Well, a trivial one like "nearest neighbour" for the missing colour channels of each pixel is probably "simple", but it isn't good qualitywise. High-quality demosaicing algorithms are not simple. See for instance http://www.cs.pdx.edu/~cklin/demosaic/ . The Open Source dcraw program (http://www.cybercom.net/~dcoffin/dcraw/) uses an algorithm called "Interpolation using a Threshold-based variable number of gradients" described in http://www-ise.stanford.edu/~tingchen/algodep/vargra.html --tml ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Color Initialization
Lists, OS: win2k/XP Using Unix/Linux you can use an .rc to initialize parameters, like a default color set, anytime GTK+ is used. What is the approach to initialize a default color set when using win2k/XP without adding code to every application? Thanks, MikeF ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: extracting a portion of a GdkPixmap
On 8/9/05, Boncek, John <[EMAIL PROTECTED]> wrote: > Thanks to those who replied. gdk_draw_drawable is working. I know you > have to unref certain kinds of objects. Do you have to unref a GdkPixmap > when finished with it? Yes you should ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Color Initialization
MEA-MikeFriedrichs writes: > Using Unix/Linux you can use an .rc to initialize parameters, You mean .gtkrc-2.0? > like a default color set, anytime GTK+ is used. What is the approach to > initialize a default color set when using win2k/XP without adding code to > every application? The same, AFAIK. --tml ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list