Updating branch refs/heads/master to d4a422d6865f05707129521ca0d5dacd1e4d97b1 (commit) from 7c44fe88bfb2ecd3565aef606817e31c753d8951 (commit)
commit d4a422d6865f05707129521ca0d5dacd1e4d97b1 Author: David Mohr <da...@mcbf.net> Date: Sun Jul 29 20:17:28 2012 -0600 Remember last image. xfburn/xfburn-burn-image-dialog.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/xfburn/xfburn-burn-image-dialog.c b/xfburn/xfburn-burn-image-dialog.c index f14dc93..0ca304f 100644 --- a/xfburn/xfburn-burn-image-dialog.c +++ b/xfburn/xfburn-burn-image-dialog.c @@ -76,8 +76,11 @@ typedef struct gulong handler_volchange; ThreadBurnIsoParams *params; + } XfburnBurnImageDialogPrivate; +static gchar * last_file = NULL; + /* prototypes */ static void xfburn_burn_image_dialog_class_init (XfburnBurnImageDialogClass * klass); static void xfburn_burn_image_dialog_init (XfburnBurnImageDialog * sp); @@ -173,6 +176,10 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (priv->chooser_image), filter); gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (priv->chooser_image), filter); + if (last_file) { + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (priv->chooser_image), last_file); + } + frame = xfce_gtk_frame_box_new_with_content (_("Image to burn"), priv->chooser_image); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -459,8 +466,10 @@ check_burn_button (XfburnBurnImageDialog * dialog) g_object_get (G_OBJECT (priv->device_box), "valid", &valid_disc, NULL); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (priv->chooser_image)); if (filename != NULL) { + if (last_file) + g_free (last_file); + last_file = filename; gtk_widget_set_sensitive (priv->burn_button, valid_disc); - g_free (filename); } else { gtk_widget_set_sensitive (priv->burn_button, FALSE); } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits