[vinagre] Bump peas to 0.5.5 and fix vinagre to use the new api
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Bump peas to 0.5.5 and fix vinagre to use the new api
- Date: Wed, 18 Aug 2010 13:08:44 +0000 (UTC)
commit 10dde844884f45a94753308f973351b51960e1f1
Author: Jonh Wendell <jwendell gnome org>
Date: Wed Aug 18 10:08:00 2010 -0300
Bump peas to 0.5.5 and fix vinagre to use the new api
configure.ac | 4 +-
vinagre/Makefile.am | 2 +-
vinagre/vinagre-connect.c | 3 +-
vinagre/vinagre-plugin-dialog.c | 4 +-
vinagre/vinagre-plugins-engine.c | 75 +++++---------------------------------
5 files changed, 16 insertions(+), 72 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index dd280af..24ede4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,7 +81,7 @@ PANEL_REQUIRED_VERSION=2.0.0
TELEPATHY_GLIB_REQUIRED=0.11.6
XML_REQUIRED=2.6.31
VTE_REQUIRED=0.20
-PEAS_REQUIRED=0.5.2
+PEAS_REQUIRED=0.5.5
# Check for avahi
AC_ARG_ENABLE(avahi,
@@ -110,7 +110,7 @@ PKG_CHECK_MODULES(VINAGRE, \
libxml-2.0 >= $XML_REQUIRED \
dbus-glib-1 \
libpeas-1.0 >= $PEAS_REQUIRED \
- libpeasui-1.0 >= $PEAS_REQUIRED
+ libpeas-gtk-1.0 >= $PEAS_REQUIRED
)
AC_SUBST(VINAGRE_CFLAGS)
AC_SUBST(VINAGRE_LIBS)
diff --git a/vinagre/Makefile.am b/vinagre/Makefile.am
index 41491c1..27cd178 100644
--- a/vinagre/Makefile.am
+++ b/vinagre/Makefile.am
@@ -288,7 +288,7 @@ Vinagre_3_0_gir_INCLUDES = Gtk-3.0 libxml2-2.0 Peas-1.0 PeasUI-1.0
girdir = $(datadir)/vinagre/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
-typelibdir = $(libdir)/girepository-1.0
+typelibdir = $(libdir)/vinagre-1/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += \
diff --git a/vinagre/vinagre-connect.c b/vinagre/vinagre-connect.c
index 2a253ab..b619f26 100644
--- a/vinagre/vinagre-connect.c
+++ b/vinagre/vinagre-connect.c
@@ -154,8 +154,7 @@ setup_protocol (VinagreConnectDialog *dialog)
if (!description || !description[0])
continue;
- //widget = vinagre_protocol_ext_get_connect_widget (ext, NULL);
- widget = NULL;
+ widget = vinagre_protocol_ext_get_connect_widget (ext, NULL);
gtk_list_store_append (dialog->protocol_store, &tree_iter);
gtk_list_store_set (dialog->protocol_store, &tree_iter,
diff --git a/vinagre/vinagre-plugin-dialog.c b/vinagre/vinagre-plugin-dialog.c
index 578d383..785d9c3 100644
--- a/vinagre/vinagre-plugin-dialog.c
+++ b/vinagre/vinagre-plugin-dialog.c
@@ -20,7 +20,7 @@
*/
#include <glib/gi18n.h>
-#include <libpeasui/peas-ui-plugin-manager.h>
+#include <libpeas-gtk/peas-gtk-plugin-manager.h>
#include "vinagre-plugin-dialog.h"
#include "vinagre-plugins-engine.h"
@@ -62,7 +62,7 @@ setup_plugins_page (VinagrePluginDialog *dlg)
{
GtkWidget *page_content;
- page_content = peas_ui_plugin_manager_new (PEAS_ENGINE (vinagre_plugins_engine_get_default ()));
+ page_content = peas_gtk_plugin_manager_new (PEAS_ENGINE (vinagre_plugins_engine_get_default ()));
g_return_if_fail (page_content != NULL);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
diff --git a/vinagre/vinagre-plugins-engine.c b/vinagre/vinagre-plugins-engine.c
index 2164c31..72c31a5 100644
--- a/vinagre/vinagre-plugins-engine.c
+++ b/vinagre/vinagre-plugins-engine.c
@@ -167,89 +167,36 @@ vinagre_plugins_engine_class_init (VinagrePluginsEngineClass *klass)
g_type_class_add_private (klass, sizeof (VinagrePluginsEnginePrivate));
}
-/*
-static void
-require_private_typelib (void)
-{
- const gchar *lib_dir;
- gchar *filename;
- GMappedFile *mfile;
- GTypelib *typelib;
- const gchar *ns;
- GError *error = NULL;
-
- lib_dir = vinagre_dirs_get_vinagre_lib_dir ();
- filename = g_build_filename (lib_dir,
- "girepository-1.0",
- "Vinagre-3.0.typelib",
- NULL);
-
- vinagre_debug_message (DEBUG_PLUGINS, "typelib: %s", filename);
- mfile = g_mapped_file_new (filename, FALSE, NULL);
-
- g_free (filename);
-
- if (mfile == NULL)
- {
- g_warning ("Private typelib 'Vinagre-3.0' not found");
- return;
- }
-
- typelib = g_typelib_new_from_mapped_file (mfile, &error);
-
- if (typelib == NULL)
- {
- g_warning ("Private typelib 'Vinagre-3.0' could not be loaded: %s",
- error->message);
-
- g_error_free (error);
- return;
- }
-
- ns = g_irepository_load_typelib (g_irepository_get_default (),
- typelib,
- 0,
- &error);
-
- if (!ns)
- {
- g_warning ("Typelib 'Vinagre-3.0' could not be loaded: %s",
- error->message);
- g_error_free (error);
- return;
- }
-
- vinagre_debug_message (DEBUG_PLUGINS, "Namespace '%s' loaded.", ns);
-}
-*/
-
VinagrePluginsEngine *
vinagre_plugins_engine_get_default (void)
{
- gchar *modules_dir, **search_paths;
+ gchar *tmp, *typelib_dir, **search_paths;
GError *error;
if (default_engine != NULL)
return default_engine;
-
/* This should be moved to libpeas */
g_irepository_require (g_irepository_get_default (),
"Peas", "1.0", 0, NULL);
g_irepository_require (g_irepository_get_default (),
"PeasUI", "1.0", 0, NULL);
+ /* Require vinagre's typelib. */
+ tmp = vinagre_dirs_get_vinagre_lib_dir ();
+ typelib_dir = g_build_filename (tmp,
+ "girepository-1.0",
+ NULL);
error = NULL;
- g_irepository_require (g_irepository_get_default (),
- "Vinagre", "3.0", 0, &error);
+ g_irepository_require_private (g_irepository_get_default (),
+ typelib_dir, "Vinagre", "3.0", 0, &error);
+ g_free (typelib_dir);
+ g_free (tmp);
if (error)
{
g_print ("error registering vinagre typelib: %s\n", error->message);
g_error_free (error);
}
-// require_private_typelib ();
-
- modules_dir = vinagre_dirs_get_vinagre_lib_dir ();
search_paths = g_new (gchar *, 5);
/* Add the user plugins dir in ~ */
@@ -263,12 +210,10 @@ vinagre_plugins_engine_get_default (void)
default_engine = VINAGRE_PLUGINS_ENGINE (g_object_new (VINAGRE_TYPE_PLUGINS_ENGINE,
"app-name", "Vinagre",
- "base-module-dir", modules_dir,
"search-paths", search_paths,
NULL));
g_strfreev (search_paths);
- g_free (modules_dir);
g_object_add_weak_pointer (G_OBJECT (default_engine),
(gpointer) &default_engine);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]