Commit 10dde844 authored by Jonh Wendell's avatar Jonh Wendell
Browse files

Bump peas to 0.5.5 and fix vinagre to use the new api

parent 7697066e
......@@ -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)
......
......@@ -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 += \
......
......@@ -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,
......
......@@ -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))),
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment