[gedit-plugins/wip/zeitgeist-from-gedit] plugins: add zeitgeist plugin from 'gedit' project



commit 0da6f011d6f9aa681d54ce0bca54f1066a75a846
Author: Igor Gnatenko <i gnatenko brain gmail com>
Date:   Wed Jun 18 03:01:11 2014 +0400

    plugins: add zeitgeist plugin from 'gedit' project
    
    Reference: https://bugzilla.gnome.org/show_bug.cgi?id=731799
    Signed-off-by: Igor Gnatenko <i gnatenko brain gmail com>

 configure.ac                                      |   17 +
 help/C/zeitgeist-dataprovider.page                |   37 +++
 help/Makefile.am                                  |    3 +-
 plugins/Makefile.am                               |    5 +-
 plugins/zeitgeist/Makefile.am                     |   33 ++
 plugins/zeitgeist/gedit-zeitgeist-plugin.c        |  350 +++++++++++++++++++++
 plugins/zeitgeist/gedit-zeitgeist-plugin.h        |   65 ++++
 plugins/zeitgeist/gedit-zeitgeist.metainfo.xml.in |   13 +
 plugins/zeitgeist/zeitgeist.plugin.desktop.in     |    9 +
 po/POTFILES.in                                    |    2 +
 10 files changed, 532 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ba5612b..f1b89f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,22 @@ then
        else
                disabled_plugins="$disabled_plugins git"
        fi
+
+       dnl ================================================================
+       dnl zeitgeist (libzeitgeist)
+       dnl ================================================================
+       LIBZEITGEIST_REQUIRED=0.9.12
+       PKG_CHECK_MODULES([ZEITGEIST], \
+               [zeitgeist-2.0 >= $LIBZEITGEIST_REQUIRED],
+               [have_zeitgeist=yes],
+               [have_zeitgeist=no])
+
+       if test "x$have_zeitgeist" = "xyes"; then
+               PLUGINS="$PLUGINS zeitgeist"
+       else
+               disabled_plugins="$disabled_plugins zeitgeist"
+       fi
+
 else
        disabled_plugins="$disabled_plugins $PY_PLUGINS synctex vte git (python not found)"
 fi
@@ -164,6 +180,7 @@ fi
 AM_CONDITIONAL([ENABLE_SYNCTEX], test "x$have_synctex" = "xyes")
 AM_CONDITIONAL([ENABLE_TERMINAL], test "x$have_vte" = "xyes")
 AM_CONDITIONAL([ENABLE_GIT], test "x$have_git2" = "xyes")
+AM_CONDITIONAL([ENABLE_ZEITGEIST], test "x$have_zeitgeist" = "xyes")
 
 AC_SUBST(PLUGINS)
 
diff --git a/help/C/zeitgeist-dataprovider.page b/help/C/zeitgeist-dataprovider.page
new file mode 100644
index 0000000..62423bd
--- /dev/null
+++ b/help/C/zeitgeist-dataprovider.page
@@ -0,0 +1,37 @@
+<page xmlns="http://projectmallard.org/1.0/";
+      type="topic" style="task"
+      id="plugin-zeitgeist-dataprovider">
+
+  <info>
+    <link type="guide" xref="gedit-plugin-guide#gedit-additional-plugins"/>
+    <revision pkgversion="3.8" date="2011-08-17" status="review"/>
+
+    <credit type="author">
+      <name>Shobha Tyagi</name>
+      <email>tyagishobha gmail com</email>
+    </credit>
+
+    <desc>Log user activity for documents which are opened in gedit</desc>
+  </info>
+
+  <title>Zeitgeist dataprovider</title>
+
+  <p>Zeitgeist is a service that logs user activities and events.  Zeitgeist
+  lets other applications access this information in the form of statistics and
+  timelines.The Zeitgeist dataprovider plugin for <app>gedit</app> records user
+  activity for documents used with gedit giving easy access to recently-used
+  and frequently-used files.</p>
+
+  <steps>
+    <title>Enable Zeitgeist dataprovider</title>
+    <item>
+      <p>Select <guiseq><gui style="menu">gedit</gui>
+      <gui style="menuitem">Preferences</gui>
+      <gui style="tab">Plugins</gui></guiseq>.</p>
+    </item>
+    <item>
+       <p>Select <gui style="menuitem">Zietgeist Dataprovider</gui>.</p>
+    </item>
+  </steps>
+
+</page>
diff --git a/help/Makefile.am b/help/Makefile.am
index 40e7da6..ca8dac9 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -19,7 +19,8 @@ HELP_FILES = \
        session-saver.page \
        terminal.page \
        text-size.page \
-       word-completion.page
+       word-completion.page \
+       zeitgeist-dataprovider.page
 
 HELP_MEDIA =
 
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index b83f644..2858e34 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -9,6 +9,7 @@ plugin_in_files =
 dist_plugin_in_files =
 appdatadir = $(datadir)/appdata/
 appdata_in_files =
+dist_appdata_in_files =
 gsettings_SCHEMAS =
 dist_gsettings_SCHEMAS =
 
@@ -29,6 +30,7 @@ include plugins/synctex/Makefile.am
 include plugins/terminal/Makefile.am
 include plugins/textsize/Makefile.am
 include plugins/wordcompletion/Makefile.am
+include plugins/zeitgeist/Makefile.am
 
 @INTLTOOL_XML_NOMERGE_RULE@
 @GSETTINGS_RULES@
@@ -56,7 +58,8 @@ CLEANFILES +=                         \
 EXTRA_DIST +=                                                          \
        plugins/gpdefs.py.in                                            \
        $(plugin_in_files)                                              \
-       $(appdata_in_files)                                             \
        $(dist_plugin_in_files)                                         \
+       $(appdata_in_files)                                             \
+       $(dist_appdata_in_files)                                        \
        $(gsettings_SCHEMAS:%.gschema.xml=%.gschema.xml.in.in)          \
        $(dist_gsettings_SCHEMAS:%.gschema.xml=%.gschema.xml.in.in)
diff --git a/plugins/zeitgeist/Makefile.am b/plugins/zeitgeist/Makefile.am
new file mode 100644
index 0000000..7cf45b1
--- /dev/null
+++ b/plugins/zeitgeist/Makefile.am
@@ -0,0 +1,33 @@
+if ENABLE_ZEITGEIST
+
+plugin_LTLIBRARIES += plugins/zeitgeist/libzeitgeist.la
+
+plugins_zeitgeist_libzeitgeist_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+plugins_zeitgeist_libzeitgeist_la_LIBADD =     \
+       $(top_builddir)/gedit/libgedit.la       \
+       $(GEDIT_LIBS)                           \
+       $(ZEITGEIST_LIBS)
+plugins_zeitgeist_libzeitgeist_la_CPPFLAGS = -I$(top_srcdir)
+plugins_zeitgeist_libzeitgeist_la_CFLAGS =                     \
+       $(GEDIT_CFLAGS)                                 \
+       $(ZEITGEIST_CFLAGS)                             \
+       $(WARN_CFLAGS)                                  \
+       $(DISABLE_DEPRECATED_CFLAGS)
+
+plugins_zeitgeist_libzeitgeist_la_SOURCES =            \
+       plugins/zeitgeist/gedit-zeitgeist-plugin.h      \
+       plugins/zeitgeist/gedit-zeitgeist-plugin.c
+
+EXTRA_DIST += $(zeitgeist_resource_deps)
+
+plugin_in_files += plugins/zeitgeist/zeitgeist.plugin.desktop.in
+
+appstream_in_files += plugins/zeitgeist/gedit-zeitgeist.metainfo.xml.in
+
+else
+
+dist_plugin_in_files += plugins/zeitgeist/zeitgeist.plugin.desktop.in
+
+dist_appstream_in_files += plugins/zeitgeist/gedit-zeitgeist.metainfo
+
+endif
diff --git a/plugins/zeitgeist/gedit-zeitgeist-plugin.c b/plugins/zeitgeist/gedit-zeitgeist-plugin.c
new file mode 100644
index 0000000..b5dcc07
--- /dev/null
+++ b/plugins/zeitgeist/gedit-zeitgeist-plugin.c
@@ -0,0 +1,350 @@
+/*
+ * gedit-zeitgeist-plugin.c
+ * This file is part of gedit
+ *
+ * Copyright (C) 2011 - Michal Hruby
+ *
+ * gedit 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.
+ *
+ * gedit 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 gedit; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA  02110-1301  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "gedit-zeitgeist-plugin.h"
+
+#include <glib/gi18n.h>
+#include <gmodule.h>
+
+#include <gedit/gedit-view.h>
+#include <gedit/gedit-view-activatable.h>
+#include <gedit/gedit-app.h>
+#include <gedit/gedit-app-activatable.h>
+#include <gedit/gedit-debug.h>
+#include <zeitgeist.h>
+
+enum
+{
+       SIGNAL_DOC_SAVED,
+       SIGNAL_DOC_LOADED,
+
+       N_SIGNALS
+};
+
+struct _GeditZeitgeistPluginPrivate
+{
+       GeditView *view;
+       GeditApp  *app;
+
+       gulong     signals[N_SIGNALS];
+};
+
+enum
+{
+       PROP_0,
+       PROP_VIEW,
+       PROP_APP
+};
+
+static void gedit_view_activatable_iface_init (GeditViewActivatableInterface *iface);
+static void gedit_app_activatable_iface_init (GeditAppActivatableInterface *iface);
+
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditZeitgeistPlugin,
+                                gedit_zeitgeist_plugin,
+                                PEAS_TYPE_EXTENSION_BASE,
+                                0,
+                                G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_VIEW_ACTIVATABLE,
+                                                               gedit_view_activatable_iface_init)
+                                G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_APP_ACTIVATABLE,
+                                                               gedit_app_activatable_iface_init))
+
+static ZeitgeistLog *zg_log = NULL;
+static ZeitgeistDataSourceRegistry *zg_dsr = NULL;
+
+static void
+gedit_zeitgeist_plugin_init (GeditZeitgeistPlugin *plugin)
+{
+       gedit_debug_message (DEBUG_PLUGINS, "GeditZeitgeistPlugin initializing");
+
+       plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
+                                                   GEDIT_TYPE_ZEITGEIST_PLUGIN,
+                                                   GeditZeitgeistPluginPrivate);
+}
+
+static void
+gedit_zeitgeist_plugin_dispose (GObject *object)
+{
+       GeditZeitgeistPlugin *plugin = GEDIT_ZEITGEIST_PLUGIN (object);
+
+       gedit_debug_message (DEBUG_PLUGINS, "GeditZeitgeistPlugin disposing");
+
+       g_clear_object (&plugin->priv->view);
+       g_clear_object (&plugin->priv->app);
+
+       G_OBJECT_CLASS (gedit_zeitgeist_plugin_parent_class)->dispose (object);
+}
+
+static void
+gedit_zeitgeist_plugin_finalize (GObject *object)
+{
+       gedit_debug_message (DEBUG_PLUGINS, "GeditZeitgeistPlugin finalizing");
+
+       G_OBJECT_CLASS (gedit_zeitgeist_plugin_parent_class)->finalize (object);
+}
+
+static void
+gedit_zeitgeist_plugin_set_property (GObject      *object,
+                                    guint         prop_id,
+                                    const GValue *value,
+                                    GParamSpec   *pspec)
+{
+       GeditZeitgeistPlugin *plugin = GEDIT_ZEITGEIST_PLUGIN (object);
+
+       switch (prop_id)
+       {
+               case PROP_VIEW:
+                       plugin->priv->view = GEDIT_VIEW (g_value_dup_object (value));
+                       break;
+
+               case PROP_APP:
+                       plugin->priv->app = GEDIT_APP (g_value_dup_object (value));
+                       break;
+
+               default:
+                       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+                       break;
+       }
+}
+
+static void
+gedit_zeitgeist_plugin_get_property (GObject    *object,
+                                    guint       prop_id,
+                                    GValue     *value,
+                                    GParamSpec *pspec)
+{
+       GeditZeitgeistPlugin *plugin = GEDIT_ZEITGEIST_PLUGIN (object);
+
+       switch (prop_id)
+       {
+               case PROP_VIEW:
+                       g_value_set_object (value, plugin->priv->view);
+                       break;
+
+               case PROP_APP:
+                       g_value_set_object (value, plugin->priv->app);
+                       break;
+
+               default:
+                       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+                       break;
+       }
+}
+
+static void
+gedit_zeitgeist_plugin_send_event (GeditZeitgeistPlugin *plugin,
+                                  GeditDocument *doc, gchar *interpretation)
+{
+       ZeitgeistEvent *event;
+       ZeitgeistSubject *subject;
+       GFile *location;
+
+       location = gedit_document_get_location (doc);
+
+       if (location != NULL)
+       {
+               gchar *display_name;
+               gchar *dir_name;
+               gchar *mime_type;
+               gchar *doc_uri;
+
+               doc_uri = g_file_get_uri (location);
+               dir_name = g_path_get_dirname (doc_uri);
+               mime_type = gedit_document_get_mime_type (doc);
+               display_name = gedit_document_get_short_name_for_display (doc);
+
+               subject = zeitgeist_subject_new_full (doc_uri,
+                                                     ZEITGEIST_NFO_DOCUMENT,
+                                                     zeitgeist_manifestation_for_uri (doc_uri),
+                                                     mime_type,
+                                                     dir_name,
+                                                     display_name,
+                                                     NULL);
+
+               event = zeitgeist_event_new_full (interpretation,
+                                                 ZEITGEIST_ZG_USER_ACTIVITY,
+                                                 "application://gedit.desktop",
+                                                 NULL,
+                                                 subject,
+                                                 NULL);
+
+               zeitgeist_log_insert_event_no_reply (zg_log, event, NULL);
+
+               g_free (display_name);
+               g_free (mime_type);
+               g_free (dir_name);
+               g_free (doc_uri);
+
+               g_object_unref (event);
+               g_object_unref (subject);
+               g_object_unref (location);
+       }
+}
+
+static void
+document_saved (GeditDocument        *doc,
+               const GError         *error,
+               GeditZeitgeistPlugin *plugin)
+{
+       gedit_zeitgeist_plugin_send_event (plugin, doc, ZEITGEIST_ZG_MODIFY_EVENT);
+}
+
+static void
+document_loaded (GeditDocument        *doc,
+                const GError         *error,
+                GeditZeitgeistPlugin *plugin)
+{
+       gedit_zeitgeist_plugin_send_event (plugin, doc, ZEITGEIST_ZG_ACCESS_EVENT);
+}
+
+static void
+gedit_zeitgeist_plugin_view_activate (GeditViewActivatable *activatable)
+{
+       GeditZeitgeistPluginPrivate *priv;
+       GeditDocument *doc;
+
+       gedit_debug (DEBUG_PLUGINS);
+
+       priv = GEDIT_ZEITGEIST_PLUGIN (activatable)->priv;
+
+       doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->view)));
+
+       priv->signals[SIGNAL_DOC_SAVED] =
+               g_signal_connect (doc,
+                                 "saved",
+                                 G_CALLBACK (document_saved),
+                                 activatable);
+
+       priv->signals[SIGNAL_DOC_LOADED] =
+               g_signal_connect (doc,
+                                 "loaded",
+                                 G_CALLBACK (document_loaded),
+                                 activatable);
+}
+
+static void
+gedit_zeitgeist_plugin_view_deactivate (GeditViewActivatable *activatable)
+{
+       GeditZeitgeistPluginPrivate *priv;
+       GeditDocument *doc;
+       int i;
+
+       gedit_debug (DEBUG_PLUGINS);
+
+       priv = GEDIT_ZEITGEIST_PLUGIN (activatable)->priv;
+
+       doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->view)));
+
+       for (i = 0; i < N_SIGNALS; i++)
+       {
+               g_signal_handler_disconnect (doc, priv->signals[i]);
+       }
+
+       gedit_zeitgeist_plugin_send_event (GEDIT_ZEITGEIST_PLUGIN (activatable),
+                                          doc, ZEITGEIST_ZG_LEAVE_EVENT);
+}
+
+static void
+gedit_zeitgeist_plugin_app_activate (GeditAppActivatable *activatable)
+{
+       GPtrArray *ptr_arr;
+       ZeitgeistEvent *event;
+       ZeitgeistDataSource *ds;
+
+       zg_log = zeitgeist_log_new ();
+
+       event = zeitgeist_event_new_full (NULL, NULL,
+                                         "application://gedit.desktop", NULL, NULL);
+       ptr_arr = g_ptr_array_new ();
+       g_ptr_array_add (ptr_arr, event);
+
+       ds = zeitgeist_data_source_new_full ("org.gnome.gedit,dataprovider",
+                                            "Gedit dataprovider",
+                                            "Logs events about accessed documents",
+                                            ptr_arr),
+
+       zg_dsr = zeitgeist_data_source_registry_new ();
+       zeitgeist_data_source_registry_register_data_source (zg_dsr, ds,
+                                                            NULL, NULL, NULL);
+       g_ptr_array_set_free_func (ptr_arr, g_object_unref);
+       g_ptr_array_unref (ptr_arr);
+}
+
+static void
+gedit_zeitgeist_plugin_app_deactivate (GeditAppActivatable *activatable)
+{
+       g_object_unref (zg_log);
+       g_object_unref (zg_dsr);
+}
+
+static void
+gedit_zeitgeist_plugin_class_init (GeditZeitgeistPluginClass *klass)
+{
+       GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+       object_class->dispose = gedit_zeitgeist_plugin_dispose;
+       object_class->finalize = gedit_zeitgeist_plugin_finalize;
+       object_class->set_property = gedit_zeitgeist_plugin_set_property;
+       object_class->get_property = gedit_zeitgeist_plugin_get_property;
+
+       g_object_class_override_property (object_class, PROP_VIEW, "view");
+       g_object_class_override_property (object_class, PROP_APP, "app");
+
+       g_type_class_add_private (klass, sizeof (GeditZeitgeistPluginPrivate));
+}
+
+static void
+gedit_view_activatable_iface_init (GeditViewActivatableInterface *iface)
+{
+       iface->activate = gedit_zeitgeist_plugin_view_activate;
+       iface->deactivate = gedit_zeitgeist_plugin_view_deactivate;
+}
+
+static void
+gedit_app_activatable_iface_init (GeditAppActivatableInterface *iface)
+{
+       iface->activate = gedit_zeitgeist_plugin_app_activate;
+       iface->deactivate = gedit_zeitgeist_plugin_app_deactivate;
+}
+
+static void
+gedit_zeitgeist_plugin_class_finalize (GeditZeitgeistPluginClass *klass)
+{
+}
+
+G_MODULE_EXPORT void
+peas_register_types (PeasObjectModule *module)
+{
+       gedit_zeitgeist_plugin_register_type (G_TYPE_MODULE (module));
+
+       peas_object_module_register_extension_type (module,
+                                                   GEDIT_TYPE_VIEW_ACTIVATABLE,
+                                                   GEDIT_TYPE_ZEITGEIST_PLUGIN);
+       peas_object_module_register_extension_type (module,
+                                                   GEDIT_TYPE_APP_ACTIVATABLE,
+                                                   GEDIT_TYPE_ZEITGEIST_PLUGIN);
+}
+
+/* ex:set ts=8 noet: */
diff --git a/plugins/zeitgeist/gedit-zeitgeist-plugin.h b/plugins/zeitgeist/gedit-zeitgeist-plugin.h
new file mode 100644
index 0000000..c2d3545
--- /dev/null
+++ b/plugins/zeitgeist/gedit-zeitgeist-plugin.h
@@ -0,0 +1,65 @@
+/*
+ * gedit-zeitgeist-plugin.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2011 - Michal Hruby
+ *
+ * gedit 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.
+ *
+ * gedit 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 gedit; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA  02110-1301  USA
+ */
+
+#ifndef __GEDIT_ZEITGEIST_PLUGIN_H__
+#define __GEDIT_ZEITGEIST_PLUGIN_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libpeas/peas-extension-base.h>
+#include <libpeas/peas-object-module.h>
+
+G_BEGIN_DECLS
+
+#define GEDIT_TYPE_ZEITGEIST_PLUGIN            (gedit_zeitgeist_plugin_get_type ())
+#define GEDIT_ZEITGEIST_PLUGIN(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), 
GEDIT_TYPE_ZEITGEIST_PLUGIN, GeditZeitgeistPlugin))
+#define GEDIT_ZEITGEIST_PLUGIN_CLASS(k)        (G_TYPE_CHECK_CLASS_CAST((k), GEDIT_TYPE_ZEITGEIST_PLUGIN, 
GeditZeitgeistPluginClass))
+#define GEDIT_IS_ZEITGEIST_PLUGIN(o)           (G_TYPE_CHECK_INSTANCE_TYPE ((o), 
GEDIT_TYPE_ZEITGEIST_PLUGIN))
+#define GEDIT_IS_ZEITGEIST_PLUGIN_CLASS(k)     (G_TYPE_CHECK_CLASS_TYPE ((k), GEDIT_TYPE_ZEITGEIST_PLUGIN))
+#define GEDIT_ZEITGEIST_PLUGIN_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS ((o), GEDIT_TYPE_ZEITGEIST_PLUGIN, 
GeditZeitgeistPluginClass))
+
+typedef struct _GeditZeitgeistPlugin           GeditZeitgeistPlugin;
+typedef struct _GeditZeitgeistPluginPrivate    GeditZeitgeistPluginPrivate;
+typedef struct _GeditZeitgeistPluginClass              GeditZeitgeistPluginClass;
+
+struct _GeditZeitgeistPlugin
+{
+       PeasExtensionBase parent;
+
+       /*< private >*/
+       GeditZeitgeistPluginPrivate *priv;
+};
+
+struct _GeditZeitgeistPluginClass
+{
+       PeasExtensionBaseClass parent_class;
+};
+
+GType  gedit_zeitgeist_plugin_get_type         (void) G_GNUC_CONST;
+
+G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
+
+G_END_DECLS
+
+#endif /* __GEDIT_ZEITGEIST_PLUGIN_H__ */
+
+/* ex:set ts=8 noet: */
diff --git a/plugins/zeitgeist/gedit-zeitgeist.metainfo.xml.in 
b/plugins/zeitgeist/gedit-zeitgeist.metainfo.xml.in
new file mode 100644
index 0000000..ea1c825
--- /dev/null
+++ b/plugins/zeitgeist/gedit-zeitgeist.metainfo.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 Igor Gnatenko <i gnatenko brain gmail com> -->
+<component type="addon">
+  <id>gedit-zeitgeist</id>
+  <extends>gedit.desktop</extends>
+  <_name>Zeitgeist Data provider</_name>
+<_summary>Records user activity and giving easy access to recently-used and frequently-used files</_summary>
+  <url type="homepage">https://wiki.gnome.org/Apps/Gedit/ShippedPlugins</url>
+  <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=gedit&amp;component=Plugins</url>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>GPL-2.0+</project_license>
+  <updatecontact>i gnatenko brain gmail com</updatecontact>
+</component>
diff --git a/plugins/zeitgeist/zeitgeist.plugin.desktop.in b/plugins/zeitgeist/zeitgeist.plugin.desktop.in
new file mode 100644
index 0000000..c99109c
--- /dev/null
+++ b/plugins/zeitgeist/zeitgeist.plugin.desktop.in
@@ -0,0 +1,9 @@
+[Plugin]
+Module=zeitgeist
+IAge=3
+_Name=Zeitgeist dataprovider
+_Description=Logs access and leave event for documents used with gedit
+Authors=Michal Hruby <michal mhr gmail com>
+Copyright=Copyright © 2011 Michal Hruby
+Website=http://www.gedit.org
+
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 22d76ff..c47c692 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -57,3 +57,5 @@ plugins/wordcompletion/gedit-word-completion-plugin.c
 plugins/wordcompletion/org.gnome.gedit.plugins.wordcompletion.gschema.xml.in.in
 plugins/wordcompletion/wordcompletion.plugin.desktop.in.in
 plugins/wordcompletion/gedit-wordcompletion.metainfo.xml.in
+plugins/zeitgeist/zeitgeist.plugin.desktop.in
+plugins/zeitgeist/gedit-zeitgeist.metainfo.xml.in


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]