[glide] Add support for exporting to a directory of images
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Add support for exporting to a directory of images
- Date: Tue, 27 Apr 2010 00:05:52 +0000 (UTC)
commit 859c72044b37ae5b76c4e6803e0927350e631f7a
Author: Robert Carr <racarr Valentine localdomain>
Date: Mon Apr 26 20:04:30 2010 -0400
Add support for exporting to a directory of images
data/ui/glide-window.ui | 35 +++++++++++++++++++++++++++++++----
src/Makefile.am | 4 +++-
src/glide-window.c | 11 +++++++++++
3 files changed, 45 insertions(+), 5 deletions(-)
---
diff --git a/data/ui/glide-window.ui b/data/ui/glide-window.ui
index 8108e0d..d02017a 100644
--- a/data/ui/glide-window.ui
+++ b/data/ui/glide-window.ui
@@ -52,12 +52,32 @@
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="export-pdf-menuitem">
+ <object class="GtkMenuItem" id="Export to...">
<property name="visible">True</property>
- <property name="related_action">pdf-export-action</property>
- <property name="use_action_appearance">True</property>
+ <property name="label" translatable="yes">Export to...</property>
<property name="use_underline">True</property>
- <property name="use_stock">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="menu1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImageMenuItem" id="export-pdf-menuitem">
+ <property name="visible">True</property>
+ <property name="related_action">pdf-export-action</property>
+ <property name="use_action_appearance">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="export-image-menuitem">
+ <property name="visible">True</property>
+ <property name="related_action">png-export-action</property>
+ <property name="use_action_appearance">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -817,4 +837,11 @@
<property name="sensitive">False</property>
<signal name="activate" handler="glide_window_export_pdf_action_activate"/>
</object>
+ <object class="GtkAction" id="png-export-action">
+ <property name="label">Export to image directory</property>
+ <property name="short_label">Export to image directory</property>
+ <property name="tooltip">Export the current document to a directory of images</property>
+ <property name="sensitive">False</property>
+ <signal name="activate" handler="glide_window_export_png_action_activate"/>
+ </object>
</interface>
diff --git a/src/Makefile.am b/src/Makefile.am
index ef94359..1748277 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,7 +55,9 @@ glide_SOURCES = \
glide-pdf-exporter.c \
glide-pdf-exporter.h \
glide-cairo-util.c \
- glide-cairo-util.h
+ glide-cairo-util.h \
+ glide-png-exporter.c \
+ glide-png-exporter.h
glide_LDFLAGS = \
-Wl,--export-dynamic
diff --git a/src/glide-window.c b/src/glide-window.c
index aa207bf..4eac1cb 100644
--- a/src/glide-window.c
+++ b/src/glide-window.c
@@ -43,6 +43,7 @@
#include "glide-dirs.h"
#include "glide-pdf-exporter.h"
+#include "glide-png-exporter.h"
#define GLIDE_WINDOW_UI_OBJECT(w, obj) (gtk_builder_get_object (w->priv->builder, obj))
@@ -139,6 +140,7 @@ glide_window_enable_document_actions (GlideWindow *w)
glide_window_enable_action (w, "background-action");
glide_window_enable_action (w, "save-action");
glide_window_enable_action (w, "pdf-export-action");
+ glide_window_enable_action (w, "png-export-action");
glide_window_enable_widget (w, "animation-combobox");
glide_window_enable_widget (w, "text-color-button");
@@ -1389,6 +1391,15 @@ glide_window_export_pdf_action_activate (GtkAction *action,
glide_pdf_exporter_export (w->priv->document);
}
+void
+glide_window_export_png_action_activate (GtkAction *action,
+ gpointer user_data)
+{
+ GlideWindow *w = (GlideWindow *)user_data;
+
+ glide_png_exporter_export (w->priv->document);
+}
+
gboolean
glide_window_delete_event_cb (GtkWidget *w,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]