[libpeas] Rename libpeasui to libpeas-gtk.
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Rename libpeasui to libpeas-gtk.
- Date: Mon, 16 Aug 2010 23:52:46 +0000 (UTC)
commit db49c06e0478bae5cfb4a3202c904c9af1f4117f
Author: Steve Frécinaux <code istique net>
Date: Tue Aug 17 01:11:11 2010 +0200
Rename libpeasui to libpeas-gtk.
In today's context, 'ui' in the glib ecosystem don't mean 'gtk+' only
anymore. It can also be Clutter, MX or even Qt...
https://bugzilla.gnome.org/show_bug.cgi?id=626429
Makefile.am | 4 +-
configure.ac | 22 +-
data/Makefile.am | 6 +-
.../{libpeasui-1.0.pc.in => libpeas-gtk-1.0.pc.in} | 6 +-
docs/reference/Makefile.am | 10 +-
...gin-manager.png => peas-gtk-plugin-manager.png} | Bin 18968 -> 18968 bytes
docs/reference/libpeas-docs.sgml | 8 +-
docs/reference/libpeas-sections.txt | 88 +++---
docs/reference/libpeas.types | 6 +-
{libpeasui => libpeas-gtk}/Makefile.am | 46 ++--
.../peas-gtk-configurable.c | 41 ++--
libpeas-gtk/peas-gtk-configurable.h | 53 ++++
.../peas-gtk-plugin-manager-store.c | 224 ++++++++--------
libpeas-gtk/peas-gtk-plugin-manager-store.h | 96 +++++++
.../peas-gtk-plugin-manager-view.c | 290 ++++++++++----------
libpeas-gtk/peas-gtk-plugin-manager-view.h | 79 ++++++
.../peas-gtk-plugin-manager.c | 162 ++++++------
libpeas-gtk/peas-gtk-plugin-manager.h | 64 +++++
libpeasui/peas-ui.h => libpeas-gtk/peas-gtk.h | 12 +-
libpeasui/peas-ui-configurable.h | 53 ----
libpeasui/peas-ui-plugin-manager-store.h | 96 -------
libpeasui/peas-ui-plugin-manager-view.h | 79 ------
libpeasui/peas-ui-plugin-manager.h | 64 -----
peas-demo/Makefile.am | 10 +-
peas-demo/peas-demo.c | 6 +-
peas-demo/plugins/helloworld/Makefile.am | 4 +-
.../helloworld/peasdemo-hello-world-configurable.c | 12 +-
.../helloworld/peasdemo-hello-world-plugin.c | 4 +-
peas-demo/plugins/pythonhello/pythonhello.py | 4 +-
peas-demo/plugins/secondtime/Makefile.am | 4 +-
peas-demo/plugins/seedhello/seedhello.js | 2 +-
31 files changed, 778 insertions(+), 777 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 3c03f0a..8e4b8d5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,8 +4,8 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection
SUBDIRS = libpeas loaders
-if ENABLE_LIBPEASUI
-SUBDIRS += libpeasui peas-demo
+if ENABLE_GTK
+SUBDIRS += libpeas-gtk peas-demo
endif
SUBDIRS += data po docs
diff --git a/configure.ac b/configure.ac
index 121ee81..a798c31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,13 +76,13 @@ PKG_CHECK_MODULES(PEAS, [
])
dnl ================================================================
-dnl Build libpeasui
+dnl Build libpeas-gtk
dnl ================================================================
-AC_ARG_ENABLE(libpeasui,
- AS_HELP_STRING([--enable-libpeasui],[Build libpeasui for Gtk widgetry]),
- [enable_libpeasui=$enableval],
- [enable_libpeasui=yes])
+AC_ARG_ENABLE(gtk,
+ AS_HELP_STRING([--enable-gtk],[Build libpeas-gtk for Gtk widgetry]),
+ [enable_gtk=$enableval],
+ [enable_gtk=yes])
dnl We currently allow building libpeas with Gtk+ 2.0 for testing purposes and
dnl technology preview. but do *not* distribute such a version!
@@ -91,7 +91,7 @@ AC_ARG_ENABLE(gtk2-test-build,
[use_gtk2=$enableval],
[use_gtk2=no])
-if test "$enable_libpeasui" = "yes"; then
+if test "$enable_gtk" = "yes"; then
if test "$use_gtk2" != "yes"; then
GTK_TYPELIB=Gtk-3.0
GTK_PKG_REQUIREMENT="gtk+-3.0 >= 2.90"
@@ -101,12 +101,12 @@ if test "$enable_libpeasui" = "yes"; then
GTK_PKG_REQUIREMENT="gtk+-2.0 >= 2.16"
GDK_REQUIRED=gdk-2.0
fi
- PKG_CHECK_MODULES(PEASUI, [$GTK_PKG_REQUIREMENT])
+ PKG_CHECK_MODULES(PEAS_GTK, [$GTK_PKG_REQUIREMENT])
AC_SUBST(GTK_TYPELIB)
AC_SUBST(GTK_PKG_REQUIREMENT)
fi
-AM_CONDITIONAL([ENABLE_LIBPEASUI],[test "x$enable_libpeasui" = "xyes"])
+AM_CONDITIONAL([ENABLE_GTK],[test "x$enable_gtk" = "xyes"])
dnl ================================================================
dnl Check for native OSX
@@ -285,14 +285,14 @@ docs/Makefile
docs/reference/Makefile
docs/reference/version.xml
libpeas/Makefile
-libpeasui/Makefile
+libpeas-gtk/Makefile
loaders/Makefile
loaders/c/Makefile
loaders/python/Makefile
loaders/seed/Makefile
data/Makefile
data/libpeas-1.0.pc
-data/libpeasui-1.0.pc
+data/libpeas-gtk-1.0.pc
data/icons/Makefile
peas-demo/Makefile
peas-demo/plugins/Makefile
@@ -312,7 +312,7 @@ Configuration:
Source code location : ${srcdir}
Compiler : ${CC}
Installation prefix : ${prefix}
- Build libpeasui : ${enable_libpeasui}
+ Build libpeas-gtk : ${enable_gtk}
Seed JS support : ${found_seed}
Python support : ${found_python}
"
diff --git a/data/Makefile.am b/data/Makefile.am
index 1f9d254..d4f8f30 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,8 +3,8 @@ SUBDIRS=icons
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpeas-1.0.pc
-if ENABLE_LIBPEASUI
-pkgconfig_DATA += libpeasui-1.0.pc
+if ENABLE_GTK
+pkgconfig_DATA += libpeas-gtk-1.0.pc
endif
-EXTRA_DIST = libpeas-1.0.pc.in libpeasui-1.0.pc.in
+EXTRA_DIST = libpeas-1.0.pc.in libpeas-gtk-1.0.pc.in
diff --git a/data/libpeasui-1.0.pc.in b/data/libpeas-gtk-1.0.pc.in
similarity index 64%
rename from data/libpeasui-1.0.pc.in
rename to data/libpeas-gtk-1.0.pc.in
index 99e5585..b86415d 100644
--- a/data/libpeasui-1.0.pc.in
+++ b/data/libpeas-gtk-1.0.pc.in
@@ -3,9 +3,9 @@ exec_prefix= exec_prefix@
libdir= libdir@
includedir= includedir@
-Name: libpeas
-Description: libpeas, a GObject plugins library (UI part)
+Name: libpeas-gtk
+Description: libpeas-gtk, a GObject plugins library (Gtk widgets)
Requires: glib-2.0 >= 2.14, @GTK_PKG_REQUIREMENT@, libpeas-1.0 >= @VERSION@
Version: @VERSION@
Cflags: -I${includedir}/libpeas-1.0
-Libs: -L${libdir} -lpeasui-1.0
+Libs: -L${libdir} -lpeas-gtk-1.0
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 0cea60d..6164298 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -37,11 +37,11 @@ FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change.
HFILE_GLOB = \
$(top_srcdir)/libpeas/*.h \
- $(top_srcdir)/libpeasui/*.h
+ $(top_srcdir)/libpeas-gtk/*.h
CFILE_GLOB = \
$(top_srcdir)/libpeas/*.c \
- $(top_srcdir)/libpeasui/*.c
+ $(top_srcdir)/libpeas-gtk/*.c
# Header files to ignore when scanning (These are internal to libpeas).
IGNORE_HFILES= \
@@ -61,7 +61,7 @@ IGNORE_HFILES= \
peas-extension-seed.h \
peas-extension-python.h \
peas-introspection.h \
- peas-ui-plugin-manager-store.h \
+ peas-gtk-plugin-manager-store.h \
peas-demo-window.h \
peasdemo-hello-world-plugin.h \
peasdemo-hello-world-configurable.h \
@@ -69,7 +69,7 @@ IGNORE_HFILES= \
# Images to copy into HTML directory.
HTML_IMAGES = \
- $(srcdir)/images/peas-ui-plugin-manager.png
+ $(srcdir)/images/peas-gtk-plugin-manager.png
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
@@ -92,7 +92,7 @@ GTKDOC_CFLAGS = \
GTKDOC_LIBS = \
$(top_builddir)/libpeas/libpeas-1.0.la \
- $(top_builddir)/libpeasui/libpeasui-1.0.la \
+ $(top_builddir)/libpeas-gtk/libpeas-gtk-1.0.la \
$(PEAS_LIBS) \
$(PEASUI_LIBS)
diff --git a/docs/reference/images/peas-ui-plugin-manager.png b/docs/reference/images/peas-gtk-plugin-manager.png
similarity index 100%
rename from docs/reference/images/peas-ui-plugin-manager.png
rename to docs/reference/images/peas-gtk-plugin-manager.png
diff --git a/docs/reference/libpeas-docs.sgml b/docs/reference/libpeas-docs.sgml
index 6182a94..66809d3 100644
--- a/docs/reference/libpeas-docs.sgml
+++ b/docs/reference/libpeas-docs.sgml
@@ -25,14 +25,14 @@
<xi:include href="xml/peas-object-module.xml"/>
</chapter>
<chapter>
- <title>UI Components</title>
- <xi:include href="xml/peas-ui-plugin-manager.xml"/>
- <xi:include href="xml/peas-ui-plugin-manager-view.xml"/>
+ <title>Gtk+ Widgets</title>
+ <xi:include href="xml/peas-gtk-plugin-manager.xml"/>
+ <xi:include href="xml/peas-gtk-plugin-manager-view.xml"/>
</chapter>
<chapter>
<title>Built-in Extension Interfaces</title>
<xi:include href="xml/peas-activatable.xml"/>
- <xi:include href="xml/peas-ui-configurable.xml"/>
+ <xi:include href="xml/peas-gtk-configurable.xml"/>
</chapter>
</part>
<index id="api-index-full">
diff --git a/docs/reference/libpeas-sections.txt b/docs/reference/libpeas-sections.txt
index 7f86258..d801468 100644
--- a/docs/reference/libpeas-sections.txt
+++ b/docs/reference/libpeas-sections.txt
@@ -1,59 +1,59 @@
<SECTION>
-<FILE>peas-ui-configurable</FILE>
-<TITLE>PeasUIConfigurable</TITLE>
-PeasUIConfigurable
-PeasUIConfigurableInterface
-peas_ui_configurable_create_configure_widget
+<FILE>peas-gtk-configurable</FILE>
+<TITLE>PeasGtkConfigurable</TITLE>
+PeasGtkConfigurable
+PeasGtkConfigurableInterface
+peas_gtk_configurable_create_configure_widget
<SUBSECTION Standard>
-PEAS_UI_CONFIGURABLE
-PEAS_UI_IS_CONFIGURABLE
-PEAS_UI_TYPE_CONFIGURABLE
-peas_ui_configurable_get_type
-PEAS_UI_CONFIGURABLE_IFACE
-PEAS_UI_CONFIGURABLE_GET_IFACE
+PEAS_GTK_CONFIGURABLE
+PEAS_GTK_IS_CONFIGURABLE
+PEAS_GTK_TYPE_CONFIGURABLE
+peas_gtk_configurable_get_type
+PEAS_GTK_CONFIGURABLE_IFACE
+PEAS_GTK_CONFIGURABLE_GET_IFACE
</SECTION>
<SECTION>
-<FILE>peas-ui-plugin-manager</FILE>
-<TITLE>PeasUIPluginManager</TITLE>
-PeasUIPluginManager
-PeasUIPluginManagerClass
-peas_ui_plugin_manager_new
-peas_ui_plugin_manager_get_view
+<FILE>peas-gtk-plugin-manager</FILE>
+<TITLE>PeasGtkPluginManager</TITLE>
+PeasGtkPluginManager
+PeasGtkPluginManagerClass
+peas_gtk_plugin_manager_new
+peas_gtk_plugin_manager_get_view
<SUBSECTION Standard>
-PEAS_UI_PLUGIN_MANAGER
-PEAS_UI_IS_PLUGIN_MANAGER
-PEAS_UI_TYPE_PLUGIN_MANAGER
-peas_ui_plugin_manager_get_type
-PEAS_UI_PLUGIN_MANAGER_CLASS
-PEAS_UI_IS_PLUGIN_MANAGER_CLASS
-PEAS_UI_PLUGIN_MANAGER_GET_CLASS
+PEAS_GTK_PLUGIN_MANAGER
+PEAS_GTK_IS_PLUGIN_MANAGER
+PEAS_GTK_TYPE_PLUGIN_MANAGER
+peas_gtk_plugin_manager_get_type
+PEAS_GTK_PLUGIN_MANAGER_CLASS
+PEAS_GTK_IS_PLUGIN_MANAGER_CLASS
+PEAS_GTK_PLUGIN_MANAGER_GET_CLASS
<SUBSECTION Private>
-PeasUIPluginManagerPrivate
+PeasGtkPluginManagerPrivate
</SECTION>
<SECTION>
-<FILE>peas-ui-plugin-manager-view</FILE>
-<TITLE>PeasUIPluginManagerView</TITLE>
-PeasUIPluginManagerView
-PeasUIPluginManagerViewClass
-peas_ui_plugin_manager_view_new
-peas_ui_plugin_manager_view_set_show_builtin
-peas_ui_plugin_manager_view_get_show_builtin
-peas_ui_plugin_manager_view_set_selected_iter
-peas_ui_plugin_manager_view_get_selected_iter
-peas_ui_plugin_manager_view_set_selected_plugin
-peas_ui_plugin_manager_view_get_selected_plugin
+<FILE>peas-gtk-plugin-manager-view</FILE>
+<TITLE>PeasGtkPluginManagerView</TITLE>
+PeasGtkPluginManagerView
+PeasGtkPluginManagerViewClass
+peas_gtk_plugin_manager_view_new
+peas_gtk_plugin_manager_view_set_show_builtin
+peas_gtk_plugin_manager_view_get_show_builtin
+peas_gtk_plugin_manager_view_set_selected_iter
+peas_gtk_plugin_manager_view_get_selected_iter
+peas_gtk_plugin_manager_view_set_selected_plugin
+peas_gtk_plugin_manager_view_get_selected_plugin
<SUBSECTION Standard>
-PEAS_UI_PLUGIN_MANAGER_VIEW
-PEAS_UI_IS_PLUGIN_MANAGER_VIEW
-PEAS_UI_TYPE_PLUGIN_MANAGER_VIEW
-peas_ui_plugin_manager_view_get_type
-PEAS_UI_PLUGIN_MANAGER_VIEW_CLASS
-PEAS_UI_IS_PLUGIN_MANAGER_VIEW_CLASS
-PEAS_UI_PLUGIN_MANAGER_VIEW_GET_CLASS
+PEAS_GTK_PLUGIN_MANAGER_VIEW
+PEAS_GTK_IS_PLUGIN_MANAGER_VIEW
+PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW
+peas_gtk_plugin_manager_view_get_type
+PEAS_GTK_PLUGIN_MANAGER_VIEW_CLASS
+PEAS_GTK_IS_PLUGIN_MANAGER_VIEW_CLASS
+PEAS_GTK_PLUGIN_MANAGER_VIEW_GET_CLASS
<SUBSECTION Private>
-PeasUIPluginManagerViewPrivate
+PeasGtkPluginManagerViewPrivate
</SECTION>
<SECTION>
diff --git a/docs/reference/libpeas.types b/docs/reference/libpeas.types
index acc4bcd..b837068 100644
--- a/docs/reference/libpeas.types
+++ b/docs/reference/libpeas.types
@@ -5,6 +5,6 @@ peas_extension_get_type
peas_extension_set_get_type
peas_object_module_get_type
peas_plugin_info_get_type
-peas_ui_configurable_get_type
-peas_ui_plugin_manager_get_type
-peas_ui_plugin_manager_view_get_type
+peas_gtk_configurable_get_type
+peas_gtk_plugin_manager_get_type
+peas_gtk_plugin_manager_view_get_type
diff --git a/libpeasui/Makefile.am b/libpeas-gtk/Makefile.am
similarity index 51%
rename from libpeasui/Makefile.am
rename to libpeas-gtk/Makefile.am
index 6dbc41e..05e0c89 100644
--- a/libpeasui/Makefile.am
+++ b/libpeas-gtk/Makefile.am
@@ -1,61 +1,61 @@
-lib_LTLIBRARIES = libpeasui-1.0.la
+lib_LTLIBRARIES = libpeas-gtk-1.0.la
INCLUDES = \
-I$(top_srcdir) \
-I$(srcdir) \
$(PEAS_CFLAGS) \
- $(PEASUI_CFLAGS) \
+ $(PEAS_GTK_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED)
-libpeasui_1_0_la_LDFLAGS = \
+libpeas_gtk_1_0_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-dynamic -no-undefined -export-symbols-regex "^[^_].*"
-libpeasui_1_0_la_LIBADD = \
+libpeas_gtk_1_0_la_LIBADD = \
$(PEAS_LIBS) \
- $(PEASUI_LIBS) \
+ $(PEAS_GTK_LIBS) \
$(top_builddir)/libpeas/libpeas-1.0.la
INST_H_FILES = \
- peas-ui-configurable.h \
- peas-ui-plugin-manager.h \
- peas-ui-plugin-manager-view.h \
- peas-ui.h
+ peas-gtk-configurable.h \
+ peas-gtk-plugin-manager.h \
+ peas-gtk-plugin-manager-view.h \
+ peas-gtk.h
NOINST_H_FILES = \
- peas-ui-plugin-manager-store.h
+ peas-gtk-plugin-manager-store.h
C_FILES = \
- peas-ui-configurable.c \
- peas-ui-plugin-manager.c \
- peas-ui-plugin-manager-store.c \
- peas-ui-plugin-manager-view.c
+ peas-gtk-configurable.c \
+ peas-gtk-plugin-manager.c \
+ peas-gtk-plugin-manager-store.c \
+ peas-gtk-plugin-manager-view.c
-libpeasui_1_0_la_SOURCES = \
+libpeas_gtk_1_0_la_SOURCES = \
$(INST_H_FILES) \
$(NOINST_H_FILES) \
$(C_FILES)
-headerdir = $(prefix)/include/libpeas-1.0/libpeasui
+headerdir = $(prefix)/include/libpeas-1.0/libpeas-gtk
header_DATA = $(INST_H_FILES)
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
- INTROSPECTION_GIRS = PeasUI-1.0.gir
+ INTROSPECTION_GIRS = PeasGtk-1.0.gir
INTROSPECTION_SCANNER_ARGS = \
--add-include-path=$(top_builddir)/libpeas \
- --c-include=libpeasui/peas-ui.h \
+ --c-include=libpeasgtk/peas-gtk.h \
--warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)/libpeas
introspection_sources = $(INST_H_FILES) $(C_FILES)
- PeasUI-1.0.gir: libpeasui-1.0.la
- PeasUI_1_0_gir_INCLUDES = GObject-2.0 $(GTK_TYPELIB) Peas-1.0
- PeasUI_1_0_gir_CFLAGS = $(PEAS_CFLAGS) $(PEASUI_CFLAGS) -I$(top_srcdir)
- PeasUI_1_0_gir_LIBS = libpeasui-1.0.la
- PeasUI_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+ PeasGtk-1.0.gir: libpeas-gtk-1.0.la
+ PeasGtk_1_0_gir_INCLUDES = GObject-2.0 $(GTK_TYPELIB) Peas-1.0
+ PeasGtk_1_0_gir_CFLAGS = $(PEAS_CFLAGS) $(PEAS_GTK_CFLAGS) -I$(top_srcdir)
+ PeasGtk_1_0_gir_LIBS = libpeas-gtk-1.0.la
+ PeasGtk_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
diff --git a/libpeasui/peas-ui-configurable.c b/libpeas-gtk/peas-gtk-configurable.c
similarity index 60%
rename from libpeasui/peas-ui-configurable.c
rename to libpeas-gtk/peas-gtk-configurable.c
index e3aab08..038757a 100644
--- a/libpeasui/peas-ui-configurable.c
+++ b/libpeas-gtk/peas-gtk-configurable.c
@@ -1,8 +1,8 @@
/*
- * peas-ui-configurable.c
+ * peas-gtk-configurable.c
* This file is part of libpeas
*
- * Copyright (C) 2009 Steve Steve Frécinaux
+ * Copyright (C) 2009-2010 Steve Frécinaux
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published by
@@ -23,38 +23,39 @@
#include <config.h>
#endif
-#include "peas-ui-configurable.h"
+#include "peas-gtk-configurable.h"
/**
- * SECTION:peas-ui-configurable
+ * SECTION:peas-gtk-configurable
* @short_description: Interface to provide a plugin configuration UI
*
- * The #PeasUIConfigurable interface will allow a plugin to provide a
+ * The #PeasGtkConfigurable interface will allow a plugin to provide a
* graphical interface for the user to configure the plugin through the
- * #PeasUIPluginManager: the #PeasUIPluginManager will make its â??Configure
- * Pluginâ?? button active when the selected plugin implements the
- * #PeasUIConfigurable interface.
+ * #PeasGtkPluginManager: the #PeasGtkPluginManager will make its
+ * â??Configure Pluginâ?? button active when the selected plugin implements
+ * the #PeasGtkConfigurable interface.
*
- * To allow plugin configuration from the #PeasUIPluginManager, the plugin
- * writer will just need to implement the create_configure_widget() method.
+ * To allow plugin configuration from the #PeasGtkPluginManager, the
+ * plugin writer will just need to implement the create_configure_widget()
+ * method.
**/
-G_DEFINE_INTERFACE(PeasUIConfigurable, peas_ui_configurable, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(PeasGtkConfigurable, peas_gtk_configurable, G_TYPE_OBJECT)
static void
-peas_ui_configurable_default_init (PeasUIConfigurableInterface *iface)
+peas_gtk_configurable_default_init (PeasGtkConfigurableInterface *iface)
{
}
/**
- * peas_ui_configurable_create_configure_widget:
- * @configurable: A #PeasUIConfigurable
+ * peas_gtk_configurable_create_configure_widget:
+ * @configurable: A #PeasGtkConfigurable
*
* Creates the configure widget widget for the plugin. The returned widget
* should allow configuring all the relevant aspects of the plugin, and should
* allow instant-apply, as promoted by the Gnome Human Interface Guidelines.
*
- * #PeasUIPluginManager will embed the returned widget into a dialog box,
+ * #PeasGtkPluginManager will embed the returned widget into a dialog box,
* but you shouldn't take this behaviour for granted as other implementations
* of a plugin manager UI might do otherwise.
*
@@ -63,13 +64,13 @@ peas_ui_configurable_default_init (PeasUIConfigurableInterface *iface)
* Returns: A #GtkWidget used for configuration.
*/
GtkWidget *
-peas_ui_configurable_create_configure_widget (PeasUIConfigurable *configurable)
+peas_gtk_configurable_create_configure_widget (PeasGtkConfigurable *configurable)
{
- PeasUIConfigurableInterface *iface;
+ PeasGtkConfigurableInterface *iface;
- g_return_val_if_fail (PEAS_UI_IS_CONFIGURABLE (configurable), FALSE);
-
- iface = PEAS_UI_CONFIGURABLE_GET_IFACE (configurable);
+ g_return_val_if_fail (PEAS_GTK_IS_CONFIGURABLE (configurable), FALSE);
+
+ iface = PEAS_GTK_CONFIGURABLE_GET_IFACE (configurable);
if (G_LIKELY (iface->create_configure_widget != NULL))
return iface->create_configure_widget (configurable);
diff --git a/libpeas-gtk/peas-gtk-configurable.h b/libpeas-gtk/peas-gtk-configurable.h
new file mode 100644
index 0000000..0adf549
--- /dev/null
+++ b/libpeas-gtk/peas-gtk-configurable.h
@@ -0,0 +1,53 @@
+/*
+ * peas-gtk-configurable.h
+ * This file is part of libpeas
+ *
+ * Copyright (C) 2009 Steve Frécinaux
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library 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 __PEAS_GTK_CONFIGURABLE_H__
+#define __PEAS_GTK_CONFIGURABLE_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define PEAS_GTK_TYPE_CONFIGURABLE (peas_gtk_configurable_get_type ())
+#define PEAS_GTK_CONFIGURABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PEAS_GTK_TYPE_CONFIGURABLE, PeasGtkConfigurable))
+#define PEAS_GTK_CONFIGURABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), PEAS_GTK_TYPE_CONFIGURABLE, PeasGtkConfigurableInterface))
+#define PEAS_GTK_IS_CONFIGURABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PEAS_GTK_TYPE_CONFIGURABLE))
+#define PEAS_GTK_CONFIGURABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PEAS_GTK_TYPE_CONFIGURABLE, PeasGtkConfigurableInterface))
+
+typedef struct _PeasGtkConfigurable PeasGtkConfigurable; /* dummy typedef */
+typedef struct _PeasGtkConfigurableInterface PeasGtkConfigurableInterface;
+
+struct _PeasGtkConfigurableInterface
+{
+ GTypeInterface g_iface;
+
+ GtkWidget *(*create_configure_widget) (PeasGtkConfigurable *configurable);
+};
+
+GType peas_gtk_configurable_get_type (void);
+GtkWidget *peas_gtk_configurable_create_configure_widget (PeasGtkConfigurable *configurable);
+
+G_END_DECLS
+
+#endif /* __PEAS_GTK_PLUGIN_MANAGER_H__ */
diff --git a/libpeasui/peas-ui-plugin-manager-store.c b/libpeas-gtk/peas-gtk-plugin-manager-store.c
similarity index 55%
rename from libpeasui/peas-ui-plugin-manager-store.c
rename to libpeas-gtk/peas-gtk-plugin-manager-store.c
index 158b24c..99e6fd7 100644
--- a/libpeasui/peas-ui-plugin-manager-store.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager-store.c
@@ -1,5 +1,5 @@
/*
- * peas-plugin-manager-store.c
+ * peas-gtk-plugin-manager-store.c
* This file is part of libpeas
*
* Copyright (C) 2002 Paolo Maggi and James Willcox
@@ -28,7 +28,7 @@
#include <libpeas/peas-plugin-info.h>
-#include "peas-ui-plugin-manager-store.h"
+#include "peas-gtk-plugin-manager-store.h"
static const GType ColumnTypes[] = {
G_TYPE_BOOLEAN, /* Enabled */
@@ -42,10 +42,10 @@ static const GType ColumnTypes[] = {
/* G_STATIC_ASSERT is in glib >= 2.20 and we only depend on 2.18.0 */
#ifdef G_STATIC_ASSERT
-G_STATIC_ASSERT (G_N_ELEMENTS (ColumnTypes) == PEAS_UI_PLUGIN_MANAGER_STORE_N_COLUMNS);
+G_STATIC_ASSERT (G_N_ELEMENTS (ColumnTypes) == PEAS_GTK_PLUGIN_MANAGER_STORE_N_COLUMNS);
#endif
-struct _PeasUIPluginManagerStorePrivate {
+struct _PeasGtkPluginManagerStorePrivate {
PeasEngine *engine;
};
@@ -55,12 +55,12 @@ enum {
PROP_ENGINE
};
-G_DEFINE_TYPE (PeasUIPluginManagerStore, peas_ui_plugin_manager_store, GTK_TYPE_LIST_STORE);
+G_DEFINE_TYPE (PeasGtkPluginManagerStore, peas_gtk_plugin_manager_store, GTK_TYPE_LIST_STORE);
static void
-update_plugin (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter,
- PeasPluginInfo *info)
+update_plugin (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter,
+ PeasPluginInfo *info)
{
gboolean loaded;
gboolean available;
@@ -88,54 +88,54 @@ update_plugin (PeasUIPluginManagerStore *store,
}
gtk_list_store_set (GTK_LIST_STORE (store), iter,
- PEAS_UI_PLUGIN_MANAGER_STORE_ENABLED_COLUMN, loaded,
- PEAS_UI_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN, !builtin && available,
- PEAS_UI_PLUGIN_MANAGER_STORE_ICON_COLUMN, icon_name,
- PEAS_UI_PLUGIN_MANAGER_STORE_ICON_VISIBLE_COLUMN, !available,
- PEAS_UI_PLUGIN_MANAGER_STORE_INFO_COLUMN, markup,
- PEAS_UI_PLUGIN_MANAGER_STORE_INFO_SENSITIVE_COLUMN, available && (!builtin || loaded),
- PEAS_UI_PLUGIN_MANAGER_STORE_PLUGIN_COLUMN, info,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_ENABLED_COLUMN, loaded,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN, !builtin && available,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_ICON_COLUMN, icon_name,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_ICON_VISIBLE_COLUMN, !available,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_INFO_COLUMN, markup,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_INFO_SENSITIVE_COLUMN, available && (!builtin || loaded),
+ PEAS_GTK_PLUGIN_MANAGER_STORE_PLUGIN_COLUMN, info,
-1);
g_free (markup);
}
static void
-plugin_loaded_toggled_cb (PeasEngine *engine,
- PeasPluginInfo *info,
- PeasUIPluginManagerStore *store)
+plugin_loaded_toggled_cb (PeasEngine *engine,
+ PeasPluginInfo *info,
+ PeasGtkPluginManagerStore *store)
{
GtkTreeIter iter;
- if (peas_ui_plugin_manager_store_get_iter_from_plugin (store, &iter, info))
+ if (peas_gtk_plugin_manager_store_get_iter_from_plugin (store, &iter, info))
update_plugin (store, &iter, info);
}
static gint
-model_name_sort_func (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter1,
- GtkTreeIter *iter2,
- gpointer user_data)
+model_name_sort_func (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter1,
+ GtkTreeIter *iter2,
+ gpointer user_data)
{
PeasPluginInfo *info1;
PeasPluginInfo *info2;
- info1 = peas_ui_plugin_manager_store_get_plugin (store, iter1);
- info2 = peas_ui_plugin_manager_store_get_plugin (store, iter2);
+ info1 = peas_gtk_plugin_manager_store_get_plugin (store, iter1);
+ info2 = peas_gtk_plugin_manager_store_get_plugin (store, iter2);
return g_utf8_collate (peas_plugin_info_get_name (info1),
peas_plugin_info_get_name (info2));
}
static void
-peas_ui_plugin_manager_store_init (PeasUIPluginManagerStore *store)
+peas_gtk_plugin_manager_store_init (PeasGtkPluginManagerStore *store)
{
store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store,
- PEAS_UI_TYPE_PLUGIN_MANAGER_STORE,
- PeasUIPluginManagerStorePrivate);
+ PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE,
+ PeasGtkPluginManagerStorePrivate);
gtk_list_store_set_column_types (GTK_LIST_STORE (store),
- PEAS_UI_PLUGIN_MANAGER_STORE_N_COLUMNS,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_N_COLUMNS,
(GType *) ColumnTypes);
/* Sort on the plugin names */
@@ -148,12 +148,12 @@ peas_ui_plugin_manager_store_init (PeasUIPluginManagerStore *store)
}
static void
-peas_ui_plugin_manager_store_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+peas_gtk_plugin_manager_store_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- PeasUIPluginManagerStore *store = PEAS_UI_PLUGIN_MANAGER_STORE (object);
+ PeasGtkPluginManagerStore *store = PEAS_GTK_PLUGIN_MANAGER_STORE (object);
switch (prop_id)
{
@@ -168,12 +168,12 @@ peas_ui_plugin_manager_store_set_property (GObject *object,
}
static void
-peas_ui_plugin_manager_store_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+peas_gtk_plugin_manager_store_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- PeasUIPluginManagerStore *store = PEAS_UI_PLUGIN_MANAGER_STORE (object);
+ PeasGtkPluginManagerStore *store = PEAS_GTK_PLUGIN_MANAGER_STORE (object);
switch (prop_id)
{
@@ -187,9 +187,9 @@ peas_ui_plugin_manager_store_get_property (GObject *object,
}
static void
-peas_ui_plugin_manager_store_constructed (GObject *object)
+peas_gtk_plugin_manager_store_constructed (GObject *object)
{
- PeasUIPluginManagerStore *store = PEAS_UI_PLUGIN_MANAGER_STORE (object);
+ PeasGtkPluginManagerStore *store = PEAS_GTK_PLUGIN_MANAGER_STORE (object);
g_signal_connect_after (store->priv->engine,
"load-plugin",
@@ -200,16 +200,16 @@ peas_ui_plugin_manager_store_constructed (GObject *object)
G_CALLBACK (plugin_loaded_toggled_cb),
store);
- peas_ui_plugin_manager_store_reload (store);
+ peas_gtk_plugin_manager_store_reload (store);
- if (G_OBJECT_CLASS (peas_ui_plugin_manager_store_parent_class)->constructed != NULL)
- G_OBJECT_CLASS (peas_ui_plugin_manager_store_parent_class)->constructed (object);
+ if (G_OBJECT_CLASS (peas_gtk_plugin_manager_store_parent_class)->constructed != NULL)
+ G_OBJECT_CLASS (peas_gtk_plugin_manager_store_parent_class)->constructed (object);
}
static void
-peas_ui_plugin_manager_store_dispose (GObject *object)
+peas_gtk_plugin_manager_store_dispose (GObject *object)
{
- PeasUIPluginManagerStore *store = PEAS_UI_PLUGIN_MANAGER_STORE (object);
+ PeasGtkPluginManagerStore *store = PEAS_GTK_PLUGIN_MANAGER_STORE (object);
if (store->priv->engine != NULL)
{
@@ -221,21 +221,21 @@ peas_ui_plugin_manager_store_dispose (GObject *object)
store->priv->engine = NULL;
}
- G_OBJECT_CLASS (peas_ui_plugin_manager_store_parent_class)->dispose (object);
+ G_OBJECT_CLASS (peas_gtk_plugin_manager_store_parent_class)->dispose (object);
}
static void
-peas_ui_plugin_manager_store_class_init (PeasUIPluginManagerStoreClass *klass)
+peas_gtk_plugin_manager_store_class_init (PeasGtkPluginManagerStoreClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->set_property = peas_ui_plugin_manager_store_set_property;
- object_class->get_property = peas_ui_plugin_manager_store_get_property;
- object_class->constructed = peas_ui_plugin_manager_store_constructed;
- object_class->dispose = peas_ui_plugin_manager_store_dispose;
+ object_class->set_property = peas_gtk_plugin_manager_store_set_property;
+ object_class->get_property = peas_gtk_plugin_manager_store_get_property;
+ object_class->constructed = peas_gtk_plugin_manager_store_constructed;
+ object_class->dispose = peas_gtk_plugin_manager_store_dispose;
/*
- * PeasUIPLuginManagerStore:engine:
+ * PeasGtkPLuginManagerStore:engine:
*
* The #PeasEngine this store is attached to.
*/
@@ -249,41 +249,41 @@ peas_ui_plugin_manager_store_class_init (PeasUIPluginManagerStoreClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private (object_class, sizeof (PeasUIPluginManagerStorePrivate));
+ g_type_class_add_private (object_class, sizeof (PeasGtkPluginManagerStorePrivate));
}
/*
- * peas_ui_plugin_manager_store_new:
+ * peas_gtk_plugin_manager_store_new:
* @engine: A #PeasEngine.
*
* Creates a new plugin manager store for the given #PeasEngine.
*
- * Returns: the new #PeasUIPluginManagerStore.
+ * Returns: the new #PeasGtkPluginManagerStore.
*/
-PeasUIPluginManagerStore *
-peas_ui_plugin_manager_store_new (PeasEngine *engine)
+PeasGtkPluginManagerStore *
+peas_gtk_plugin_manager_store_new (PeasEngine *engine)
{
g_return_val_if_fail (PEAS_IS_ENGINE (engine), NULL);
- return PEAS_UI_PLUGIN_MANAGER_STORE (g_object_new (PEAS_UI_TYPE_PLUGIN_MANAGER_STORE,
- "engine", engine,
- NULL));
+ return PEAS_GTK_PLUGIN_MANAGER_STORE (g_object_new (PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE,
+ "engine", engine,
+ NULL));
}
/*
- * peas_ui_plugin_manager_store_reload:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_reload:
+ * @store: A #PeasGtkPluginManagerStore.
*
* Reloads the list of plugins.
*/
void
-peas_ui_plugin_manager_store_reload (PeasUIPluginManagerStore *store)
+peas_gtk_plugin_manager_store_reload (PeasGtkPluginManagerStore *store)
{
GtkListStore *list_store;
const GList *plugins;
GtkTreeIter iter;
- g_return_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store));
+ g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store));
list_store = GTK_LIST_STORE (store);
@@ -305,26 +305,26 @@ peas_ui_plugin_manager_store_reload (PeasUIPluginManagerStore *store)
}
/*
- * peas_ui_plugin_manager_store_set_enabled:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_set_enabled:
+ * @store: A #PeasGtkPluginManagerStore.
* @iter: A #GtkTreeIter.
* @enabled: If the plugin should be enabled.
*
* Sets if the plugin at @iter should be enabled.
*/
void
-peas_ui_plugin_manager_store_set_enabled (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter,
- gboolean enabled)
+peas_gtk_plugin_manager_store_set_enabled (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter,
+ gboolean enabled)
{
PeasPluginInfo *info;
gboolean success = TRUE;
- g_return_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store));
+ g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store));
g_return_if_fail (iter != NULL);
- g_return_if_fail (peas_ui_plugin_manager_store_can_enable (store, iter));
+ g_return_if_fail (peas_gtk_plugin_manager_store_can_enable (store, iter));
- info = peas_ui_plugin_manager_store_get_plugin (store, iter);
+ info = peas_gtk_plugin_manager_store_get_plugin (store, iter);
g_return_if_fail (info != NULL);
if (enabled)
@@ -345,8 +345,8 @@ peas_ui_plugin_manager_store_set_enabled (PeasUIPluginManagerStore *store,
}
/*
- * peas_ui_plugin_manager_store_set_enabled:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_set_enabled:
+ * @store: A #PeasGtkPluginManagerStore.
* @iter: A #GtkTreeIter.
*
* Returns if the plugin at @iter is enabled.
@@ -354,36 +354,36 @@ peas_ui_plugin_manager_store_set_enabled (PeasUIPluginManagerStore *store,
* Returns: if the plugin at @iter is enabled.
*/
gboolean
-peas_ui_plugin_manager_store_get_enabled (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter)
+peas_gtk_plugin_manager_store_get_enabled (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter)
{
gboolean enabled;
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store), FALSE);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
- PEAS_UI_PLUGIN_MANAGER_STORE_ENABLED_COLUMN, &enabled,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_ENABLED_COLUMN, &enabled,
-1);
return enabled;
}
/*
- * peas_ui_plugin_manager_store_set_all_enabled:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_set_all_enabled:
+ * @store: A #PeasGtkPluginManagerStore.
* @enabled: If all the plugins should be enabled.
*
* Sets if all the plugins should be enabled.
*/
void
-peas_ui_plugin_manager_store_set_all_enabled (PeasUIPluginManagerStore *store,
- gboolean enabled)
+peas_gtk_plugin_manager_store_set_all_enabled (PeasGtkPluginManagerStore *store,
+ gboolean enabled)
{
GtkTreeModel *model;
GtkTreeIter iter;
- g_return_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store));
+ g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store));
model = GTK_TREE_MODEL (store);
@@ -392,36 +392,36 @@ peas_ui_plugin_manager_store_set_all_enabled (PeasUIPluginManagerStore *store,
do
{
- if (peas_ui_plugin_manager_store_can_enable (store, &iter))
- peas_ui_plugin_manager_store_set_enabled (store, &iter, enabled);
+ if (peas_gtk_plugin_manager_store_can_enable (store, &iter))
+ peas_gtk_plugin_manager_store_set_enabled (store, &iter, enabled);
}
while (gtk_tree_model_iter_next (model, &iter));
}
/*
- * peas_ui_plugin_manager_store_toggle_enabled:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_toggle_enabled:
+ * @store: A #PeasGtkPluginManagerStore.
* @iter: A #GtkTreeIter.
*
* Toggles the if the plugin should should be enabled.
*/
void
-peas_ui_plugin_manager_store_toggle_enabled (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter)
+peas_gtk_plugin_manager_store_toggle_enabled (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter)
{
gboolean enabled;
- g_return_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store));
+ g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store));
g_return_if_fail (iter != NULL);
- enabled = peas_ui_plugin_manager_store_get_enabled (store, iter);
+ enabled = peas_gtk_plugin_manager_store_get_enabled (store, iter);
- peas_ui_plugin_manager_store_set_enabled (store, iter, !enabled);
+ peas_gtk_plugin_manager_store_set_enabled (store, iter, !enabled);
}
/*
- * peas_ui_plugin_manager_store_can_enabled:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_can_enabled:
+ * @store: A #PeasGtkPluginManagerStore.
* @iter: A #GtkTreeIter.
*
* Returns if the plugin at @iter can be enabled.
@@ -431,24 +431,24 @@ peas_ui_plugin_manager_store_toggle_enabled (PeasUIPluginManagerStore *store,
* Returns: if the plugin can be enabled.
*/
gboolean
-peas_ui_plugin_manager_store_can_enable (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter)
+peas_gtk_plugin_manager_store_can_enable (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter)
{
gboolean can_enable;
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store), FALSE);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
- PEAS_UI_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN, &can_enable,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN, &can_enable,
-1);
return can_enable;
}
/*
- * peas_ui_plugin_manager_store_get_plugin:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_get_plugin:
+ * @store: A #PeasGtkPluginManagerStore.
* @iter: A #GtkTreeIter.
*
* Returns the plugin at @iter.
@@ -456,24 +456,24 @@ peas_ui_plugin_manager_store_can_enable (PeasUIPluginManagerStore *store,
* Returns: the plugin at @iter.
*/
PeasPluginInfo *
-peas_ui_plugin_manager_store_get_plugin (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter)
+peas_gtk_plugin_manager_store_get_plugin (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter)
{
PeasPluginInfo *info;
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store), NULL);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store), NULL);
g_return_val_if_fail (iter != NULL, NULL);
gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
- PEAS_UI_PLUGIN_MANAGER_STORE_PLUGIN_COLUMN, &info,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_PLUGIN_COLUMN, &info,
-1);
return info;
}
/*
- * peas_ui_plugin_manager_store_get_iter_from_plugin:
- * @store: A #PeasUIPluginManagerStore.
+ * peas_gtk_plugin_manager_store_get_iter_from_plugin:
+ * @store: A #PeasGtkPluginManagerStore.
* @iter: A #GtkTreeIter.
* @info: A #PeasPluginInfo.
*
@@ -482,14 +482,14 @@ peas_ui_plugin_manager_store_get_plugin (PeasUIPluginManagerStore *store,
* Returns: if @iter was set.
*/
gboolean
-peas_ui_plugin_manager_store_get_iter_from_plugin (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter,
- const PeasPluginInfo *info)
+peas_gtk_plugin_manager_store_get_iter_from_plugin (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter,
+ const PeasPluginInfo *info)
{
GtkTreeModel *model = GTK_TREE_MODEL (store);
gboolean found = FALSE;
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_STORE (store), FALSE);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
g_return_val_if_fail (info != NULL, FALSE);
@@ -499,7 +499,7 @@ peas_ui_plugin_manager_store_get_iter_from_plugin (PeasUIPluginManagerStore *sto
do
{
- current_info = peas_ui_plugin_manager_store_get_plugin (store, iter);
+ current_info = peas_gtk_plugin_manager_store_get_plugin (store, iter);
found = (info == current_info);
}
diff --git a/libpeas-gtk/peas-gtk-plugin-manager-store.h b/libpeas-gtk/peas-gtk-plugin-manager-store.h
new file mode 100644
index 0000000..568f621
--- /dev/null
+++ b/libpeas-gtk/peas-gtk-plugin-manager-store.h
@@ -0,0 +1,96 @@
+/*
+ * peas-plugin-manager-store.h
+ * This file is part of libpeas
+ *
+ * Copyright (C) 2002 Paolo Maggi and James Willcox
+ * Copyright (C) 2003-2006 Paolo Maggi, Paolo Borelli
+ * Copyright (C) 2007-2009 Paolo Maggi, Paolo Borelli, Steve Frécinaux
+ * Copyright (C) 2010 Garrett Regier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library 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 __PEAS_GTK_PLUGIN_MANAGER_STORE_H__
+#define __PEAS_GTK_PLUGIN_MANAGER_STORE_H__
+
+#include <gtk/gtk.h>
+#include <libpeas/peas-engine.h>
+#include <libpeas/peas-plugin-info.h>
+
+G_BEGIN_DECLS
+
+enum {
+ PEAS_GTK_PLUGIN_MANAGER_STORE_ENABLED_COLUMN = 0,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_ICON_COLUMN,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_ICON_VISIBLE_COLUMN,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_INFO_COLUMN,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_INFO_SENSITIVE_COLUMN,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_PLUGIN_COLUMN,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_N_COLUMNS
+} PeasGtkPluginManagerStoreColumns;
+
+/*
+ * Type checking and casting macros
+ */
+#define PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE (peas_gtk_plugin_manager_store_get_type())
+#define PEAS_GTK_PLUGIN_MANAGER_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE, PeasGtkPluginManagerStore))
+#define PEAS_GTK_PLUGIN_MANAGER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE, PeasGtkPluginManagerStoreClass))
+#define PEAS_GTK_IS_PLUGIN_MANAGER_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE))
+#define PEAS_GTK_IS_PLUGIN_MANAGER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE))
+#define PEAS_GTK_PLUGIN_MANAGER_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER_STORE, PeasGtkPluginManagerStoreClass))
+
+typedef struct _PeasGtkPluginManagerStore PeasGtkPluginManagerStore;
+typedef struct _PeasGtkPluginManagerStoreClass PeasGtkPluginManagerStoreClass;
+typedef struct _PeasGtkPluginManagerStorePrivate PeasGtkPluginManagerStorePrivate;
+
+struct _PeasGtkPluginManagerStore {
+ GtkListStore parent;
+
+ /*< private > */
+ PeasGtkPluginManagerStorePrivate *priv;
+};
+
+struct _PeasGtkPluginManagerStoreClass {
+ GtkListStoreClass parent_class;
+};
+
+GType peas_gtk_plugin_manager_store_get_type (void) G_GNUC_CONST;
+PeasGtkPluginManagerStore *peas_gtk_plugin_manager_store_new (PeasEngine *engine);
+
+void peas_gtk_plugin_manager_store_reload (PeasGtkPluginManagerStore *store);
+
+void peas_gtk_plugin_manager_store_set_enabled (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter,
+ gboolean enabled);
+gboolean peas_gtk_plugin_manager_store_get_enabled (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter);
+void peas_gtk_plugin_manager_store_set_all_enabled (PeasGtkPluginManagerStore *store,
+ gboolean enabled);
+void peas_gtk_plugin_manager_store_toggle_enabled (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter);
+
+gboolean peas_gtk_plugin_manager_store_can_enable (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter);
+
+PeasPluginInfo *peas_gtk_plugin_manager_store_get_plugin (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter);
+
+gboolean peas_gtk_plugin_manager_store_get_iter_from_plugin (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter,
+ const PeasPluginInfo *info);
+G_END_DECLS
+
+#endif /* __PEAS_GTK_PLUGIN_MANAGER_STORE_H__ */
diff --git a/libpeasui/peas-ui-plugin-manager-view.c b/libpeas-gtk/peas-gtk-plugin-manager-view.c
similarity index 66%
rename from libpeasui/peas-ui-plugin-manager-view.c
rename to libpeas-gtk/peas-gtk-plugin-manager-view.c
index e31cbb3..ca8e875 100644
--- a/libpeasui/peas-ui-plugin-manager-view.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager-view.c
@@ -30,30 +30,30 @@
#include <libpeas/peas-i18n.h>
-#include "peas-ui-plugin-manager-view.h"
-#include "peas-ui-plugin-manager-store.h"
-#include "peas-ui-configurable.h"
+#include "peas-gtk-plugin-manager-view.h"
+#include "peas-gtk-plugin-manager-store.h"
+#include "peas-gtk-configurable.h"
/**
- * SECTION:peas-ui-plugin-manager-view
+ * SECTION:peas-gtk-plugin-manager-view
* @short_description: Management tree view for plugins.
*
- * The #PeasUIPluginManagerView is a tree view that can be used to manage
+ * The #PeasGtkPluginManagerView is a tree view that can be used to manage
* plugins, i.e. load or unload them, and see some pieces of information.
*
* The only thing you need to do as an application writer if you wish
* to use the view to configure your plugins is to instantiate it using
- * peas_ui_plugin_manager_view_new() and pack it into another
+ * peas_gtk_plugin_manager_view_new() and pack it into another
* widget or a window.
*
* Note: Changing the model of the view is not supported.
*
**/
-struct _PeasUIPluginManagerViewPrivate {
+struct _PeasGtkPluginManagerViewPrivate {
PeasEngine *engine;
- PeasUIPluginManagerStore *store;
+ PeasGtkPluginManagerStore *store;
GtkWidget *popup_menu;
@@ -75,11 +75,11 @@ enum {
static guint signals[LAST_SIGNAL];
-G_DEFINE_TYPE (PeasUIPluginManagerView, peas_ui_plugin_manager_view, GTK_TYPE_TREE_VIEW);
+G_DEFINE_TYPE (PeasGtkPluginManagerView, peas_gtk_plugin_manager_view, GTK_TYPE_TREE_VIEW);
static void
-convert_iter_to_child_iter (PeasUIPluginManagerView *view,
- GtkTreeIter *iter)
+convert_iter_to_child_iter (PeasGtkPluginManagerView *view,
+ GtkTreeIter *iter)
{
if (!view->priv->show_builtin)
{
@@ -96,8 +96,8 @@ convert_iter_to_child_iter (PeasUIPluginManagerView *view,
}
static gboolean
-convert_child_iter_to_iter (PeasUIPluginManagerView *view,
- GtkTreeIter *child_iter)
+convert_child_iter_to_iter (PeasGtkPluginManagerView *view,
+ GtkTreeIter *child_iter)
{
gboolean success = TRUE;
@@ -119,15 +119,15 @@ convert_child_iter_to_iter (PeasUIPluginManagerView *view,
}
static void
-plugin_list_changed_cb (PeasEngine *engine,
- GParamSpec *pspec,
- PeasUIPluginManagerView *view)
+plugin_list_changed_cb (PeasEngine *engine,
+ GParamSpec *pspec,
+ PeasGtkPluginManagerView *view)
{
PeasPluginInfo *info;
- info = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
- peas_ui_plugin_manager_store_reload (view->priv->store);
+ peas_gtk_plugin_manager_store_reload (view->priv->store);
if (info == NULL)
{
@@ -138,30 +138,30 @@ plugin_list_changed_cb (PeasEngine *engine,
if (gtk_tree_model_get_iter_first (model, &iter))
{
- PeasUIPluginManagerStore *store;
+ PeasGtkPluginManagerStore *store;
- store = PEAS_UI_PLUGIN_MANAGER_STORE (view->priv->store);
+ store = PEAS_GTK_PLUGIN_MANAGER_STORE (view->priv->store);
convert_iter_to_child_iter (view, &iter);
- info = peas_ui_plugin_manager_store_get_plugin (store, &iter);
+ info = peas_gtk_plugin_manager_store_get_plugin (store, &iter);
}
}
if (info != NULL)
- peas_ui_plugin_manager_view_set_selected_plugin (view, info);
+ peas_gtk_plugin_manager_view_set_selected_plugin (view, info);
}
static gboolean
-filter_builtins_visible (PeasUIPluginManagerStore *store,
- GtkTreeIter *iter,
- PeasUIPluginManagerView *view)
+filter_builtins_visible (PeasGtkPluginManagerStore *store,
+ GtkTreeIter *iter,
+ PeasGtkPluginManagerView *view)
{
PeasPluginInfo *info;
/* We never filter showing builtins */
g_assert (view->priv->show_builtin == FALSE);
- info = peas_ui_plugin_manager_store_get_plugin (store, iter);
+ info = peas_gtk_plugin_manager_store_get_plugin (store, iter);
if (info == NULL)
return FALSE;
@@ -170,9 +170,9 @@ filter_builtins_visible (PeasUIPluginManagerStore *store,
}
static void
-enabled_toggled_cb (GtkCellRendererToggle *cell,
- gchar *path_str,
- PeasUIPluginManagerView *view)
+enabled_toggled_cb (GtkCellRendererToggle *cell,
+ gchar *path_str,
+ PeasGtkPluginManagerView *view)
{
GtkTreeModel *model;
GtkTreePath *path;
@@ -184,17 +184,17 @@ enabled_toggled_cb (GtkCellRendererToggle *cell,
if (gtk_tree_model_get_iter (model, &iter, path))
{
convert_iter_to_child_iter (view, &iter);
- peas_ui_plugin_manager_store_toggle_enabled (view->priv->store, &iter);
+ peas_gtk_plugin_manager_store_toggle_enabled (view->priv->store, &iter);
}
gtk_tree_path_free (path);
}
static void
-row_activated_cb (GtkTreeView *tree_view,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- PeasUIPluginManagerView *view)
+row_activated_cb (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ PeasGtkPluginManagerView *view)
{
GtkTreeIter iter;
@@ -203,17 +203,17 @@ row_activated_cb (GtkTreeView *tree_view,
convert_iter_to_child_iter (view, &iter);
- if (peas_ui_plugin_manager_store_can_enable (view->priv->store, &iter))
- peas_ui_plugin_manager_store_toggle_enabled (view->priv->store, &iter);
+ if (peas_gtk_plugin_manager_store_can_enable (view->priv->store, &iter))
+ peas_gtk_plugin_manager_store_toggle_enabled (view->priv->store, &iter);
}
/* Callback used as the interactive search comparison function */
static gboolean
-name_search_cb (GtkTreeModel *model,
- gint column,
- const gchar *key,
- GtkTreeIter *iter,
- PeasUIPluginManagerView *view)
+name_search_cb (GtkTreeModel *model,
+ gint column,
+ const gchar *key,
+ GtkTreeIter *iter,
+ PeasGtkPluginManagerView *view)
{
PeasPluginInfo *info;
gchar *normalized_string;
@@ -223,7 +223,7 @@ name_search_cb (GtkTreeModel *model,
gint key_len;
gboolean retval;
- info = peas_ui_plugin_manager_store_get_plugin (view->priv->store, iter);
+ info = peas_gtk_plugin_manager_store_get_plugin (view->priv->store, iter);
if (info == NULL)
return FALSE;
@@ -249,8 +249,8 @@ name_search_cb (GtkTreeModel *model,
}
static void
-enabled_menu_cb (GtkMenu *menu,
- PeasUIPluginManagerView *view)
+enabled_menu_cb (GtkMenu *menu,
+ PeasGtkPluginManagerView *view)
{
GtkTreeIter iter;
GtkTreeSelection *selection;
@@ -261,31 +261,31 @@ enabled_menu_cb (GtkMenu *menu,
convert_iter_to_child_iter (view, &iter);
- peas_ui_plugin_manager_store_toggle_enabled (view->priv->store, &iter);
+ peas_gtk_plugin_manager_store_toggle_enabled (view->priv->store, &iter);
}
static void
-enable_all_menu_cb (GtkMenu *menu,
- PeasUIPluginManagerView *view)
+enable_all_menu_cb (GtkMenu *menu,
+ PeasGtkPluginManagerView *view)
{
- peas_ui_plugin_manager_store_set_all_enabled (view->priv->store, TRUE);
+ peas_gtk_plugin_manager_store_set_all_enabled (view->priv->store, TRUE);
}
static void
-disable_all_menu_cb (GtkMenu *menu,
- PeasUIPluginManagerView *view)
+disable_all_menu_cb (GtkMenu *menu,
+ PeasGtkPluginManagerView *view)
{
- peas_ui_plugin_manager_store_set_all_enabled (view->priv->store, FALSE);
+ peas_gtk_plugin_manager_store_set_all_enabled (view->priv->store, FALSE);
}
static GtkWidget *
-create_popup_menu (PeasUIPluginManagerView *view)
+create_popup_menu (PeasGtkPluginManagerView *view)
{
PeasPluginInfo *info;
GtkWidget *menu;
GtkWidget *item;
- info = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
if (info == NULL)
return NULL;
@@ -319,8 +319,8 @@ create_popup_menu (PeasUIPluginManagerView *view)
}
static void
-popup_menu_detach (PeasUIPluginManagerView *view,
- GtkMenu *menu)
+popup_menu_detach (PeasGtkPluginManagerView *view,
+ GtkMenu *menu)
{
view->priv->popup_menu = NULL;
}
@@ -384,9 +384,9 @@ menu_position_under_tree_view (GtkMenu *menu,
}
static void
-show_popup_menu (GtkTreeView *tree_view,
- PeasUIPluginManagerView *view,
- GdkEventButton *event)
+show_popup_menu (GtkTreeView *tree_view,
+ PeasGtkPluginManagerView *view,
+ GdkEventButton *event)
{
if (view->priv->popup_menu)
gtk_widget_destroy (view->priv->popup_menu);
@@ -417,9 +417,9 @@ show_popup_menu (GtkTreeView *tree_view,
}
static gboolean
-button_press_event_cb (GtkWidget *tree_view,
- GdkEventButton *event,
- PeasUIPluginManagerView *view)
+button_press_event_cb (GtkWidget *tree_view,
+ GdkEventButton *event,
+ PeasGtkPluginManagerView *view)
{
GtkWidgetClass *widget_class;
gboolean handled;
@@ -427,7 +427,7 @@ button_press_event_cb (GtkWidget *tree_view,
if (event->type != GDK_BUTTON_PRESS || event->button != 3)
return FALSE;
- widget_class = GTK_WIDGET_CLASS (peas_ui_plugin_manager_view_parent_class);
+ widget_class = GTK_WIDGET_CLASS (peas_gtk_plugin_manager_view_parent_class);
/* The selection must by updated */
handled = widget_class->button_press_event (tree_view, event);
@@ -441,8 +441,8 @@ button_press_event_cb (GtkWidget *tree_view,
}
static gboolean
-popup_menu_cb (GtkTreeView *tree_view,
- PeasUIPluginManagerView *view)
+popup_menu_cb (GtkTreeView *tree_view,
+ PeasGtkPluginManagerView *view)
{
show_popup_menu (tree_view, view, NULL);
@@ -450,14 +450,14 @@ popup_menu_cb (GtkTreeView *tree_view,
}
static void
-peas_ui_plugin_manager_view_init (PeasUIPluginManagerView *view)
+peas_gtk_plugin_manager_view_init (PeasGtkPluginManagerView *view)
{
GtkTreeViewColumn *column;
GtkCellRenderer *cell;
view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view,
- PEAS_UI_TYPE_PLUGIN_MANAGER_VIEW,
- PeasUIPluginManagerViewPrivate);
+ PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW,
+ PeasGtkPluginManagerViewPrivate);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (view), TRUE);
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
@@ -471,10 +471,10 @@ peas_ui_plugin_manager_view_init (PeasUIPluginManagerView *view)
gtk_tree_view_column_pack_start (column, cell, FALSE);
g_object_set (cell, "xpad", 6, NULL);
gtk_tree_view_column_set_attributes (column, cell,
- "active", PEAS_UI_PLUGIN_MANAGER_STORE_ENABLED_COLUMN,
- "activatable", PEAS_UI_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
- "sensitive", PEAS_UI_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
- "visible", PEAS_UI_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
+ "active", PEAS_GTK_PLUGIN_MANAGER_STORE_ENABLED_COLUMN,
+ "activatable", PEAS_GTK_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
+ "sensitive", PEAS_GTK_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
+ "visible", PEAS_GTK_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
NULL);
g_signal_connect (cell,
"toggled",
@@ -492,16 +492,16 @@ peas_ui_plugin_manager_view_init (PeasUIPluginManagerView *view)
gtk_tree_view_column_pack_start (column, cell, FALSE);
g_object_set (cell, "stock-size", GTK_ICON_SIZE_SMALL_TOOLBAR, NULL);
gtk_tree_view_column_set_attributes (column, cell,
- //"sensitive", PEAS_UI_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
- "icon-name", PEAS_UI_PLUGIN_MANAGER_STORE_ICON_COLUMN,
+ //"sensitive", PEAS_GTK_PLUGIN_MANAGER_STORE_CAN_ENABLE_COLUMN,
+ "icon-name", PEAS_GTK_PLUGIN_MANAGER_STORE_ICON_COLUMN,
NULL);
cell = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (column, cell, TRUE);
g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_set_attributes (column, cell,
- "sensitive", PEAS_UI_PLUGIN_MANAGER_STORE_INFO_SENSITIVE_COLUMN,
- "markup", PEAS_UI_PLUGIN_MANAGER_STORE_INFO_COLUMN,
+ "sensitive", PEAS_GTK_PLUGIN_MANAGER_STORE_INFO_SENSITIVE_COLUMN,
+ "markup", PEAS_GTK_PLUGIN_MANAGER_STORE_INFO_COLUMN,
NULL);
gtk_tree_view_column_set_spacing (column, 6);
@@ -509,7 +509,7 @@ peas_ui_plugin_manager_view_init (PeasUIPluginManagerView *view)
/* Enable search for our non-string column */
gtk_tree_view_set_search_column (GTK_TREE_VIEW (view),
- PEAS_UI_PLUGIN_MANAGER_STORE_PLUGIN_COLUMN);
+ PEAS_GTK_PLUGIN_MANAGER_STORE_PLUGIN_COLUMN);
gtk_tree_view_set_search_equal_func (GTK_TREE_VIEW (view),
(GtkTreeViewSearchEqualFunc) name_search_cb,
view,
@@ -532,12 +532,12 @@ peas_ui_plugin_manager_view_init (PeasUIPluginManagerView *view)
}
static void
-peas_ui_plugin_manager_view_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+peas_gtk_plugin_manager_view_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- PeasUIPluginManagerView *view = PEAS_UI_PLUGIN_MANAGER_VIEW (object);
+ PeasGtkPluginManagerView *view = PEAS_GTK_PLUGIN_MANAGER_VIEW (object);
switch (prop_id)
{
@@ -546,7 +546,7 @@ peas_ui_plugin_manager_view_set_property (GObject *object,
g_object_ref (view->priv->engine);
break;
case PROP_SHOW_BUILTIN:
- peas_ui_plugin_manager_view_set_show_builtin (view,
+ peas_gtk_plugin_manager_view_set_show_builtin (view,
g_value_get_boolean (value));
break;
default:
@@ -556,12 +556,12 @@ peas_ui_plugin_manager_view_set_property (GObject *object,
}
static void
-peas_ui_plugin_manager_view_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+peas_gtk_plugin_manager_view_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- PeasUIPluginManagerView *view = PEAS_UI_PLUGIN_MANAGER_VIEW (object);
+ PeasGtkPluginManagerView *view = PEAS_GTK_PLUGIN_MANAGER_VIEW (object);
switch (prop_id)
{
@@ -570,7 +570,7 @@ peas_ui_plugin_manager_view_get_property (GObject *object,
break;
case PROP_SHOW_BUILTIN:
g_value_set_boolean (value,
- peas_ui_plugin_manager_view_get_show_builtin (view));
+ peas_gtk_plugin_manager_view_get_show_builtin (view));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -579,29 +579,29 @@ peas_ui_plugin_manager_view_get_property (GObject *object,
}
static void
-peas_ui_plugin_manager_view_constructed (GObject *object)
+peas_gtk_plugin_manager_view_constructed (GObject *object)
{
- PeasUIPluginManagerView *view = PEAS_UI_PLUGIN_MANAGER_VIEW (object);
+ PeasGtkPluginManagerView *view = PEAS_GTK_PLUGIN_MANAGER_VIEW (object);
- view->priv->store = peas_ui_plugin_manager_store_new (view->priv->engine);
+ view->priv->store = peas_gtk_plugin_manager_store_new (view->priv->engine);
/* Properly set the model */
view->priv->show_builtin = TRUE;
- peas_ui_plugin_manager_view_set_show_builtin (view, FALSE);
+ peas_gtk_plugin_manager_view_set_show_builtin (view, FALSE);
g_signal_connect (view->priv->engine,
"notify::plugin-list",
G_CALLBACK (plugin_list_changed_cb),
view);
- if (G_OBJECT_CLASS (peas_ui_plugin_manager_view_parent_class)->constructed != NULL)
- G_OBJECT_CLASS (peas_ui_plugin_manager_view_parent_class)->constructed (object);
+ if (G_OBJECT_CLASS (peas_gtk_plugin_manager_view_parent_class)->constructed != NULL)
+ G_OBJECT_CLASS (peas_gtk_plugin_manager_view_parent_class)->constructed (object);
}
static void
-peas_ui_plugin_manager_view_dispose (GObject *object)
+peas_gtk_plugin_manager_view_dispose (GObject *object)
{
- PeasUIPluginManagerView *view = PEAS_UI_PLUGIN_MANAGER_VIEW (object);
+ PeasGtkPluginManagerView *view = PEAS_GTK_PLUGIN_MANAGER_VIEW (object);
if (view->priv->popup_menu != NULL)
{
@@ -625,22 +625,22 @@ peas_ui_plugin_manager_view_dispose (GObject *object)
view->priv->engine = NULL;
}
- G_OBJECT_CLASS (peas_ui_plugin_manager_view_parent_class)->dispose (object);
+ G_OBJECT_CLASS (peas_gtk_plugin_manager_view_parent_class)->dispose (object);
}
static void
-peas_ui_plugin_manager_view_class_init (PeasUIPluginManagerViewClass *klass)
+peas_gtk_plugin_manager_view_class_init (PeasGtkPluginManagerViewClass *klass)
{
GType the_type = G_TYPE_FROM_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->set_property = peas_ui_plugin_manager_view_set_property;
- object_class->get_property = peas_ui_plugin_manager_view_get_property;
- object_class->constructed = peas_ui_plugin_manager_view_constructed;
- object_class->dispose = peas_ui_plugin_manager_view_dispose;
+ object_class->set_property = peas_gtk_plugin_manager_view_set_property;
+ object_class->get_property = peas_gtk_plugin_manager_view_get_property;
+ object_class->constructed = peas_gtk_plugin_manager_view_constructed;
+ object_class->dispose = peas_gtk_plugin_manager_view_dispose;
/**
- * PeasUIPLuginManagerView:engine:
+ * PeasGtkPLuginManagerView:engine:
*
* The #PeasEngine this view is attached to.
*/
@@ -655,7 +655,7 @@ peas_ui_plugin_manager_view_class_init (PeasUIPluginManagerViewClass *klass)
G_PARAM_STATIC_STRINGS));
/**
- * PeasUIPLuginManagerView:show-builtin:
+ * PeasGtkPLuginManagerView:show-builtin:
*
* If builtin plugins should be shown.
*/
@@ -669,8 +669,8 @@ peas_ui_plugin_manager_view_class_init (PeasUIPluginManagerViewClass *klass)
G_PARAM_STATIC_STRINGS));
/**
- * PeasUIPluginManagerView::populate-popup:
- * @view: A #PeasUIPluginManagerView.
+ * PeasGtkPluginManagerView::populate-popup:
+ * @view: A #PeasGtkPluginManagerView.
* @menu: A #GtkMenu.
*
* The populate-popup signal is emitted before showing the context
@@ -681,49 +681,49 @@ peas_ui_plugin_manager_view_class_init (PeasUIPluginManagerViewClass *klass)
g_signal_new ("populate-popup",
the_type,
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (PeasUIPluginManagerViewClass, populate_popup),
+ G_STRUCT_OFFSET (PeasGtkPluginManagerViewClass, populate_popup),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE,
1,
GTK_TYPE_MENU);
- g_type_class_add_private (object_class, sizeof (PeasUIPluginManagerViewPrivate));
+ g_type_class_add_private (object_class, sizeof (PeasGtkPluginManagerViewPrivate));
}
/**
- * peas_ui_plugin_manager_view_new:
+ * peas_gtk_plugin_manager_view_new:
* @engine: A #PeasEngine.
*
* Creates a new plugin manager view for the given #PeasEngine.
*
- * Returns: the new #PeasUIPluginManagerView.
+ * Returns: the new #PeasGtkPluginManagerView.
*/
GtkWidget *
-peas_ui_plugin_manager_view_new (PeasEngine *engine)
+peas_gtk_plugin_manager_view_new (PeasEngine *engine)
{
g_return_val_if_fail (PEAS_IS_ENGINE (engine), NULL);
- return GTK_WIDGET (g_object_new (PEAS_UI_TYPE_PLUGIN_MANAGER_VIEW,
+ return GTK_WIDGET (g_object_new (PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW,
"engine", engine,
NULL));
}
/**
- * peas_ui_plugin_manager_view_set_show_builtin:
- * @view: A #PeasUIPluginManagerView.
+ * peas_gtk_plugin_manager_view_set_show_builtin:
+ * @view: A #PeasGtkPluginManagerView.
* @show_builtin: If builtin plugins should be shown.
*
* Sets if builtin plugins should be shown.
*/
void
-peas_ui_plugin_manager_view_set_show_builtin (PeasUIPluginManagerView *view,
- gboolean show_builtin)
+peas_gtk_plugin_manager_view_set_show_builtin (PeasGtkPluginManagerView *view,
+ gboolean show_builtin)
{
GtkTreeIter iter;
gboolean iter_set;
- g_return_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_VIEW (view));
+ g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_VIEW (view));
show_builtin = (show_builtin != FALSE);
@@ -732,7 +732,7 @@ peas_ui_plugin_manager_view_set_show_builtin (PeasUIPluginManagerView *view,
/* We must get the selected iter before setting if builtin
plugins should be shown so the proper model is set */
- iter_set = peas_ui_plugin_manager_view_get_selected_iter (view, &iter);
+ iter_set = peas_gtk_plugin_manager_view_get_selected_iter (view, &iter);
view->priv->show_builtin = show_builtin;
@@ -757,39 +757,39 @@ peas_ui_plugin_manager_view_set_show_builtin (PeasUIPluginManagerView *view,
}
if (iter_set)
- peas_ui_plugin_manager_view_set_selected_iter (view, &iter);
+ peas_gtk_plugin_manager_view_set_selected_iter (view, &iter);
}
/**
- * peas_ui_plugin_manager_view_get_show_builtin:
- * @view: A #PeasUIPluginManagerView.
+ * peas_gtk_plugin_manager_view_get_show_builtin:
+ * @view: A #PeasGtkPluginManagerView.
*
* Returns if builtin plugins should be shown.
*
* Returns: if builtin plugins should be shown.
*/
gboolean
-peas_ui_plugin_manager_view_get_show_builtin (PeasUIPluginManagerView *view)
+peas_gtk_plugin_manager_view_get_show_builtin (PeasGtkPluginManagerView *view)
{
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_VIEW (view), FALSE);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_VIEW (view), FALSE);
return view->priv->show_builtin;
}
/**
- * peas_ui_plugin_manager_view_set_selected_iter:
- * @view: A #PeasUIPluginManagerView.
+ * peas_gtk_plugin_manager_view_set_selected_iter:
+ * @view: A #PeasGtkPluginManagerView.
* @iter: A #GtkTreeIter.
*
* Selects @iter.
*/
void
-peas_ui_plugin_manager_view_set_selected_iter (PeasUIPluginManagerView *view,
- GtkTreeIter *iter)
+peas_gtk_plugin_manager_view_set_selected_iter (PeasGtkPluginManagerView *view,
+ GtkTreeIter *iter)
{
GtkTreeSelection *selection;
- g_return_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_VIEW (view));
+ g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_VIEW (view));
g_return_if_fail (iter != NULL);
if (!convert_child_iter_to_iter (view, iter))
@@ -800,8 +800,8 @@ peas_ui_plugin_manager_view_set_selected_iter (PeasUIPluginManagerView *view,
}
/**
- * peas_ui_plugin_manager_view_get_selected_iter:
- * @view: A #PeasUIPluginManagerView.
+ * peas_gtk_plugin_manager_view_get_selected_iter:
+ * @view: A #PeasGtkPluginManagerView.
* @iter: A #GtkTreeIter.
*
* Returns if @iter was set to the selected plugin.
@@ -809,12 +809,12 @@ peas_ui_plugin_manager_view_set_selected_iter (PeasUIPluginManagerView *view,
* Returns: if @iter was set.
*/
gboolean
-peas_ui_plugin_manager_view_get_selected_iter (PeasUIPluginManagerView *view,
- GtkTreeIter *iter)
+peas_gtk_plugin_manager_view_get_selected_iter (PeasGtkPluginManagerView *view,
+ GtkTreeIter *iter)
{
GtkTreeSelection *selection;
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_VIEW (view), FALSE);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_VIEW (view), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
@@ -828,23 +828,23 @@ peas_ui_plugin_manager_view_get_selected_iter (PeasUIPluginManagerView *view,
}
/**
- * peas_ui_plugin_manager_view_set_selected_plugin:
- * @view: A #PeasUIPluginManagerView.
+ * peas_gtk_plugin_manager_view_set_selected_plugin:
+ * @view: A #PeasGtkPluginManagerView.
* @info: A #PeasPluginInfo.
*
* Selects the given plugin.
*/
void
-peas_ui_plugin_manager_view_set_selected_plugin (PeasUIPluginManagerView *view,
- PeasPluginInfo *info)
+peas_gtk_plugin_manager_view_set_selected_plugin (PeasGtkPluginManagerView *view,
+ PeasPluginInfo *info)
{
GtkTreeIter iter;
GtkTreeSelection *selection;
- g_return_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_VIEW (view));
+ g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_VIEW (view));
g_return_if_fail (info != NULL);
- g_return_if_fail (peas_ui_plugin_manager_store_get_iter_from_plugin (view->priv->store,
+ g_return_if_fail (peas_gtk_plugin_manager_store_get_iter_from_plugin (view->priv->store,
&iter, info));
if (!convert_child_iter_to_iter (view, &iter))
@@ -855,23 +855,23 @@ peas_ui_plugin_manager_view_set_selected_plugin (PeasUIPluginManagerView *view,
}
/**
- * peas_ui_plugin_manager_view_get_selected_plugin:
- * @view: A #PeasUIPluginManagerView.
+ * peas_gtk_plugin_manager_view_get_selected_plugin:
+ * @view: A #PeasGtkPluginManagerView.
*
* Returns the currently selected plugin, or %NULL if a plugin is not selected.
*
* Returns: the selected plugin.
*/
PeasPluginInfo *
-peas_ui_plugin_manager_view_get_selected_plugin (PeasUIPluginManagerView *view)
+peas_gtk_plugin_manager_view_get_selected_plugin (PeasGtkPluginManagerView *view)
{
GtkTreeIter iter;
PeasPluginInfo *info = NULL;
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER_VIEW (view), NULL);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_VIEW (view), NULL);
- if (peas_ui_plugin_manager_view_get_selected_iter (view, &iter))
- info = peas_ui_plugin_manager_store_get_plugin (view->priv->store, &iter);
+ if (peas_gtk_plugin_manager_view_get_selected_iter (view, &iter))
+ info = peas_gtk_plugin_manager_store_get_plugin (view->priv->store, &iter);
return info;
}
diff --git a/libpeas-gtk/peas-gtk-plugin-manager-view.h b/libpeas-gtk/peas-gtk-plugin-manager-view.h
new file mode 100644
index 0000000..7c80a4f
--- /dev/null
+++ b/libpeas-gtk/peas-gtk-plugin-manager-view.h
@@ -0,0 +1,79 @@
+/*
+ * peas-plugin-manager-view.h
+ * This file is part of libpeas
+ *
+ * Copyright (C) 2002 Paolo Maggi and James Willcox
+ * Copyright (C) 2003-2006 Paolo Maggi, Paolo Borelli
+ * Copyright (C) 2007-2009 Paolo Maggi, Paolo Borelli, Steve Frécinaux
+ * Copyright (C) 2010 Garrett Regier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library 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 __PEAS_GTK_PLUGIN_MANAGER_VIEW_H__
+#define __PEAS_GTK_PLUGIN_MANAGER_VIEW_H__
+
+#include <gtk/gtk.h>
+#include <libpeas/peas-engine.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW (peas_gtk_plugin_manager_view_get_type())
+#define PEAS_GTK_PLUGIN_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW, PeasGtkPluginManagerView))
+#define PEAS_GTK_PLUGIN_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW, PeasGtkPluginManagerViewClass))
+#define PEAS_GTK_IS_PLUGIN_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW))
+#define PEAS_GTK_IS_PLUGIN_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW))
+#define PEAS_GTK_PLUGIN_MANAGER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER_VIEW, PeasGtkPluginManagerViewClass))
+
+typedef struct _PeasGtkPluginManagerView PeasGtkPluginManagerView;
+typedef struct _PeasGtkPluginManagerViewClass PeasGtkPluginManagerViewClass;
+typedef struct _PeasGtkPluginManagerViewPrivate PeasGtkPluginManagerViewPrivate;
+
+struct _PeasGtkPluginManagerView {
+ GtkTreeView parent;
+
+ /*< private > */
+ PeasGtkPluginManagerViewPrivate *priv;
+};
+
+struct _PeasGtkPluginManagerViewClass {
+ GtkTreeViewClass parent_class;
+
+ void (*populate_popup) (PeasGtkPluginManagerView *view,
+ GtkMenu *menu);
+};
+
+GType peas_gtk_plugin_manager_view_get_type (void) G_GNUC_CONST;
+GtkWidget *peas_gtk_plugin_manager_view_new (PeasEngine *engine);
+
+void peas_gtk_plugin_manager_view_set_show_builtin (PeasGtkPluginManagerView *view,
+ gboolean show_builtin);
+gboolean peas_gtk_plugin_manager_view_get_show_builtin (PeasGtkPluginManagerView *view);
+
+void peas_gtk_plugin_manager_view_set_selected_iter (PeasGtkPluginManagerView *view,
+ GtkTreeIter *iter);
+gboolean peas_gtk_plugin_manager_view_get_selected_iter (PeasGtkPluginManagerView *view,
+ GtkTreeIter *iter);
+
+void peas_gtk_plugin_manager_view_set_selected_plugin (PeasGtkPluginManagerView *view,
+ PeasPluginInfo *info);
+PeasPluginInfo *peas_gtk_plugin_manager_view_get_selected_plugin (PeasGtkPluginManagerView *view);
+
+G_END_DECLS
+
+#endif /* __PEAS_GTK_PLUGIN_MANAGER_VIEW_H__ */
diff --git a/libpeasui/peas-ui-plugin-manager.c b/libpeas-gtk/peas-gtk-plugin-manager.c
similarity index 75%
rename from libpeasui/peas-ui-plugin-manager.c
rename to libpeas-gtk/peas-gtk-plugin-manager.c
index 4850cc0..b0d736e 100644
--- a/libpeasui/peas-ui-plugin-manager.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager.c
@@ -36,27 +36,27 @@
#include <libpeas/peas-plugin-info.h>
#include <libpeas/peas-i18n.h>
-#include "peas-ui-plugin-manager.h"
-#include "peas-ui-plugin-manager-view.h"
-#include "peas-ui-configurable.h"
+#include "peas-gtk-plugin-manager.h"
+#include "peas-gtk-plugin-manager-view.h"
+#include "peas-gtk-configurable.h"
/**
- * SECTION:peas-ui-plugin-manager
- * @short_description: Management GUI for plugins.
+ * SECTION:peas-gtk-plugin-manager
+ * @short_description: Management GGtk for plugins.
*
- * The #PeasUIPluginManager is a widget that can be used to manage plugins,
+ * The #PeasGtkPluginManager is a widget that can be used to manage plugins,
* i.e. load or unload them, and see some pieces of information.
*
- * <inlinegraphic fileref="peas-ui-plugin-manager.png" format="PNG" />
+ * <inlinegraphic fileref="peas-gtk-plugin-manager.png" format="PNG" />
*
* The only thing you need to do as an application writer if you wish to use
* the manager to configure your plugins is to instantiate it using
- * peas_ui_plugin_manager_new() and pack it into another widget or a window
+ * peas_gtk_plugin_manager_new() and pack it into another widget or a window
* (as in the screenshot above).
*
**/
-struct _PeasUIPluginManagerPrivate {
+struct _PeasGtkPluginManagerPrivate {
PeasEngine *engine;
GtkWidget *sw;
@@ -74,23 +74,23 @@ enum {
PROP_ENGINE
};
-G_DEFINE_TYPE (PeasUIPluginManager, peas_ui_plugin_manager, GTK_TYPE_VBOX);
+G_DEFINE_TYPE (PeasGtkPluginManager, peas_gtk_plugin_manager, GTK_TYPE_VBOX);
static gboolean
-plugin_is_configurable (PeasUIPluginManager *pm,
- PeasPluginInfo *info)
+plugin_is_configurable (PeasGtkPluginManager *pm,
+ PeasPluginInfo *info)
{
if (info == NULL || !peas_plugin_info_is_loaded (info))
return FALSE;
return peas_engine_provides_extension (pm->priv->engine,
info,
- PEAS_UI_TYPE_CONFIGURABLE);
+ PEAS_GTK_TYPE_CONFIGURABLE);
}
static void
-update_button_sensitivity (PeasUIPluginManager *pm,
- PeasPluginInfo *info)
+update_button_sensitivity (PeasGtkPluginManager *pm,
+ PeasPluginInfo *info)
{
gtk_widget_set_sensitive (pm->priv->about_button, info != NULL);
gtk_widget_set_sensitive (pm->priv->configure_button,
@@ -98,15 +98,15 @@ update_button_sensitivity (PeasUIPluginManager *pm,
}
static void
-show_about_cb (GtkWidget *widget,
- PeasUIPluginManager *pm)
+show_about_cb (GtkWidget *widget,
+ PeasGtkPluginManager *pm)
{
- PeasUIPluginManagerView *view;
+ PeasGtkPluginManagerView *view;
PeasPluginInfo *info;
- view = PEAS_UI_PLUGIN_MANAGER_VIEW (pm->priv->view);
+ view = PEAS_GTK_PLUGIN_MANAGER_VIEW (pm->priv->view);
- info = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
g_return_if_fail (info != NULL);
/* if there is another about dialog already open destroy it */
@@ -167,7 +167,7 @@ help_button_cb (GtkWidget *button,
if (error == NULL)
return;
- g_debug ("PeasUIPluginManager: could not show help uri: '%s'", help_uri);
+ g_debug ("PeasGtkPluginManager: could not show help uri: '%s'", help_uri);
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (button));
error_dlg = gtk_message_dialog_new (toplevel,
@@ -203,10 +203,10 @@ help_button_cb (GtkWidget *button,
}
static void
-show_configure_cb (GtkWidget *widget,
- PeasUIPluginManager *pm)
+show_configure_cb (GtkWidget *widget,
+ PeasGtkPluginManager *pm)
{
- PeasUIPluginManagerView *view = PEAS_UI_PLUGIN_MANAGER_VIEW (pm->priv->view);
+ PeasGtkPluginManagerView *view = PEAS_GTK_PLUGIN_MANAGER_VIEW (pm->priv->view);
PeasPluginInfo *info;
PeasExtension *exten;
GtkWindow *toplevel;
@@ -215,10 +215,10 @@ show_configure_cb (GtkWidget *widget,
GtkWidget *vbox;
GtkWindowGroup *wg;
- info = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
g_return_if_fail (info != NULL);
- exten = peas_engine_create_extension (pm->priv->engine, info, PEAS_UI_TYPE_CONFIGURABLE, NULL);
+ exten = peas_engine_create_extension (pm->priv->engine, info, PEAS_GTK_TYPE_CONFIGURABLE, NULL);
g_return_if_fail (PEAS_IS_EXTENSION (exten));
peas_extension_call (exten, "create_configure_widget", &conf_widget);
@@ -278,15 +278,15 @@ show_configure_cb (GtkWidget *widget,
}
static void
-plugin_loaded_toggled_cb (PeasEngine *engine,
- PeasPluginInfo *info,
- PeasUIPluginManager *pm)
+plugin_loaded_toggled_cb (PeasEngine *engine,
+ PeasPluginInfo *info,
+ PeasGtkPluginManager *pm)
{
- PeasUIPluginManagerView *view;
+ PeasGtkPluginManagerView *view;
PeasPluginInfo *selected;
- view = PEAS_UI_PLUGIN_MANAGER_VIEW (pm->priv->view);
- selected = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ view = PEAS_GTK_PLUGIN_MANAGER_VIEW (pm->priv->view);
+ selected = peas_gtk_plugin_manager_view_get_selected_plugin (view);
if (selected == info)
update_button_sensitivity (pm, info);
@@ -294,40 +294,40 @@ plugin_loaded_toggled_cb (PeasEngine *engine,
static void
selection_changed_cb (GtkTreeSelection *selection,
- PeasUIPluginManager *pm)
+ PeasGtkPluginManager *pm)
{
- PeasUIPluginManagerView *view;
+ PeasGtkPluginManagerView *view;
PeasPluginInfo *info;
- view = PEAS_UI_PLUGIN_MANAGER_VIEW (pm->priv->view);
- info = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ view = PEAS_GTK_PLUGIN_MANAGER_VIEW (pm->priv->view);
+ info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
update_button_sensitivity (pm, info);
}
static void
cursor_changed_cb (GtkTreeView *tree_view,
- PeasUIPluginManager *pm)
+ PeasGtkPluginManager *pm)
{
- PeasUIPluginManagerView *view;
+ PeasGtkPluginManagerView *view;
PeasPluginInfo *info;
- view = PEAS_UI_PLUGIN_MANAGER_VIEW (pm->priv->view);
- info = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ view = PEAS_GTK_PLUGIN_MANAGER_VIEW (pm->priv->view);
+ info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
update_button_sensitivity (pm, info);
}
static void
-populate_popup_cb (PeasUIPluginManagerView *view,
- GtkMenu *menu,
- PeasUIPluginManager *pm)
+populate_popup_cb (PeasGtkPluginManagerView *view,
+ GtkMenu *menu,
+ PeasGtkPluginManager *pm)
{
PeasPluginInfo *info;
GtkWidget *item;
GtkWidget *image;
- info = peas_ui_plugin_manager_view_get_selected_plugin (view);
+ info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
if (info == NULL)
return;
@@ -348,14 +348,14 @@ populate_popup_cb (PeasUIPluginManagerView *view,
}
static void
-peas_ui_plugin_manager_init (PeasUIPluginManager *pm)
+peas_gtk_plugin_manager_init (PeasGtkPluginManager *pm)
{
GtkWidget *label;
GtkWidget *hbuttonbox;
pm->priv = G_TYPE_INSTANCE_GET_PRIVATE (pm,
- PEAS_UI_TYPE_PLUGIN_MANAGER,
- PeasUIPluginManagerPrivate);
+ PEAS_GTK_TYPE_PLUGIN_MANAGER,
+ PeasGtkPluginManagerPrivate);
gtk_box_set_spacing (GTK_BOX (pm), 6);
@@ -401,12 +401,12 @@ peas_ui_plugin_manager_init (PeasUIPluginManager *pm)
}
static void
-peas_ui_plugin_manager_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+peas_gtk_plugin_manager_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- PeasUIPluginManager *pm = PEAS_UI_PLUGIN_MANAGER (object);
+ PeasGtkPluginManager *pm = PEAS_GTK_PLUGIN_MANAGER (object);
switch (prop_id)
{
@@ -421,12 +421,12 @@ peas_ui_plugin_manager_set_property (GObject *object,
}
static void
-peas_ui_plugin_manager_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+peas_gtk_plugin_manager_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- PeasUIPluginManager *pm = PEAS_UI_PLUGIN_MANAGER (object);
+ PeasGtkPluginManager *pm = PEAS_GTK_PLUGIN_MANAGER (object);
switch (prop_id)
{
@@ -440,16 +440,16 @@ peas_ui_plugin_manager_get_property (GObject *object,
}
static void
-peas_ui_plugin_manager_constructed (GObject *object)
+peas_gtk_plugin_manager_constructed (GObject *object)
{
- PeasUIPluginManager *pm = PEAS_UI_PLUGIN_MANAGER (object);
+ PeasGtkPluginManager *pm = PEAS_GTK_PLUGIN_MANAGER (object);
GtkTreeSelection *selection;
/* When we create the manager, we always rescan the plugins directory
Must come after the view has connected to notify::plugin-list */
peas_engine_rescan_plugins (pm->priv->engine);
- pm->priv->view = peas_ui_plugin_manager_view_new (pm->priv->engine);
+ pm->priv->view = peas_gtk_plugin_manager_view_new (pm->priv->engine);
gtk_container_add (GTK_CONTAINER (pm->priv->sw), pm->priv->view);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (pm->priv->view));
@@ -478,14 +478,14 @@ peas_ui_plugin_manager_constructed (GObject *object)
/* Update the button sensitivity */
selection_changed_cb (selection, pm);
- if (G_OBJECT_CLASS (peas_ui_plugin_manager_parent_class)->constructed != NULL)
- G_OBJECT_CLASS (peas_ui_plugin_manager_parent_class)->constructed (object);
+ if (G_OBJECT_CLASS (peas_gtk_plugin_manager_parent_class)->constructed != NULL)
+ G_OBJECT_CLASS (peas_gtk_plugin_manager_parent_class)->constructed (object);
}
static void
-peas_ui_plugin_manager_dispose (GObject *object)
+peas_gtk_plugin_manager_dispose (GObject *object)
{
- PeasUIPluginManager *pm = PEAS_UI_PLUGIN_MANAGER (object);
+ PeasGtkPluginManager *pm = PEAS_GTK_PLUGIN_MANAGER (object);
if (pm->priv->engine != NULL)
{
@@ -497,21 +497,21 @@ peas_ui_plugin_manager_dispose (GObject *object)
pm->priv->engine = NULL;
}
- G_OBJECT_CLASS (peas_ui_plugin_manager_parent_class)->dispose (object);
+ G_OBJECT_CLASS (peas_gtk_plugin_manager_parent_class)->dispose (object);
}
static void
-peas_ui_plugin_manager_class_init (PeasUIPluginManagerClass *klass)
+peas_gtk_plugin_manager_class_init (PeasGtkPluginManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->set_property = peas_ui_plugin_manager_set_property;
- object_class->get_property = peas_ui_plugin_manager_get_property;
- object_class->constructed = peas_ui_plugin_manager_constructed;
- object_class->dispose = peas_ui_plugin_manager_dispose;
+ object_class->set_property = peas_gtk_plugin_manager_set_property;
+ object_class->get_property = peas_gtk_plugin_manager_get_property;
+ object_class->constructed = peas_gtk_plugin_manager_constructed;
+ object_class->dispose = peas_gtk_plugin_manager_dispose;
/**
- * PeasUIPLuginManager:engine:
+ * PeasGtkPLuginManager:engine:
*
* The #PeasEngine this manager is attached to.
*/
@@ -525,39 +525,39 @@ peas_ui_plugin_manager_class_init (PeasUIPluginManagerClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private (object_class, sizeof (PeasUIPluginManagerPrivate));
+ g_type_class_add_private (object_class, sizeof (PeasGtkPluginManagerPrivate));
}
/**
- * peas_ui_plugin_manager_new:
+ * peas_gtk_plugin_manager_new:
* @engine: A #PeasEngine.
*
* Creates a new plugin manager for the given #PeasEngine.
*
- * Returns: the new #PeasUIPluginManager.
+ * Returns: the new #PeasGtkPluginManager.
*/
GtkWidget *
-peas_ui_plugin_manager_new (PeasEngine *engine)
+peas_gtk_plugin_manager_new (PeasEngine *engine)
{
g_return_val_if_fail (PEAS_IS_ENGINE (engine), NULL);
- return GTK_WIDGET (g_object_new (PEAS_UI_TYPE_PLUGIN_MANAGER,
+ return GTK_WIDGET (g_object_new (PEAS_GTK_TYPE_PLUGIN_MANAGER,
"engine", engine,
NULL));
}
/**
- * peas_ui_plugin_manager_get_view:
- * @pm: A @PeasUIPluginManager.
+ * peas_gtk_plugin_manager_get_view:
+ * @pm: A @PeasGtkPluginManager.
*
- * Returns the #PeasUIPluginManagerView of @pm.
+ * Returns the #PeasGtkPluginManagerView of @pm.
*
* Returns: the view of @pm.
*/
GtkWidget *
-peas_ui_plugin_manager_get_view (PeasUIPluginManager *pm)
+peas_gtk_plugin_manager_get_view (PeasGtkPluginManager *pm)
{
- g_return_val_if_fail (PEAS_UI_IS_PLUGIN_MANAGER (pm), NULL);
+ g_return_val_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER (pm), NULL);
return pm->priv->view;
}
diff --git a/libpeas-gtk/peas-gtk-plugin-manager.h b/libpeas-gtk/peas-gtk-plugin-manager.h
new file mode 100644
index 0000000..96a72cd
--- /dev/null
+++ b/libpeas-gtk/peas-gtk-plugin-manager.h
@@ -0,0 +1,64 @@
+/*
+ * peas-gtk-plugin-manager.h
+ * This file is part of libpeas
+ *
+ * Copyright (C) 2005-2009 Paolo Maggi, Paolo Borelli
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library 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 __PEAS_GTK_PLUGIN_MANAGER_H__
+#define __PEAS_GTK_PLUGIN_MANAGER_H__
+
+#include <gtk/gtk.h>
+#include <libpeas/peas-engine.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define PEAS_GTK_TYPE_PLUGIN_MANAGER (peas_gtk_plugin_manager_get_type())
+#define PEAS_GTK_PLUGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER, PeasGtkPluginManager))
+#define PEAS_GTK_PLUGIN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PEAS_GTK_TYPE_PLUGIN_MANAGER, PeasGtkPluginManagerClass))
+#define PEAS_GTK_IS_PLUGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER))
+#define PEAS_GTK_IS_PLUGIN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PEAS_GTK_TYPE_PLUGIN_MANAGER))
+#define PEAS_GTK_PLUGIN_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PEAS_GTK_TYPE_PLUGIN_MANAGER, PeasGtkPluginManagerClass))
+
+typedef struct _PeasGtkPluginManager PeasGtkPluginManager;
+typedef struct _PeasGtkPluginManagerClass PeasGtkPluginManagerClass;
+typedef struct _PeasGtkPluginManagerPrivate PeasGtkPluginManagerPrivate;
+
+struct _PeasGtkPluginManager
+{
+ GtkVBox vbox;
+
+ /*< private > */
+ PeasGtkPluginManagerPrivate *priv;
+};
+
+struct _PeasGtkPluginManagerClass
+{
+ GtkVBoxClass parent_class;
+};
+
+GType peas_gtk_plugin_manager_get_type (void) G_GNUC_CONST;
+GtkWidget *peas_gtk_plugin_manager_new (PeasEngine *engine);
+
+GtkWidget *peas_gtk_plugin_manager_get_view (PeasGtkPluginManager *pm);
+
+G_END_DECLS
+
+#endif /* __PEAS_GTK_PLUGIN_MANAGER_H__ */
diff --git a/libpeasui/peas-ui.h b/libpeas-gtk/peas-gtk.h
similarity index 82%
rename from libpeasui/peas-ui.h
rename to libpeas-gtk/peas-gtk.h
index b722d49..8a1ac41 100644
--- a/libpeasui/peas-ui.h
+++ b/libpeas-gtk/peas-gtk.h
@@ -1,5 +1,5 @@
/*
- * peas-ui.h
+ * peas-gtk.h
* This file is part of libpeas
*
* This program is free software; you can redistribute it and/or modify
@@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __PEAS_UI_H__
-#define __PEAS_UI_H__
+#ifndef __PEAS_GTK_H__
+#define __PEAS_GTK_H__
-#include "peas-ui-configurable.h"
-#include "peas-ui-plugin-manager.h"
-#include "peas-ui-plugin-manager-view.h"
+#include "peas-gtk-configurable.h"
+#include "peas-gtk-plugin-manager.h"
+#include "peas-gtk-plugin-manager-view.h"
#endif
diff --git a/peas-demo/Makefile.am b/peas-demo/Makefile.am
index acea17b..a7ab1b7 100644
--- a/peas-demo/Makefile.am
+++ b/peas-demo/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES = \
-I$(top_srcdir) \
-I$(srcdir) \
$(PEAS_CFLAGS) \
- $(PEASUI_CFLAGS) \
+ $(PEAS_GTK_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED)
@@ -16,10 +16,10 @@ peas_demo_SOURCES = \
peas-demo.c
peas_demo_LDADD = \
- ../libpeas/libpeas-1.0.la \
- ../libpeasui/libpeasui-1.0.la \
- $(PEAS_LIBS) \
- $(PEASUI_LIBS)
+ ../libpeas/libpeas-1.0.la \
+ ../libpeas-gtk/libpeas-gtk-1.0.la \
+ $(PEAS_LIBS) \
+ $(PEAS_GTK_LIBS)
peas_demo_CFLAGS = \
$(PEAS_CFLAGS) \
diff --git a/peas-demo/peas-demo.c b/peas-demo/peas-demo.c
index a30e346..ee90c1c 100644
--- a/peas-demo/peas-demo.c
+++ b/peas-demo/peas-demo.c
@@ -25,7 +25,7 @@
#include <girepository.h>
#include <libpeas/peas.h>
#include <libpeas/peas-i18n.h>
-#include <libpeasui/peas-ui.h>
+#include <libpeas-gtk/peas-gtk.h>
#include "peas-demo-window.h"
@@ -62,7 +62,7 @@ create_plugin_manager (GtkButton *button,
gtk_container_set_border_width (GTK_CONTAINER (window), 6);
gtk_window_set_title (GTK_WINDOW (window), "Peas Plugin Manager");
- manager = peas_ui_plugin_manager_new (engine);
+ manager = peas_gtk_plugin_manager_new (engine);
gtk_container_add (GTK_CONTAINER (window), manager);
gtk_widget_show_all (window);
@@ -164,7 +164,7 @@ main (int argc,
search_paths[3] = g_strdup (PEAS_PREFIX "/share/peas-demo/plugins/");
}
- g_irepository_require (g_irepository_get_default (), "PeasUI", "1.0", 0, NULL);
+ g_irepository_require (g_irepository_get_default (), "PeasGtk", "1.0", 0, NULL);
engine = peas_engine_new ("PeasDemo",
PEAS_LIBDIR "/peas-demo/",
diff --git a/peas-demo/plugins/helloworld/Makefile.am b/peas-demo/plugins/helloworld/Makefile.am
index 9bde239..da6db19 100644
--- a/peas-demo/plugins/helloworld/Makefile.am
+++ b/peas-demo/plugins/helloworld/Makefile.am
@@ -3,7 +3,7 @@ plugindir = $(libdir)/peas-demo/plugins/helloworld
INCLUDES = \
-I$(top_srcdir) \
$(PEAS_CFLAGS) \
- $(PEASUI_CFLAGS)
+ $(PEAS_GTK_CFLAGS)
plugin_LTLIBRARIES = libhelloworld.la
@@ -14,7 +14,7 @@ libhelloworld_la_SOURCES = \
peasdemo-hello-world-configurable.c
libhelloworld_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libhelloworld_la_LIBADD = $(PEAS_LIBS) $(PEASUI_LIBS)
+libhelloworld_la_LIBADD = $(PEAS_LIBS) $(PEAS_GTK_LIBS)
plugin_DATA = helloworld.peasdemo-plugin
diff --git a/peas-demo/plugins/helloworld/peasdemo-hello-world-configurable.c b/peas-demo/plugins/helloworld/peasdemo-hello-world-configurable.c
index 2d7dabc..d50135c 100644
--- a/peas-demo/plugins/helloworld/peasdemo-hello-world-configurable.c
+++ b/peas-demo/plugins/helloworld/peasdemo-hello-world-configurable.c
@@ -4,18 +4,18 @@
#include <gtk/gtk.h>
#include <libpeas/peas.h>
-#include <libpeasui/peas-ui.h>
+#include <libpeas-gtk/peas-gtk.h>
#include "peasdemo-hello-world-configurable.h"
-static void peas_ui_configurable_iface_init (PeasUIConfigurableInterface *iface);
+static void peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (PeasDemoHelloWorldConfigurable,
peasdemo_hello_world_configurable,
PEAS_TYPE_EXTENSION_BASE,
0,
- G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_UI_TYPE_CONFIGURABLE,
- peas_ui_configurable_iface_init))
+ G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE,
+ peas_gtk_configurable_iface_init))
static void
peasdemo_hello_world_configurable_init (PeasDemoHelloWorldConfigurable *plugin)
@@ -24,7 +24,7 @@ peasdemo_hello_world_configurable_init (PeasDemoHelloWorldConfigurable *plugin)
}
static GtkWidget *
-peasdemo_hello_world_configurable_create_configure_widget (PeasUIConfigurable *configurable)
+peasdemo_hello_world_configurable_create_configure_widget (PeasGtkConfigurable *configurable)
{
g_debug (G_STRFUNC);
@@ -37,7 +37,7 @@ peasdemo_hello_world_configurable_class_init (PeasDemoHelloWorldConfigurableClas
}
static void
-peas_ui_configurable_iface_init (PeasUIConfigurableInterface *iface)
+peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface)
{
iface->create_configure_widget = peasdemo_hello_world_configurable_create_configure_widget;
}
diff --git a/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c b/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
index 86ae15e..fcc1cba 100644
--- a/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
+++ b/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
@@ -4,7 +4,7 @@
#include <gtk/gtk.h>
#include <libpeas/peas.h>
-#include <libpeasui/peas-ui.h>
+#include <libpeas-gtk/peas-gtk.h>
#include "peasdemo-hello-world-plugin.h"
#include "peasdemo-hello-world-configurable.h"
@@ -146,6 +146,6 @@ peas_register_types (PeasObjectModule *module)
PEAS_TYPE_ACTIVATABLE,
PEASDEMO_TYPE_HELLO_WORLD_PLUGIN);
peas_object_module_register_extension_type (module,
- PEAS_UI_TYPE_CONFIGURABLE,
+ PEAS_GTK_TYPE_CONFIGURABLE,
PEASDEMO_TYPE_HELLO_WORLD_CONFIGURABLE);
}
diff --git a/peas-demo/plugins/pythonhello/pythonhello.py b/peas-demo/plugins/pythonhello/pythonhello.py
index 4827b78..285972c 100644
--- a/peas-demo/plugins/pythonhello/pythonhello.py
+++ b/peas-demo/plugins/pythonhello/pythonhello.py
@@ -3,7 +3,7 @@
import gobject
from gi.repository import Peas
-from gi.repository import PeasUI
+from gi.repository import PeasGtk
from gi.repository import Gtk
LABEL_STRING="Python Says Hello!"
@@ -30,7 +30,7 @@ class PythonHelloPlugin(gobject.GObject, Peas.Activatable):
def do_update_state(self):
print "PythonHelloPlugin.do_update_state", repr(self.object)
-class PythonHelloConfigurable(gobject.GObject, PeasUI.Configurable):
+class PythonHelloConfigurable(gobject.GObject, PeasGtk.Configurable):
__gtype_name__ = 'PythonHelloConfigurable'
def do_create_configure_widget(self):
diff --git a/peas-demo/plugins/secondtime/Makefile.am b/peas-demo/plugins/secondtime/Makefile.am
index 3a1c4c5..0149e8f 100644
--- a/peas-demo/plugins/secondtime/Makefile.am
+++ b/peas-demo/plugins/secondtime/Makefile.am
@@ -3,7 +3,7 @@ plugindir = $(libdir)/peas-demo/plugins/secondtime
INCLUDES = \
-I$(top_srcdir) \
$(PEAS_CFLAGS) \
- $(PEASUI_CFLAGS)
+ $(PEAS_GTK_CFLAGS)
plugin_LTLIBRARIES = libsecondtime.la
@@ -12,7 +12,7 @@ libsecondtime_la_SOURCES = \
second-time.c
libsecondtime_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libsecondtime_la_LIBADD = $(PEAS_LIBS) $(PEASUI_LIBS)
+libsecondtime_la_LIBADD = $(PEAS_LIBS) $(PEAS_GTK_LIBS)
plugin_DATA = secondtime.peasdemo-plugin
diff --git a/peas-demo/plugins/seedhello/seedhello.js b/peas-demo/plugins/seedhello/seedhello.js
index 43c60ad..4ae0b8a 100644
--- a/peas-demo/plugins/seedhello/seedhello.js
+++ b/peas-demo/plugins/seedhello/seedhello.js
@@ -29,5 +29,5 @@ configurable_extension = {
extensions = {
'PeasActivatable': activatable_extension,
- 'PeasUIConfigurable': configurable_extension,
+ 'PeasGtkConfigurable': configurable_extension,
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]