[vinagre/plugin] The sample of vinagre dummy plugin
- From: Jorge Pereira <jpereira src gnome org>
- To: svn-commits-list gnome org
- Subject: [vinagre/plugin] The sample of vinagre dummy plugin
- Date: Thu, 9 Jul 2009 01:53:36 +0000 (UTC)
commit 85aa6eb33726e16bd96b7fac096981db30d18c7a
Author: Jorge Pereira <jpereira gnome org>
Date: Wed Jul 8 22:42:14 2009 -0300
The sample of vinagre dummy plugin
plugins/dummy/Makefile.am | 4 +---
plugins/dummy/dummy.vinagre-plugin.desktop.in | 12 +++++++-----
plugins/dummy/vinagre-dummy-plugin.c | 15 ++++++++++++---
plugins/dummy/vinagre-dummy-plugin.h | 23 ++++++++++++-----------
4 files changed, 32 insertions(+), 22 deletions(-)
---
diff --git a/plugins/dummy/Makefile.am b/plugins/dummy/Makefile.am
index 75a0ef2..72032a5 100644
--- a/plugins/dummy/Makefile.am
+++ b/plugins/dummy/Makefile.am
@@ -1,4 +1,4 @@
-# dummy plugin
+# dummy plugin by Jorge Pereira <jpereira gnome org>
plugindir = $(VINAGRE_PLUGINS_LIBS_DIR)
INCLUDES = \
@@ -25,11 +25,9 @@ dummy.vinagre-plugin: dummy.vinagre-plugin.desktop.in $(INTLTOOL_MERGE) $(wildca
plugin_DATA = $(plugin_in_files:.vinagre-plugin.desktop.in=.vinagre-plugin)
-#EXTRA_DIST = $(ui_DATA) $(plugin_in_files)
EXTRA_DIST = $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
-
-include $(top_srcdir)/git.mk
diff --git a/plugins/dummy/dummy.vinagre-plugin.desktop.in b/plugins/dummy/dummy.vinagre-plugin.desktop.in
index 8dfc1ba..c93725b 100644
--- a/plugins/dummy/dummy.vinagre-plugin.desktop.in
+++ b/plugins/dummy/dummy.vinagre-plugin.desktop.in
@@ -1,9 +1,11 @@
[Vinagre Plugin]
Module=dummy
-IAge=2
+IAge=1
_Name=Dummy
-_Description=Dummy Plugin Example
-Icon=vinagre-plugin
-Authors=Jorge Pereira <jorge joregepereira com br>
-Copyright=Copyright © 2009 Jorge Pereira
+_Description=Dummy Example ;)
+Authors=Jorge Pereira
+Copyright=Copyright © 2009 Jorge Pereira\n<jorge jorgepereira com br>
Website=http://www.jorgepereira.com.br/
+Version=0.1
+Engine=1
+Icon=vinagre-plugin
diff --git a/plugins/dummy/vinagre-dummy-plugin.c b/plugins/dummy/vinagre-dummy-plugin.c
index 47ab184..32ba9a3 100644
--- a/plugins/dummy/vinagre-dummy-plugin.c
+++ b/plugins/dummy/vinagre-dummy-plugin.c
@@ -2,7 +2,7 @@
* vinagre-dummy-plugin.c
* This file is part of vinagre
*
- * Copyright (C) 2009 Jorge Pereira <jorge jorgepereira com br>
+ * Copyright (C) 2009 Jonh Wendell <wendell bani com br>
*
* vinagre-dummy-plugin.c is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -31,7 +31,7 @@
#include <vinagre/vinagre-debug.h>
#include <vinagre/vinagre-utils.h>
-#define VINAGRE_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), VINAGRE_TYPE_SORT_PLUGIN, VinagreDummyPluginPrivate))
+#define VINAGRE_DUMMY_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), VINAGRE_TYPE_DUMMY_PLUGIN, VinagreDummyPluginPrivate))
VINAGRE_PLUGIN_REGISTER_TYPE(VinagreDummyPlugin, vinagre_dummy_plugin)
@@ -56,6 +56,14 @@ impl_update_ui (VinagrePlugin *plugin,
vinagre_debug_message (DEBUG_PLUGINS, "VinagreDummyPlugin Update UI");
}
+static GOptionGroup *
+impl_get_context_group (VinagrePlugin *plugin)
+{
+ vinagre_debug_message (DEBUG_PLUGINS, "VinagreDummyPlugin Get Context Group");
+
+ return NULL; //dummy_display_get_option_group ();
+}
+
static void
vinagre_dummy_plugin_init (VinagreDummyPlugin *plugin)
{
@@ -81,5 +89,6 @@ vinagre_dummy_plugin_class_init (VinagreDummyPluginClass *klass)
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;
plugin_class->update_ui = impl_update_ui;
+ plugin_class->get_context_group = impl_get_context_group;
}
-
+/* vim: set ts=8: */
diff --git a/plugins/dummy/vinagre-dummy-plugin.h b/plugins/dummy/vinagre-dummy-plugin.h
index 02c1fce..34a3ab5 100644
--- a/plugins/dummy/vinagre-dummy-plugin.h
+++ b/plugins/dummy/vinagre-dummy-plugin.h
@@ -18,8 +18,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __VINAGRE_SORT_PLUGIN_H__
-#define __VINAGRE_SORT_PLUGIN_H__
+#ifndef __VINAGRE_DUMMY_PLUGIN_H__
+#define __VINAGRE_DUMMY_PLUGIN_H__
#include <glib.h>
#include <glib-object.h>
@@ -30,12 +30,12 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define VINAGRE_TYPE_SORT_PLUGIN (vinagre_dummy_plugin_get_type ())
-#define VINAGRE_SORT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), VINAGRE_TYPE_SORT_PLUGIN, VinagreDummyPlugin))
-#define VINAGRE_SORT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), VINAGRE_TYPE_SORT_PLUGIN, VinagreDummyPluginClass))
-#define VINAGRE_IS_SORT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), VINAGRE_TYPE_SORT_PLUGIN))
-#define VINAGRE_IS_SORT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), VINAGRE_TYPE_SORT_PLUGIN))
-#define VINAGRE_SORT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), VINAGRE_TYPE_SORT_PLUGIN, VinagreDummyPluginClass))
+#define VINAGRE_TYPE_DUMMY_PLUGIN (vinagre_dummy_plugin_get_type ())
+#define VINAGRE_DUMMY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), VINAGRE_TYPE_DUMMY_PLUGIN, VinagreDummyPlugin))
+#define VINAGRE_DUMMY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), VINAGRE_TYPE_DUMMY_PLUGIN, VinagreDummyPluginClass))
+#define VINAGRE_IS_DUMMY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), VINAGRE_TYPE_DUMMY_PLUGIN))
+#define VINAGRE_IS_DUMMY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), VINAGRE_TYPE_DUMMY_PLUGIN))
+#define VINAGRE_DUMMY_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), VINAGRE_TYPE_DUMMY_PLUGIN, VinagreDummyPluginClass))
/* Private structure type */
typedef struct _VinagreDummyPluginPrivate VinagreDummyPluginPrivate;
@@ -47,7 +47,7 @@ typedef struct _VinagreDummyPlugin VinagreDummyPlugin;
struct _VinagreDummyPlugin
{
- VinagrePlugin parent_instance;
+ VinagrePlugin parent_instance;
};
/*
@@ -57,7 +57,7 @@ typedef struct _VinagreDummyPluginClass VinagreDummyPluginClass;
struct _VinagreDummyPluginClass
{
- VinagrePluginClass parent_class;
+ VinagrePluginClass parent_class;
};
/*
@@ -70,4 +70,5 @@ G_MODULE_EXPORT GType register_vinagre_plugin (GTypeModule *module);
G_END_DECLS
-#endif /* __VINAGRE_SORT_PLUGIN_H__ */
+#endif /* __VINAGRE_DUMMY_PLUGIN_H__ */
+/* vim: set ts=8: */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]