Commit 6fb64e0a authored by Richard Schwarting's avatar Richard Schwarting Committed by Felix Riemann

Add Postasa plugin allowing uploads to PicasaWeb

This new plugin supports uploading images to PicasaWeb using libgdata.
It requires the yet unreleased libgdata-0.6.0, but it should be out in
time. See bug #600190.
parent 74951e03
......@@ -60,9 +60,9 @@ EOG_HAS_PYTHON=1
AC_MSG_CHECKING([which plugins to build])
ALL_PLUGINS="postr map fit-to-width exif-display send-by-mail"
USEFUL_PLUGINS="postr map fit-to-width exif-display send-by-mail"
DEFAULT_PLUGINS="postr map fit-to-width exif-display send-by-mail"
ALL_PLUGINS="postr map fit-to-width exif-display send-by-mail postasa"
USEFUL_PLUGINS="postr map fit-to-width exif-display send-by-mail postasa"
DEFAULT_PLUGINS="postr map fit-to-width exif-display send-by-mail postasa"
PYTHON_ALL_PLUGINS="slideshowshuffle pythonconsole"
PYTHON_USEFUL_PLUGINS="slideshowshuffle pythonconsole"
......@@ -82,7 +82,7 @@ AC_ARG_WITH([plugins],
[AS_HELP_STRING([--with-plugins=LIST],
[Comma-separated list specifying the plugins to build.
Available: map, exif-display, fit-to-width,
postr, pythonconsole, slideshowshuffle,
postr, postasa, pythonconsole, slideshowshuffle,
as well as the aliases default,
all, and really-all])],
[plugins=$with_plugins],
......@@ -289,6 +289,23 @@ then
fi
fi
# *******
# Postasa
# *******
plugin_defined postasa
if test "$?" = 1
then
PKG_CHECK_MODULES(POSTASA,
[ libgdata >= 0.6.0 ],
[],[have_postasa=no])
AC_SUBST(POSTASA_LIBS)
AC_SUBST(POSTASA_CFLAGS)
if test "x$have_postasa" = "xno"
then
undef_plugin postasa "libgdata was not found"
fi
fi
# ***
# Map
# ***
......@@ -356,6 +373,7 @@ plugins/exif-display/Makefile
plugins/send-by-mail/Makefile
plugins/slideshowshuffle/Makefile
plugins/postr/Makefile
plugins/postasa/Makefile
plugins/pythonconsole/Makefile
po/Makefile.in])
......
# Postasa plugin
plugindir = $(libdir)/eog/plugins
INCLUDES = \
-I$(top_srcdir) \
$(EOG_CFLAGS) \
$(WARN_CFLAGS) \
$(POSTASA_CFLAGS) \
-DEOG_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DEOG_PLUGINDIR=\""$(plugindir)"\"
plugin_LTLIBRARIES = libpostasa.la
libpostasa_la_SOURCES = \
eog-postasa-plugin.h \
eog-postasa-plugin.c
libpostasa_la_LDFLAGS = \
$(PLUGIN_LIBTOOL_FLAGS) \
$(EOG_LIBS)
libpostasa_la_LIBADD = $(EOG_LIBS) \
$(POSTASA_LIBS)
# Plugin Info
plugin_in_files = postasa.eog-plugin.desktop.in
UI_FILES = postasa-config.xml postasa-uploads.xml default.png
ui_DATA = $(UI_FILES)
uidir = $(plugindir)/postasa
%.eog-plugin: %.eog-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(AM_V_GEN)$(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
plugin_DATA = $(plugin_in_files:.eog-plugin.desktop.in=.eog-plugin)
EXTRA_DIST = $(plugin_in_files) $(UI_FILES)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
-include $(top_srcdir)/git.mk
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* Postasa -- PicasaWeb Uploader plugin
*
* Copyright (C) 2009 The Free Software Foundation
*
* Author: Richard Schwarting <aquarichy@gmail.com>
* Initially based on Postr code by: Lucas Rocha
*
* 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 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.
*/
#ifndef __EOG_POSTASA_PLUGIN_H__
#define __EOG_POSTASA_PLUGIN_H__
#include <glib.h>
#include <glib-object.h>
#include <eog/eog-plugin.h>
G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
#define EOG_TYPE_POSTASA_PLUGIN (eog_postasa_plugin_get_type ())
#define EOG_POSTASA_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EOG_TYPE_POSTASA_PLUGIN, EogPostasaPlugin))
#define EOG_POSTASA_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EOG_TYPE_POSTASA_PLUGIN, EogPostasaPluginClass))
#define EOG_IS_POSTASA_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EOG_TYPE_POSTASA_PLUGIN))
#define EOG_IS_POSTASA_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EOG_TYPE_POSTASA_PLUGIN))
#define EOG_POSTASA_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EOG_TYPE_POSTASA_PLUGIN, EogPostasaPluginClass))
/* Private structure type */
typedef struct _EogPostasaPluginPrivate EogPostasaPluginPrivate;
/*
* Main object structure
*/
typedef struct _EogPostasaPlugin EogPostasaPlugin;
struct _EogPostasaPlugin
{
EogPlugin parent_instance;
EogPostasaPluginPrivate *priv;
};
/*
* Class definition
*/
typedef struct _EogPostasaPluginClass EogPostasaPluginClass;
struct _EogPostasaPluginClass
{
EogPluginClass parent_class;
};
/*
* Public methods
*/
GType eog_postasa_plugin_get_type (void) G_GNUC_CONST;
/* All the plugins must implement this function */
G_MODULE_EXPORT GType register_eog_plugin (GTypeModule *module);
G_END_DECLS
#endif /* __EOG_POSTASA_PLUGIN_H__ */
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="postasa_login_dialog">
<property name="height_request">150</property>
<property name="border_width">5</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkVBox" id="login_box">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="title">
<property name="visible">True</property>
<property name="ypad">6</property>
<property name="label" translatable="yes">PicasaWeb Login</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="username_hbox">
<property name="width_request">300</property>
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="username_label">
<property name="width_request">60</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Username</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="username_entry">
<property name="width_request">240</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="password_hbox">
<property name="width_request">300</property>
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="password_label">
<property name="width_request">60</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Password</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="password_entry">
<property name="width_request">240</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">&#x25CF;</property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="login_message">
<property name="visible">True</property>
<property name="ypad">7</property>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="button_box">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="login_button">
<property name="label" translatable="yes">Login</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">cancel_button</action-widget>
<action-widget response="-1">login_button</action-widget>
</action-widgets>
</object>
</interface>
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkListStore" id="uploads_store">
<columns>
<!-- column-name thumbnail -->
<column type="GdkPixbuf"/>
<!-- column-name filepath -->
<column type="gchararray"/>
<!-- column-name size -->
<column type="gchararray"/>
<!-- column-name upload_status -->
<column type="guint"/>
<!-- column-name cancellable -->
<column type="GObject"/>
<!-- column-name upload_message -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkWindow" id="uploads_window">
<property name="width_request">550</property>
<property name="height_request">250</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="uploads_label">
<property name="height_request">0</property>
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="ypad">10</property>
<property name="label" translatable="yes">Uploads:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="resize_mode">queue</property>
<child>
<object class="GtkTreeView" id="uploads_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">uploads_store</property>
<child>
<object class="GtkTreeViewColumn" id="file_col">
<property name="title">File</property>
<property name="expand">True</property>
<child>
<object class="GtkCellRendererPixbuf" id="thumbnail_cell"/>
<attributes>
<attribute name="pixbuf">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText" id="filepath_cell">
<property name="ellipsize">start</property>
</object>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="size_col">
<property name="sizing">fixed</property>
<property name="fixed_width">60</property>
<property name="title">Size</property>
<child>
<object class="GtkCellRendererText" id="size_cell"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="progress_col">
<property name="min_width">160</property>
<property name="title">Status</property>
<child>
<object class="GtkCellRendererProgress" id="progress_cell"/>
<attributes>
<attribute name="pulse">3</attribute>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<child>
<object class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="spacing">10</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">Cancel Selected</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel_all_button">
<property name="label" translatable="yes">Cancel All</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">10</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="padding">10</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
[Eog Plugin]
Module=postasa
IAge=2
_Name=PicasaWeb Uploader
Icon=postasa
_Description=Upload your pictures to PicasaWeb
Authors=Richard Schwarting <aquarichy@gmail.com>
Copyright=Copyright © 2009 Richard Schwarting
Website=http://www.gnome.org/projects/eog
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment