Re: An alternative to gdk-pixbuf

2018-09-11 Thread John Cupitt via gtk-devel-list
On Tue, 11 Sep 2018 at 03:11, Magnus Bergman wrote: > On Tue, 11 Sep 2018 00:07:27 +0200 > Bastien Nocera wrote: > > No, it really isn't: > > https://www.cvedetails.com/vulnerability-list/vendor_id-1749/Imagemagick.html > > > > We want to have less CVEs, not more. > > I see what you mean. A few

Re: An alternative to gdk-pixbuf

2018-09-10 Thread John Cupitt via gtk-devel-list
On Mon, 10 Sep 2018 at 08:02, Debarshi Ray wrote: > > too with the right plugin (probably using GEGL in that case). But I > > think the problem with large images (say 12000x12000 or so) is giving > > it to the application as a pixmap. From my own tests it seams it's fine > > at least as long as

Re: An alternative to gdk-pixbuf

2018-09-06 Thread John Cupitt via gtk-devel-list
On Thu, 6 Sep 2018 at 11:40, Emmanuele Bassi via gtk-devel-list wrote: > On Wed, 5 Sep 2018 at 19:25, Magnus Bergman > wrote: >> Gegl is great for image editing. But not as much for simple viewing. > > This is debatable. If I'm viewing a 4000x4000 RGB image on a hidpi display > I'm already

Re: BGR vs. RGB in GTK/GDK

2007-02-20 Thread John Cupitt
Hi Mike, On 2/21/07, Mike Melanson [EMAIL PROTECTED] wrote: facilities. I'm trying to convert it to use GTK/GDK. This app has always rendered bitmaps in blue-green-red (BGR) pixel order which, per my understanding, is the native order that the hardware expects. Now, I am using

Re: GtkDrawingArea mouse events

2007-01-17 Thread John Cupitt
On 1/17/07, Jim George [EMAIL PROTECTED] wrote: 1) I am currently trapping the configure-event signal and resizing the array there. Is this the best approach? In my past life, I used to Yes, this is correct. 2) I had a bug in my program in which I would occasionally get a mouse cursor

Re: GUI window creation from a thread

2007-01-08 Thread John Cupitt
On 1/8/07, Preeti Joshi [EMAIL PROTECTED] wrote: Is it not possible to create a GUI window from a thread? I created a thread There are several FAQs about this: http://www.gtk.org/faq/#AEN482 And some others, read down a bit. In my opinion, it's best not to do this, but instead to only call

Re: Debugging application

2006-12-18 Thread John Cupitt
On 12/18/06, Fernando Apesteguía [EMAIL PROTECTED] wrote: executing... There are no problems (no errors or warnings) during compilation and valgrind, with: -v --leak-check=full doesn't show any problems of my code. OK, after the application reached 7.3 MB it went down (according to

Re: A question about threads

2006-12-11 Thread John Cupitt
On 12/11/06, Christopher Bland [EMAIL PROTECTED] wrote: I had the same requirement. I also needed to write to a status bar from my other threads. Based on feedback from this mailing list here is what worked perfectly for me: This is a good solution, but will not be portable to non-unix

Re: Adding custom buttons to a scrolled window

2006-12-06 Thread John Cupitt
On 12/6/06, Michael 'Mickey' Lauer [EMAIL PROTECTED] wrote: I need to implement a version of a GtkScrolledWindow that features a custom button as part of the scrollbar. Please find a Your graphic got lost (put it on a webpage and post a link), but the usual answer to these questions is to use a

Re: Re[2]: Adding custom buttons to a scrolled window

2006-12-06 Thread John Cupitt
On 12/6/06, Michael 'Mickey' Lauer [EMAIL PROTECTED] wrote: Put two scrollbars plus a viewport in a table and add any other buttons you need. Make your work area the child of the viewport. Connect the scrollbar adjustments to the viewport. Will that do everything that embedding a child

Re: Adding custom buttons to a scrolled window

2006-12-06 Thread John Cupitt
On 12/6/06, Michael 'Mickey' Lauer [EMAIL PROTECTED] wrote: Basically what I'd need is to get a GtkScrolledWindow but make it talk to my scrollbars, not to its. That's (almost) exactly what happens if you put two scrollbars and a viewport into a table. I see. Last question then... what

Re: has anyone valgrind'd gtk?

2006-12-06 Thread John Cupitt
On 12/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The reality is that gtk is leaking. It could well be, but I'd be a bit surprised. Every few months of hacking I try to take the time to get my project to valgrind cleanly. It's about 100,000 lines of C in the UI part. The only leaks I see in

Re: Finding Version of GTK installed

2006-12-04 Thread John Cupitt
On 12/4/06, David Vandepol [EMAIL PROTECTED] wrote: mailing list a while ago, however I've come across another issue. I can determine if GTK is installed on the computer, however I'm having trouble determining the version of GTK that is installed. When GTK is installed There are a number of

Re: has anyone valgrind'd gtk?

2006-12-03 Thread John Cupitt
On 12/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have an application, and i'm noticing some leaks deep within gtk's libraries. GTK doesn't free memory that is just allocated once (usually on startup). It should free memory that gets allocated for widgets though. So you should not see

Re: Mutex or atomic operations for multithread app?

2006-11-11 Thread John Cupitt
On 11/11/06, Tomasz Jankowski [EMAIL PROTECTED] wrote: I looking for someone, who will say if my idea is bad or good ;) I have an object based on GObject, which have quite many int variables. This object is used by many threads and i'm wondering if I really need to use mutex when I want to

Re: Question about multithreads

2006-11-01 Thread John Cupitt
On 10/31/06, John Cupitt [EMAIL PROTECTED] wrote: If the value doesn't change, or you don't mind if changes are not seen by other threads for a while, then it's OK to skip the mutex. I forgot to say: http://developer.gnome.org/doc/API/2.0/glib/glib-Atomic-Operations.html Can save you

Re: Question about multithreads

2006-10-31 Thread John Cupitt
On 10/31/06, Tomasz Jankowski [EMAIL PROTECTED] wrote: wrote works fine). However I'm not sure if I should always lock and unlock mutex when I'm accesing some global data from thread. I know, that i'm If the value is changing and the changes are being used to signal between threads, then you

Re: Launch the default html browser

2006-10-13 Thread John Cupitt
On 10/13/06, Gan3sh [EMAIL PROTECTED] wrote: With Gtk+, is there any way to launch the default html browser independently of the operating system ? Sadly not (as far as I know). I have a thing with ifdefs for *nix, mac and win32 in my app:

Re: problem when Profiling Gtk+............plz help

2006-10-06 Thread John Cupitt
On 10/5/06, Sharma Nitin-A21652 [EMAIL PROTECTED] wrote: Can someone please help with the tool that is in use in Gtk+ development community for profiling towards identifying functions that take most of the time in performance? A lot of people use sysprof:

Re: Obtaining area needed to render a text

2006-10-04 Thread John Cupitt
On 10/4/06, Gustavo Cipriano Mota Sousa [EMAIL PROTECTED] wrote: I am developing an application where I need to render some objects in a DrawingArea, among with them are some text labels. I'd like to know in advance how much area (width/height) would be needed to render a text. Also, I am

Re: convert an int variable into a gdouble

2006-09-29 Thread John Cupitt
On 9/29/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i'm building an application,and i need to convert an int variable into a gdouble to can use some plotting functions. I don't know how to do it!! You can just cast: int i = 42; gdouble gd; gd = i; Unless I'm missing something?

Re: Re: Internationalization of GTK Apps (change language)

2006-09-25 Thread John Cupitt
On 9/25/06, Andreas Stricker [EMAIL PROTECTED] wrote: * There is a good howto somewhere, but I can't find it anymore I found these two helpful: http://www.gnome.org/~malcolm/i18n http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html Don't know if either of them is the one you

Re: why???

2006-09-08 Thread John Cupitt
Hi, On 9/8/06, dagang001 [EMAIL PROTECTED] wrote: for ( i=0 ;i4 ;i++) { fred-name = ming[i]; fred-shoe_size = i+10; fred-age=60+i; list = g_list_append(list, fred); } You need to make a new Person each time. At the moment you are making a single

Re: Multi-threaded gtk app very very slow

2006-07-18 Thread John Cupitt
On 7/17/06, Mark Richardson [EMAIL PROTECTED] wrote: I ran the debugger and came up with this (for the primary gtk thread - all other threads aren't blocking). ?? _XRead() from libX11.so.6 _XReply() from libX11.so.6 _XIDHandler() from libX11.so.6 XCreatePixmap() from

Re: Emitting signals

2006-07-14 Thread John Cupitt
On 7/14/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am creating a application where there is a text editor and a button. On clicking the button, the backspace signal has to triggered for text editor so that it deletes the last character. Can any one tell me how I can emit signal from one

Re: Why ? When segmentation fault,there has no core file

2006-07-07 Thread John Cupitt
On 7/7/06, chao yeaj [EMAIL PROTECTED] wrote: The problem is : when segmentation fault ,there has nocore file if the has a core file ,i can debug it, but there has nocore file You probably have coredumps turned off. Try ulimit -c unlimited before running your program.

Re: Re: GtkFixed child control resizing

2006-07-05 Thread John Cupitt
On 7/5/06, Atanas Atanasov [EMAIL PROTECTED] wrote: Thanks. The size request worked. However there is an issue. Say I create my label to cover all the GtkFixed and set its text justification to left. What I expect to see is something like: The justification setting controls the way line

Re: Do GTKhave tabbed pane or multi-page or such?

2006-07-05 Thread John Cupitt
On 7/5/06, justforfun [EMAIL PROTECTED] wrote: I have checked the tutorial on gtk.org, could not find abbed pane or multi-page or such. Sounds like you need gtknotebook: http://developer.gnome.org/doc/API/2.0/gtk/GtkNotebook.html ___

Re: GValue won't init inside hidden functions

2006-06-28 Thread John Cupitt
On 6/28/06, Philip Kovacs [EMAIL PROTECTED] wrote: I have noticed that issuing a g_value_init() on a GValue produces the error: GLib-GObject-WARNING **: gvalue.c:89: cannot initialize GValue with type `gpointer', the value has already been initialized as `(null)' whenever the function does

Re: GTK file open dialog usability...

2006-06-25 Thread John Cupitt
There are some useful improvements in HEAD but not in gtk stable yet: 1) There's now a visible text box you can type to in the Open File dialog http://bugzilla.gnome.org/show_bug.cgi?id=136541 2) It's now aynchronous, ie. it will load the icons, file list, etc. in the background. No more

Re: Multi monitor environment

2006-06-23 Thread John Cupitt
On 6/23/06, 3saul [EMAIL PROTECTED] wrote: How do I find out which monitor my application is on in a multiple monitor environment? There's GdkScreen which is supposed to have this information, at least in a traditional X multihead setup:

Re: Multi monitor environment

2006-06-23 Thread John Cupitt
On 6/23/06, John Cupitt [EMAIL PROTECTED] wrote: There's GdkScreen which is supposed to have this information, at least in a traditional X multihead setup: http://developer.gnome.org/doc/API/2.0/gdk/GdkScreen.html Forgot, and here's the get/set for GtkWindow: http://developer.gnome.org/doc

Re: strange trouble in displaying a 8bit monochromy grey scale image

2006-06-02 Thread John Cupitt
On 6/2/06, heavenscape [EMAIL PROTECTED] wrote: char* pDisplayBuf = malloc(sizeX*sizeY*3); for(i=0;isizeX*sizeY;i++) { //create a gray scale img in the display buffer pDisplayBuf[i+1]=pDisplayBuf[i+1]=pDisplayBuf[i+2] = pixel_value; } This isn't going

Re: building a library using gtk+

2006-05-17 Thread John Cupitt
On 5/16/06, Dov Kruger [EMAIL PROTECTED] wrote: If I run pkg-config and capture the output, this is what it puts out: -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 So I want to

Re: building a library using gtk+

2006-05-17 Thread John Cupitt
On 5/17/06, Rick Jones [EMAIL PROTECTED] wrote: I handle this by making my own .pc file for my library. It's fairly easy to get your configure script to generate one and install it correctly, but I could post an example if you like. One you have a mylibrary.pc installed, your users can

Re: GTK+ Cocoa Native Port

2006-05-16 Thread John Cupitt
There's a project page with a TODO list of things that still need fixing: http://developer.imendio.com/wiki/Gtk_Mac_OS_X Might be a start point. On 5/16/06, Matthias Clasen [EMAIL PROTECTED] wrote: On 5/16/06, Ben Hall [EMAIL PROTECTED] wrote: So!! I was wondering if any of you had any

Re: How to stack widgets or GtkFixed doesn't seem to work well for stacking

2006-05-11 Thread John Cupitt
On 5/11/06, Sean Kelley [EMAIL PROTECTED] wrote: It appers that GtkFixed is not really designed for stacking widgets as it does not have a concept of a z-axis. What gets drawn on top is purely a matter of what child comes last when drawing, and a similar story is with input. GTK does not have

Re: gtk_widget_destroy(): destroys embedded widgets?

2006-05-04 Thread John Cupitt
On 5/4/06, Felix Kater [EMAIL PROTECTED] wrote: if I destroy a container (in my case a gtk table widget), does it automagically remove all widgets which have been attached to it before--or do I have to destroy all embedded widgets before one by one? Short answer: yes, it will automatically

Re: Howto really debug gdk_x_error?

2006-04-21 Thread John Cupitt
On 4/21/06, Wojciech Kromer [EMAIL PROTECTED] wrote: Where is your code called? -mine is from fimer function added by g_timeout_add Are You using timers, pthreads, gthreads? - i'm using pthreads, but there are no gtk call from there How often are made changes to markupLabel? -my

Re: can't ercieve data passed to g_signal_connect

2006-04-21 Thread John Cupitt
On 4/21/06, rachit goel [EMAIL PROTECTED] wrote: g_signal_connect ((gpointer)eventt[iter],button_press_event, G_CALLBACK (tab_click1), data1); void tab_click1(GtkWidget *widget,gchar* data1) You have the type of your callback wrong:

Re: Random Number of Buttons

2006-04-20 Thread John Cupitt
On 4/20/06, 3saul [EMAIL PROTECTED] wrote: I'm wanting to know the best way to declare a random number of buttons for my gtk app. The number will changed depending on the argument passed to my app. Just use an array of GtkWidget pointers. For example (untested): GtkWidget ** add_buttons(

Re: converting GTKWidget to Widget (Moftif)

2006-04-14 Thread John Cupitt
On 4/14/06, Dmitriy Chumack [EMAIL PROTECTED] wrote: I have a little question. I need to create a widget using XtVaCreateManagedWidget(...) function from libXt.so.6 library. No, sorry, GTK and Motif are completely different and you can't mix their APIs. You must use one or the other. If you

Re: Pango help

2006-04-10 Thread John Cupitt
On 4/10/06, nerdy [EMAIL PROTECTED] wrote: In the following code segment, I am displaying a text at a position (50,50) in a drawing area. For a font size of 24 and family=courier, i am NOT gettting the message displayed at the exact position (50,50). The starting of the text is displaced by

Re: Where is this damn non utf8 char??!!

2006-04-08 Thread John Cupitt
On 4/8/06, Juan Pablo [EMAIL PROTECTED] wrote: and I couldnt find where is this non valid utf-8 text. Is there any way to debug this to find that text? (widget name or something) This message commonly apears when some dialogs are shown. I usually make warnings fatal, then run in a debugger.

Re: displaying continuosly in entry widget

2006-02-22 Thread John Cupitt
Hi, you need a timeout rather than sleep(). Sleep will make your whole program (including screen repaint) stop for 3 seconds. A timeout will let your repaint continue while you wait. http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#id3076251 J On 2/22/06, shibu

Re: Font antialiasing on X (was: Re: Font Contrast)

2006-02-13 Thread John Cupitt
On 2/13/06, Gus Koppel [EMAIL PROTECTED] wrote: Hence, the effect can be turned off. In X-Windows it's nowadays controlled by the Xft + Fontconfig library. Unfortunately AFAIK there is no way to thoroughly configure use of antialiasing via Gnome, so you will likely have to edit the config file

Re: Forcing first exposure

2006-01-13 Thread John Cupitt
On 1/13/06, Gravis Zero [EMAIL PROTECTED] wrote: not exposed until after you load the file. needless to say i would like to be able to load the image into the drawing area when loaded instead of when it is exposed as it make the app look slugish or frozen. i have I would load the image in

Re: Call a function after showing something in a DrawingArea

2006-01-04 Thread John Cupitt
Hi Christoph, On 1/4/06, Christoph Bersch [EMAIL PROTECTED] wrote: Great, this seems to work :-) Good! I thought, that a call of gtk_widget_draw() might be better than gtk_widget_queue_draw_area(), as it draws immediately, although it is deprecated. So how could a call of

Re: Call a function after showing something in a DrawingArea

2006-01-03 Thread John Cupitt
On 1/3/06, Christoph Bersch [EMAIL PROTECTED] wrote: I want to write a program, that draws something in a DrawingArea, and calls a function after _showing_ the changes in the DrawingArea: 1) call function draw_something() 2) show the changes 3) call a function measure() 4) return to step 1)

Re: Proposition for platform maximum filename/pathname length symbols

2005-12-24 Thread John Cupitt
On 12/24/05, Tor Lillqvist [EMAIL PROTECTED] wrote: While I have the list's attention, it would be nice to add stat() and fstat() wrappers that would definitely be large file aware on all platforms. Large-file wrappers for ftruncate() and lseek() would be very handy too. Win32 (as far as I

Re: signals and threads

2005-12-07 Thread John Cupitt
On 12/7/05, Dmitry A. Yanko [EMAIL PROTECTED] wrote: On Wed, Dec 07, 2005 at 12:46:28PM -0500, Tristan Van Berkom wrote: May I just ask why you think you need to use threads in the first place ? It is more convenient. :) It is difficult to handle many external events whithout threads. Each

Re: Signal on mouse over menu item?

2005-11-26 Thread John Cupitt
On 11/26/05, Daniel Pekelharing [EMAIL PROTECTED] wrote: Is there a signal on a GtkMenuItem that gets called when the cursor is moved onto the item? I use select for when a menu item is highlit but before it is activated. John ___ gtk-app-devel-list

Re: Signal on mouse over menu item?

2005-11-26 Thread John Cupitt
On 11/26/05, Daniel Pekelharing [EMAIL PROTECTED] wrote: I need to receive any keys pressed whilst a menu item is selected ... I connect a menu item with key-press-event, but it seems to do nothing, even though Gtk doesn't spit out the usual: signal x is invalid for instance y... I'm not

Re: Memory consumption

2005-11-25 Thread John Cupitt
On 11/25/05, Andrey Karavaev [EMAIL PROTECTED] wrote: How about reducing of memory consumption(may be in next GTK+ versions..) ? Problem is following: even very simple GTK-application takes huge place in memory( resident memory) so if we have multiuser sysem . Memory use can be hard to

Re: GtkUIManager help

2005-11-24 Thread John Cupitt
On 11/24/05, Adam [EMAIL PROTECTED] wrote: In my application I want to be able to dynamically add items to a menu after a configuration file has loaded and after a file has been opened. The menu's use gtk_ui_manager to initialise but I am unsure how to go about implementing to dynamic

Re: GtkUIManager help

2005-11-24 Thread John Cupitt
On 11/24/05, Adam [EMAIL PROTECTED] wrote: the string is a filepath i.e /home/adam/denemo/test.denemo. Is there anything that I should know about in converting from xmlChar * inserting into a GList and the extracting and converting to a gchar * ?? GTK+ is UTF-8 (almost) throughout. You need

Re: Sun's fopen() fd limit of 256

2005-11-23 Thread John Cupitt
On 11/23/05, ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN [EMAIL PROTECTED] wrote: Is there any benefit to providing a full GLib fopen/fread/fwrite/etc API which provides its own implementation if the system implementation has an fd limitation? The configure script could detect this and enable it if

Re: Sun's fopen() fd limit of 256

2005-11-23 Thread John Cupitt
On 11/23/05, John Cupitt [EMAIL PROTECTED] wrote: int g_seek( int fd, gint64 pos ); int g_ftruncate( int fd, gint64 pos ); gint64 g_read( int fd, void *buf, gint64 count ); Ahem, that was stupid, forget the g_read() there. Sorry. John ___ gtk-devel

Re: Aligning widgets in a set of vboxes and hboxes

2005-11-13 Thread John Cupitt
On 11/13/05, Jaap Haitsma [EMAIL PROTECTED] wrote: I'd like to align a number of widgets which are in vboxes and hboxes. The dialog is very similar to the File Management Preferences dialog of nautilus [1]. Hi, you need a sizegroup: http://developer.gnome.org/doc/API/2.0/gtk/GtkSizeGroup.html

Re: is there a way to change the starting position of the window

2005-11-11 Thread John Cupitt
On 11/11/05, Yiannis [EMAIL PROTECTED] wrote: is there a way to change the position of the window when starting up? In particular: 1. Is it possible to change it to a relative position... for example the top right corner? I am using glade to create the interface and libglade to load it

Re: gtk win32 and env variables

2005-11-06 Thread John Cupitt
On 11/6/05, Tor Lillqvist [EMAIL PROTECTED] wrote: Another solution for applications is to look at argv[0]. On Windows this is always (I think) the full path to the .exe. Looking at argv[0] is really not recommended on Windows. If memory serves me right, if the path to the application has

Re: gtk win32 and env variables

2005-11-05 Thread John Cupitt
On 11/5/05, David Necas (Yeti) [EMAIL PROTECTED] wrote: On Sat, Nov 05, 2005 at 03:40:40PM +0100, Goran Rakić wrote: Put this first: ... (some win32 registry code) ... Or have a look at g_win32_get_package_installation_directory(). Very neat. Another solution for applications is to

Re: Drawing 1-bit bitmaps

2005-11-01 Thread John Cupitt
On 11/1/05, Juhana Sadeharju [EMAIL PROTECTED] wrote: What library can load 1-bit images to a format GTK understands? My 1-bit images have been very large, the library should be able to extract only a rectangle from the image before converting anything to 24-bit. What library can handle

Re: Dynamic Object

2005-10-31 Thread John Cupitt
On 10/31/05, Kranz, Willi [EMAIL PROTECTED] wrote: I have to create ca. 50 Objects in an application. Each Object has 2 Eventboxes, 2 Labes and a Pixmap and 2 or 3 callback-functions. Or what is the best way to solve this problem. If your object is simple, you can just write a function to

bindings for scale widgets

2005-10-31 Thread John Cupitt
Hello all, My app has a main window containing (as well as other stuff) some comboboxes and some hscale widgets. If I use the mouse scrollwheel to go up and down, and the mouse pointer happens to be over one of these widgets, instead of scrolling the window, it changes the widget value. This

Re: 4-space tabs in GtkTextView

2005-10-21 Thread John Cupitt
Hi Michael, On 10/21/05, Michael Matthews [EMAIL PROTECTED] wrote: How do I change the default tabs from 8-space to 4-space? I use the following: static PangoTabArray * program_tabs_new( void ) { const int ntabs = 20; const int tab_width = 15; /* in pixels */

Re: Reference Book

2005-10-21 Thread John Cupitt
On 10/22/05, MEA-Mike.Friedrichs [EMAIL PROTECTED] wrote: I've been searching for reference books that address gtk 2.x and I can't find anything. Does anyone have some knowledge of a reference book for 2.x??? The gnome2 guide has a lot of material on gtk2, gobject, glib etc. The Official

Re: Building a GUI-Application

2005-10-19 Thread John Cupitt
Good advice with the GtkFixed. I would use a GtkLabel for the PDUs. You can't set the background colour of a label directly, since it does not have it's own window. Instead, put the label inside a GtkEventBox and set the background colour of the event box. The event box will also make it easy to

Re: stop on Gtk-WARNING

2005-10-17 Thread John Cupitt
On 10/17/05, Boncek, John [EMAIL PROTECTED] wrote: When a GTK app gets Gtk-WARNINGs without actually stopping, it can be hard to determine exactly where they're coming from. Is there a way to tell GTK to stop immediately on such a warning? This would allow using a debugger to localize the

Re: Gtk Xara

2005-10-17 Thread John Cupitt
On 10/17/05, Michael Torrie [EMAIL PROTECTED] wrote: On Mon, 2005-10-17 at 13:59 -0700, Colossus wrote: Tomaz Canabrava wrote: Since the Cairo rendering engine is *SLOW* and the Xara Extreme is being ported to linux, with the full API, i think that´s a good idia to port the Gtk engine

Re: z-order of gtk windows on win32

2005-10-10 Thread John Cupitt
On 10/3/05, Allin Cottrell [EMAIL PROTECTED] wrote: On Sun, 2 Oct 2005, Hubert Sokolowski wrote: On Sat, 1 Oct 2005 09:56:40 -0400 (EDT) Allin Cottrell [EMAIL PROTECTED] wrote: When the graph-editing dialog is closed, I expect the graph window to remain above the original, main window.

Re: Failure to allocate gtk object

2005-10-06 Thread John Cupitt
On 10/6/05, Nikolaj Kiær Thygesen [EMAIL PROTECTED] wrote: ... and after a number of years developing phones for the low-end market I'm very much used to the low-resource situation :o) I feel a slight discomfort from not checking pointer return values, but if it's to no avail

Re: [OT] How to add cairo linking and compilation flags to makefile ?

2005-10-05 Thread John Cupitt
On 10/5/05, Colossus [EMAIL PROTECTED] wrote: sorry for the OT. I upgraded to gtk 2.8 and cairo and obviously my glade makefile project doesn't contain -I/usr/include/cairo. I added manually to it in my_project/Makefile and my_project/src/Makefile but it doesn't work, I keep getting cairo.h

Re: [OT] How to add cairo linking and compilation flags to makefile ?

2005-10-05 Thread John Cupitt
On 10/5/05, Colossus [EMAIL PROTECTED] wrote: This is the content of Makefile.am: INCLUDES = \ -DPACKAGE_DATA_DIR=\$(datadir)\ \ -DPACKAGE_LOCALE_DIR=\$(prefix)/$(DATADIRNAME)/locale\ \ @PACKAGE_CFLAGS@ xarchiver_LDADD = @PACKAGE_LIBS@ Those are the two things

Re: gtk rendering order

2005-10-05 Thread John Cupitt
On 10/5/05, Kevin Brooks [EMAIL PROTECTED] wrote: With the double buffering turned on, any drawing is pushed onto a stack before the updated window is made visible. Is it possible to reverse the stack just before the flush in order to boost the performance? Unfortunately, the remove/add

Re: Re[2]: Border

2005-09-19 Thread John Cupitt
On 9/19/05, Alexander S.Kresin [EMAIL PROTECTED] wrote: And yet another question: are there any functions, which draws the standard header of a top window, so I could draw such a header for my container widget ? No, sorry :-( The window title bar and margins are not drawn by GTK,

Re: Border

2005-09-18 Thread John Cupitt
If you want to draw a focus rectangle, you can use gtk_paint_focus() in _expose(). You also need to use: gint focus_width; gint focus_pad; gtk_widget_style_get( widget, focus-line-width, focus_width, focus-padding, focus_pad,

Re: Very slow gdk_draw_pixbuf

2005-09-01 Thread John Cupitt
Hi Barry, I think there must be something rather broken with your GTK install. I changed your example like this: #ifdef DRAW_PIXBUF if (pixbuf == NULL) pixbuf = gdk_pixbuf_new_from_file((gchar *) mapserv.png, NULL); if (pixbuf) { GTimer *timer; timer = g_timer_new();

Re: GdkPixbuf and FIFO's

2005-08-22 Thread John Cupitt
On 8/22/05, Alex Levin [EMAIL PROTECTED] wrote: Hi everyone. I'm trying to pass a GdkPixbuf object through a FIFO from one thread to another. Does anyone have any code snippets which does something similar to this? Thanks in advance. If the two threads are in the same process, you could

Re: A springs and struts widget for GTK+

2005-08-16 Thread John Cupitt
On 8/16/05, Michael Torrie [EMAIL PROTECTED] wrote: Is this system similar to what QT uses? If I recall correctly, I remember trying to figure out how to use these spring-like things to do layout. It was very confusing and I never did figure out how to properly use them. I remember wishing

Re: pass the html file to a browser to open there

2005-08-13 Thread John Cupitt
On 8/13/05, Hubert Sokołowski [EMAIL PROTECTED] wrote: #ifdef __WIN32__ #define BROWSER explorer #else #define BROWSER firefox #endif void print_open (const gchar *path) { GError *error = NULL; gchar *s; s = g_strdup_printf (%s %s, BROWSER, path); if

Re: extracting a portion of a GdkPixmap

2005-08-09 Thread John Cupitt
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.

Re: time consuming function/loop

2005-08-05 Thread John Cupitt
On 8/5/05, Yogesh M [EMAIL PROTECTED] wrote: thank you for the useful information, is there a way i can give user an option to break the thread, like cancel button. I have a cancel button with a callback that sets a global variable to TRUE. The thread periodically checks this variable and if

Re: Scree Updating - Updating toooo soooow

2005-07-26 Thread John Cupitt
On 7/26/05, Przemysław Więckowski [EMAIL PROTECTED] wrote: Could you please tell me. What would be faster: directly putting prepared pixmap using gdk_draw_drawable(..) as rectangle or drawing rectangle using gdk_draw_rectangle(..)?? ( i heve't tested it so i ask...) Your choices are: 1)

Re: alpha for text?

2005-07-15 Thread John Cupitt
On 7/15/05, Paul Pogonyshev [EMAIL PROTECTED] wrote: Has anyone rendered text with alpha channel (i.e. semitransparent text) in GDK framework? So far my best solution is to render black on white to a GdkImage, get it back in a GdkPixbuf and then add color/transparency manually. Not actually

Re: alpha for text?

2005-07-15 Thread John Cupitt
Hi again, On 7/16/05, Paul Pogonyshev [EMAIL PROTECTED] wrote: John Cupitt wrote: On 7/15/05, Paul Pogonyshev [EMAIL PROTECTED] wrote: Has anyone rendered text with alpha channel (i.e. semitransparent text) in GDK framework? So far my best solution is to render black on white

Re: key_press_event for drawing area.

2005-07-04 Thread John Cupitt
On 7/4/05, Deekshit M [EMAIL PROTECTED] wrote: Is it possible to attach key_press_event for drawing_rea. That is the key pressed when the drawing_area has the focus. Yes, but it's more complicated than you think :-( You need to arrange for your drawing area to be focusable, and it has to

Re: Calling GTkFileChooserDialog from a GtkDialog

2005-06-22 Thread John Cupitt
On 6/22/05, Colossus [EMAIL PROTECTED] wrote: I have a dialog with a Gtk_entry and a button. I want to display a GtkFileChooserDialog when the user pushes the button from the GtkDialog; the choosen path should be displayed into the Gtk entry. How can I achieve this ? Perhaps:

Re: Calling GTkFileChooserDialog from a GtkDialog

2005-06-22 Thread John Cupitt
On 6/22/05, Colossus [EMAIL PROTECTED] wrote: John Cupitt wrote: http://developer.gnome.org/doc/API/2.0/gtk/GtkFileChooserButton.html Mmm but how can I have the gtk_entry automatically filled with the path choosen with GtkFileChooserButton ?? I'm calling the dialog who creates

Re: GtkTable : a bug in the doc ?

2005-05-13 Thread John Cupitt
Hi Olivier, On 5/13/05, Olivier [EMAIL PROTECTED] wrote: GtkWidget* gtk_table_new (guint rows, guint columns, gboolean homogeneous);

Re: A grid with gtk

2005-04-14 Thread John Cupitt
On 4/14/05, Stefan Kost [EMAIL PROTECTED] wrote: not really. GtkTreeView 1.) misses a selection mode for rectangualr areas. 2.) can't show row-headings (like the columns headers) Apart - anyone knows who is maintaing the TreeView widget and if possibly the one has becom less involved? Hi,

Re: Real Time Drawing

2005-03-16 Thread John Cupitt
On Wed, 16 Mar 2005 09:14:38 +, Athanasios Anastasiou [EMAIL PROTECTED] wrote: After some directions from Liam (see yesterdays mailing archive) i passed my app through valgrind and found out that there are too many errors happening in the GTK / X level. I suppose that it has something to

Re: Real Time Drawing

2005-03-15 Thread John Cupitt
Hi, On Tue, 15 Mar 2005 09:57:24 +, Athanasios Anastasiou [EMAIL PROTECTED] wrote: Also could it be better that i add an expose_event handler to the widget i want to draw and just post invalidate messages towards the widget from the thread? I do something similar in my app. I have a

Re: Using GObject library to create a lot of objects

2005-03-06 Thread John Cupitt
Hi, On Sat, 05 Mar 2005 14:38:08 -0300, Fabrício Barros Cabral [EMAIL PROTECTED] wrote: I'm thinking develop an application using the GObject library, but I have a dilemma: use or not use the GObject library. This application is object-oriented but will be able to create-use-destroy a lot of

Re: Button remains pressed until callback function ends

2005-02-16 Thread John Cupitt
On Wed, 16 Feb 2005 11:04:19 +0100, Michal Kepien [EMAIL PROTECTED] wrote: function is connected to the clicked event of a button. The problem is, the button stays pushed until the sound playing function finishes its work. I want the button to pop out immediately after it has been clicked

Re: Simulated keypress window focus

2005-02-16 Thread John Cupitt
On Wed, 16 Feb 2005 10:48:38 + (GMT), Andrew Gatt [EMAIL PROTECTED] wrote: I've recently been trying to implement a simulate keypress function, the function is activated by a command sent to the gui through a pipe, which is all working however the simulate keypress function never seems to

Re: odd shaped windows

2005-02-16 Thread John Cupitt
On Wed, 16 Feb 2005 10:02:26 -0800 (PST), Dave Andruczyk [EMAIL PROTECTED] wrote: Is it possible with gtk to display a window that doesn't have any window border, decorations, and be of arbritrary shape? You need gdk_window_shape_combine_region() or gdk_window_shape_combine_mask():