[Xfce4-commits] r17677 - xfce4-panel/branches/experimental/plugins/launcher
Brian J. Tarricone
bjt23 at cornell.edu
Mon Sep 19 03:17:16 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey Danny,
On 9/18/2005 11:41 AM, Danny Milosavljevic wrote:
>
> Modified: xfce4-panel/branches/experimental/plugins/launcher/launcher-dialog.c
> ===================================================================
> --- xfce4-panel/branches/experimental/plugins/launcher/launcher-dialog.c 2005-09-18 17:38:59 UTC (rev 17676)
> +++ xfce4-panel/branches/experimental/plugins/launcher/launcher-dialog.c 2005-09-18 18:41:37 UTC (rev 17677)
> @@ -1504,14 +1504,18 @@
> * ----------------
> */
> static void
> -update_preview (XfceFileChooser *chooser, gpointer data)
> +update_preview_cb (GtkFileChooser *chooser, gpointer data)
> {
> 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;
> + }
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.
-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFDLhGc6XyW6VEeAnsRAuEeAJ9S6fBXY55KBUtv/6J+d8kOeNfuawCfSuGz
nVn0MYqh7RLr8xfnElSjpME=
=Kkmg
-----END PGP SIGNATURE-----
More information about the Xfce4-dev
mailing list