[gnome-todo/wip/gbsneto/plugins: 4/4] WIP
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/wip/gbsneto/plugins: 4/4] WIP
- Date: Sun, 17 Jan 2016 18:59:31 +0000 (UTC)
commit 0eea405332d4c10abf8d82d7f4261a26502d9638
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Jan 17 16:56:19 2016 -0200
WIP
configure.ac | 9 +++++
plugins/todoist/Makefile.am | 11 ++++++
plugins/todoist/todoist.plugin.in | 13 +++++++
plugins/todoist/todoist/__init__.py | 61 +++++++++++++++++++++++++++++++++++
4 files changed, 94 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 077dc7c..0df7c67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,8 +84,14 @@ APPSTREAM_XML
dnl ================================================================
dnl Plugins
dnl ================================================================
+
+# Evolution-Data-Server (builtin)
GNOME_TODO_ADD_PLUGIN([eds], [Evolution-Data-Server], [yes])
+# Todoist
+GNOME_TODO_ADD_PLUGIN([todoist], [Todoist], [yes])
+
+
AC_SUBST([GNOME_TODO_PLUGIN_DIR], [${libdir}])
AC_CONFIG_FILES([
@@ -114,5 +120,8 @@ echo "
warning flags: ${GNOME_TODO_WARN_CFLAGS} ${GNOME_TODO_WARN_LDFLAGS}
release: ${ax_is_release}
+ Plugins:
+ Todoist: ${enable_todoist_plugin}
+
Now type 'make' to build $PACKAGE
"
diff --git a/plugins/todoist/Makefile.am b/plugins/todoist/Makefile.am
new file mode 100644
index 0000000..36a318d
--- /dev/null
+++ b/plugins/todoist/Makefile.am
@@ -0,0 +1,11 @@
+include $(top_srcdir)/common.am
+
+EXTRA_DIST = $(plugin_DATA)
+
+plugindir = $(datadir)/gnome-todo/plugins
+dist_plugin_DATA = todoist.plugin
+
+moduledir = $(datadir)/gnome-todo/plugins/todoist
+dist_module_DATA = todoist/__init__.py
+
+GITIGNOREFILES = todoist/__pycache__
diff --git a/plugins/todoist/todoist.plugin.in b/plugins/todoist/todoist.plugin.in
new file mode 100644
index 0000000..ee0d32a
--- /dev/null
+++ b/plugins/todoist/todoist.plugin.in
@@ -0,0 +1,13 @@
+[Plugin]
+Name = Todoist
+Module = todoist
+Description = Todoist integration for GNOME To Do
+Version = @VERSION@
+Authors = Georges Basile Stavracas Neto <gbsneto gnome org>
+Copyright = Copyleft © The To Do maintainers
+Website = https://wiki.gnome.org/Apps/Todo
+Builtin = false
+Hidden = false
+License = GPL
+Loader = python3
+Depends =
diff --git a/plugins/todoist/todoist/__init__.py b/plugins/todoist/todoist/__init__.py
new file mode 100644
index 0000000..492440e
--- /dev/null
+++ b/plugins/todoist/todoist/__init__.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python3
+
+# todoist.py
+#
+# Copyright (C) 2016 Georges Basile Stavracas Neto <georges stavracas 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 3 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, see <http://www.gnu.org/licenses/>.
+
+import gi
+
+gi.require_version('Gtd', '1.0')
+gi.require_version('Peas', '1.0')
+
+from gi.repository import Gtd
+from gi.repository import Peas
+from gi.repository import Gio
+from gi.repository import GLib
+from gi.repository import GObject
+from gi.repository import Gtk
+
+from gettext import gettext as _
+
+
+class TodoistPlugin(GObject.Object, Gtd.Activatable):
+ active = GObject.Property(type=bool, default=False)
+ preferences_panel = GObject.Property(type=Gtk.Widget, default=None)
+
+ def __init__(self):
+ GObject.Object.__init__(self)
+
+ def activate(self):
+ self.active = True
+ print("Activated")
+
+ def deactivate(self):
+ self.active = False
+ print("Deactivated")
+
+ def get_preferences_panel(self):
+ return None
+
+ def get_header_widgets(self):
+ return None
+
+ def get_panels(self):
+ return None
+
+ def get_providers(self):
+ return None
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]