[Goodies-commits] r6157 - xfce4-screenshooter-plugin/trunk/lib

Jerome Guelfucci jeromeg at xfce.org
Sat Nov 22 14:23:57 CET 2008


Author: jeromeg
Date: 2008-11-22 13:23:57 +0000 (Sat, 22 Nov 2008)
New Revision: 6157

Added:
   xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.c
   xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.h
Log:
Add the two missing files.

Added: xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.c	                        (rev 0)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.c	2008-11-22 13:23:57 UTC (rev 6157)
@@ -0,0 +1,54 @@
+/*  $Id$
+ *
+ *  Copyright © 2008 Jérôme Guelfucci <jerome.guelfucci at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * */
+
+#include "screenshooter-actions.h"
+
+void screenshooter_take_and_output_screenshot (ScreenshotData *sd)
+{
+  GdkPixbuf *screenshot = 
+    screenshooter_take_screenshot (sd->mode, sd->delay);
+  
+  if (sd->action == SAVE)
+    {
+      screenshooter_save_screenshot (screenshot, 
+                                     sd->show_save_dialog, 
+                                     sd->screenshot_dir);
+    }
+  else if (sd->action == CLIPBOARD)
+    {
+      screenshooter_copy_to_clipboard (screenshot);
+    }
+  #ifdef HAVE_GIO
+  else
+    {
+      gchar *screenshot_path =
+        screenshooter_save_screenshot (screenshot, 
+                                       sd->show_save_dialog, 
+                                       sd->screenshot_dir);
+      if (screenshot_path != NULL)
+        {
+          screenshooter_open_screenshot (screenshot_path, sd->app);
+          g_free (screenshot_path);
+        }
+    }
+  #endif
+  
+  g_object_unref (screenshot);
+}
+      

Added: xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.h
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.h	                        (rev 0)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-actions.h	2008-11-22 13:23:57 UTC (rev 6157)
@@ -0,0 +1,23 @@
+/*  $Id$
+ *
+ *  Copyright © 2008 Jérôme Guelfucci <jerome.guelfucci at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * */
+
+#include "screenshooter-utils.h"
+#include "screenshooter-dialogs.h"
+
+void screenshooter_take_and_output_screenshot (ScreenshotData *sd);




More information about the Goodies-commits mailing list