[Pkg-xfce-commits] r1302 - in goodies/xfce4-screenshooter-plugin/debian: . patches
ema at alioth.debian.org
ema at alioth.debian.org
Sun Jun 3 22:43:27 UTC 2007
Author: ema
Date: 2007-06-03 22:43:27 +0000 (Sun, 03 Jun 2007)
New Revision: 1302
Added:
goodies/xfce4-screenshooter-plugin/debian/patches/01_filename-generation.patch
goodies/xfce4-screenshooter-plugin/debian/patches/02_dont-save-on-cancel.patch
Removed:
goodies/xfce4-screenshooter-plugin/debian/patches/01_dont-save-on-cancel.patch
Modified:
goodies/xfce4-screenshooter-plugin/debian/changelog
Log:
Fix filename generation and #420242
Modified: goodies/xfce4-screenshooter-plugin/debian/changelog
===================================================================
--- goodies/xfce4-screenshooter-plugin/debian/changelog 2007-05-31 08:55:03 UTC (rev 1301)
+++ goodies/xfce4-screenshooter-plugin/debian/changelog 2007-06-03 22:43:27 UTC (rev 1302)
@@ -1,9 +1,13 @@
xfce4-screenshooter-plugin (1.0.0-3) UNRELEASED; urgency=low
+
+ (Yves-Alexis Perez)
+ * debian/control: update build-deps to Xfce 4.4.1.
+ * debian/copyright: update copyright holders.
- * debian/control: update build-deps to Xfce 4.4.1.
+ (Emanuele Rocca)
* debian/patches
- - add patch to not save if user chose not to. closes: #420242
- * debian/copyright: update copyright holders.
+ - Fixed filename generation.
+ - Avoid creating screenshots on 'Cancel'. closes: #420242
-- Yves-Alexis Perez <corsac at corsac.net> Fri, 25 May 2007 11:40:48 +0100
Deleted: goodies/xfce4-screenshooter-plugin/debian/patches/01_dont-save-on-cancel.patch
===================================================================
--- goodies/xfce4-screenshooter-plugin/debian/patches/01_dont-save-on-cancel.patch 2007-05-31 08:55:03 UTC (rev 1301)
+++ goodies/xfce4-screenshooter-plugin/debian/patches/01_dont-save-on-cancel.patch 2007-06-03 22:43:27 UTC (rev 1302)
@@ -1,11 +0,0 @@
---- panel-plugin/screenshooter.c.old 2006-04-23 19:12:15.000000000 +0200
-+++ panel-plugin/screenshooter.c 2007-04-21 09:03:14.000000000 +0200
-@@ -274,6 +274,8 @@
- if (gtk_dialog_run (GTK_DIALOG (sd->chooser)) == GTK_RESPONSE_ACCEPT)
- {
- filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(sd->chooser));
-+ } else {
-+ g_free(filename);
- }
- gtk_widget_hide (GTK_WIDGET (sd->chooser));
- }
Added: goodies/xfce4-screenshooter-plugin/debian/patches/01_filename-generation.patch
===================================================================
--- goodies/xfce4-screenshooter-plugin/debian/patches/01_filename-generation.patch (rev 0)
+++ goodies/xfce4-screenshooter-plugin/debian/patches/01_filename-generation.patch 2007-06-03 22:43:27 UTC (rev 1302)
@@ -0,0 +1,19 @@
+--- panel-plugin/screenshooter.c.old 2007-06-03 23:16:08.000000000 +0200
++++ panel-plugin/screenshooter.c 2007-06-04 00:14:53.000000000 +0200
+@@ -199,7 +199,7 @@
+ if(uri == NULL)
+ return NULL;
+ file_name = g_strdup ("Screenshot.png");
+- if((test=open(file_name,O_RDWR,MODE))==-1)
++ if((test=open(g_build_filename(uri, file_name, NULL),O_RDWR,MODE))==-1)
+ {
+ return file_name;
+ }
+@@ -208,7 +208,7 @@
+ g_free (file_name);
+ file_name = g_strdup_printf ("Screenshot-%d.png",i);
+ }
+- while((test=open(file_name,O_RDWR,MODE))!=-1);
++ while((test=open(g_build_filename(uri, file_name, NULL),O_RDWR,MODE))!=-1);
+
+ return file_name;
Added: goodies/xfce4-screenshooter-plugin/debian/patches/02_dont-save-on-cancel.patch
===================================================================
--- goodies/xfce4-screenshooter-plugin/debian/patches/02_dont-save-on-cancel.patch (rev 0)
+++ goodies/xfce4-screenshooter-plugin/debian/patches/02_dont-save-on-cancel.patch 2007-06-03 22:43:27 UTC (rev 1302)
@@ -0,0 +1,37 @@
+--- panel-plugin/screenshooter.c.old 2007-06-03 23:16:08.000000000 +0200
++++ panel-plugin/screenshooter.c 2007-06-04 00:14:53.000000000 +0200
+@@ -227,6 +227,7 @@
+
+ gint width;
+ gint height;
++ gint dialog_response;
+
+ gchar * filename = NULL;
+ gchar * basename = NULL;
+@@ -266,12 +267,14 @@
+
+ gtk_image_set_from_pixbuf (GTK_IMAGE (sd->preview), thumbnail);
+ g_object_unref (thumbnail);
+- filename = generate_filename_for_uri (xfce_file_chooser_get_current_folder(XFCE_FILE_CHOOSER (sd->chooser)));
++ filename = generate_filename_for_uri (xfce_file_chooser_get_current_folder(XFCE_FILE_CHOOSER (sd->chooser)));
+
+ if (sd->ask_for_file && filename)
+ {
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (sd->chooser), filename);
+- if (gtk_dialog_run (GTK_DIALOG (sd->chooser)) == GTK_RESPONSE_ACCEPT)
++
++ dialog_response = gtk_dialog_run (GTK_DIALOG (sd->chooser));
++ if (dialog_response == GTK_RESPONSE_ACCEPT)
+ {
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(sd->chooser));
+ }
+@@ -289,7 +292,8 @@
+ }
+
+ if (filename) {
+- gdk_pixbuf_save (screenshot, filename, "png", NULL, NULL);
++ if (!(sd->ask_for_file) || dialog_response == GTK_RESPONSE_ACCEPT)
++ gdk_pixbuf_save (screenshot, filename, "png", NULL, NULL);
+ g_free (filename);
+ }
+ }
More information about the Pkg-xfce-commits
mailing list