[Xfce4-commits] r17677 - xfce4-panel/branches/experimental/plugins/launcher

Jasper Huijsmans jasper at xfce.org
Mon Sep 19 10:01:09 CEST 2005


A few more comments...

>> static void
>>-update_preview (XfceFileChooser *chooser, gpointer data)
>>+update_preview_cb (GtkFileChooser *chooser, gpointer data)

Why the name change?

>> {
>>     GtkImage *preview;
>>     char *filename;
>>     GdkPixbuf *pb = NULL;
>>     
>>     preview = GTK_IMAGE(data);
>>-    filename = xfce_file_chooser_get_filename(chooser);
>>+    filename = gtk_file_chooser_get_filename(chooser);
>>+    if (!filename) {
>>+      gtk_image_clear(preview); /* 2.8 only ... FIXME. but how ? */
>>+      return;
>>+    }
> 

What's wrong with just setting a NULL pixbuf, like it did?

> 
> The correct thing to do here if there's no filename (or if the file
> isn't an image, in this case), is to call
> gtk_file_chooser_set_preview_widget_active() to disable the preview.
> 

That makes the dialog change size all the time, doesn't it? I don't want 
that.

	Jasper



More information about the Xfce4-dev mailing list