How to get GtkImage resize of widget container?

2009-03-14 Thread Luis Gonzalez
Hi, I have a GtkImage inside GtkViewport. I want that GTKImage resize with the width/height of the widget container. I try to use gtk_widget_size_request method of the widget but it hasn't the actually width. Anyway to get GtkImage automatically fit width/heigth to adjust to widget container?

Re: How to get GtkImage resize of widget container?

2009-03-14 Thread Dov Grobgeld
No, GtkImage doesn't resize the pixbuf automatically for you. You will have to do it manually whenever you get a resize event. Thus you will need to store your original image in an off screen GdkPixbuf, and on an resize event create a resized copy through gdk_pixbuf_scale_simple() that you then

signals returning results

2009-03-14 Thread jcupitt
Hi all, I'd like to make a signal that can return a bool result. I've defined it with: progress_signals[SIG_UPDATE] = g_signal_new( update, G_OBJECT_CLASS_TYPE( class ), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET( ProgressClass, begin ),

show signal problem

2009-03-14 Thread Perriman
Hi all!!! I have a problem with show signal. I have a window and I need to change its size and position before showing it. Currently if I do: 1.- set the label text 2.- set the window size (based on label text) 3.- move the window 4.- show the window All works fine but if I have

Re: fsync in glib/gio

2009-03-14 Thread Alexander Larsson
On Fri, 2009-03-13 at 18:20 -0600, Federico Mena Quintero wrote: On Fri, 2009-03-13 at 22:16 +0100, Alexander Larsson wrote: Its well explained in the various discussions about this. Essentially, the metadata for the rename is written to disk, but the data in the file is not (yet, due to

Re: fsync in glib/gio

2009-03-14 Thread Alexander Larsson
On Fri, 2009-03-13 at 14:34 -0700, Brian J. Tarricone wrote: Now, we don't actually really need the data to be on the disk at a certain time. On the contrary, its really fine if its delayed. But, what we want is either the old file in place, or the new file in place, not the old file

Re: fsync in glib/gio

2009-03-14 Thread Mark Mielke
Alexander Larsson wrote: 2) such filesystems are broken Clearly the answer to 1 is yes. Anything else would be a disservice to our users data. However, that doesn't mean such filesystems aren't broken, in the sense that I would never let a filesystem like that near any of my data. For

Re: fsync in glib/gio

2009-03-14 Thread Alexander Larsson
On Sat, 2009-03-14 at 13:38 -0400, Mark Mielke wrote: Should sed -i use fsync()? If it is promising atomic-change-in-place, then it certainly should. This is the same kind of reasoning that says its ok to do something because its specified by posix. If its not defined somewhere that sed -i

Re: fsync in glib/gio

2009-03-14 Thread Alexander Larsson
On Sat, 2009-03-14 at 19:21 +0100, Alexander Larsson wrote: We all understand that its is per-spec to not guarantee data-before-metadata on rename, we're not stupid and able to read a manpage as well as you. But we still think its a bad idea and not a sign of robust software. Additionally,

Re: fsync in glib/gio

2009-03-14 Thread Brian J. Tarricone
On Sat, 14 Mar 2009 13:16:45 +0100 Alexander Larsson wrote: On Fri, 2009-03-13 at 14:34 -0700, Brian J. Tarricone wrote: I think you are conflating two issues. No, I don't think I am. I think I'm just replying to a subset of the email that's slightly off topic. Or rather, the fact that I'm

Re: fsync in glib/gio

2009-03-14 Thread Mark Mielke
Alexander Larsson wrote: On Sat, 2009-03-14 at 19:21 +0100, Alexander Larsson wrote: We all understand that its is per-spec to not guarantee data-before-metadata on rename, we're not stupid and able to read a manpage as well as you. But we still think its a bad idea and not a sign of robust

Re: fsync in glib/gio

2009-03-14 Thread Mark Mielke
Alexander Larsson wrote: On Sat, 2009-03-14 at 13:38 -0400, Mark Mielke wrote: Should sed -i use fsync()? If it is promising atomic-change-in-place, then it certainly should. This is the same kind of reasoning that says its ok to do something because its specified by posix. If its not

Re: fsync in glib/gio

2009-03-14 Thread Morten Welinder
This is crazy. People are actually advocating that thousands upon thousands of applications need to be changed. Yes, POSIX allows this particular idiotic behaviour. So what? It probably also allows free() to do nothing, yet no-one in their right mind would want that. Or maybe you would be

Re: fsync in glib/gio

2009-03-14 Thread Brian J. Tarricone
On Sat, 14 Mar 2009 20:10:32 -0400 Morten Welinder wrote: This is crazy. People are actually advocating that thousands upon thousands of applications need to be changed. If they're behaving incorrectly, yes. But I don't think most of them are. The only case where *not* doing an fsync()

Re: fsync in glib/gio

2009-03-14 Thread Mark Mielke
Morten Welinder wrote: This is crazy. People are actually advocating that thousands upon thousands of applications need to be changed. No. The crazy part is that people care so much at all. Nobody cared a year ago - why care today? This isn't a *new* problem in any way. The question as

Re: fsync in glib/gio

2009-03-14 Thread Freddie Unpenstein
From: Brian J. Tarricone, Date: 15/03/2009 07:31 That sounds pretty awful, to me, to be honest. So every FS -- no, wait -- every FS that's going to be pushed as a mainstream FS -- is going to have to be closely monitored to make sure it doesn't have this behavior? Everyone's going to be