[libpeas] Some string fixes



commit a65d841b7fdfa636c9dc4d121281b4046a34a866
Author: Garrett Regier <alias301 gmail com>
Date:   Thu Jul 1 14:12:43 2010 -0700

    Some string fixes

 data/libpeas-1.0.pc.in                     |    2 +-
 data/libpeasui-1.0.pc.in                   |    2 +-
 libpeas/peas-engine.c                      |   10 ++++++----
 libpeas/peas-introspection.c               |    7 +++++--
 libpeas/peas-object-module.c               |    3 ++-
 libpeas/peas-plugin-info.c                 |    6 +++---
 libpeasui/peas-ui-plugin-manager.c         |    2 --
 loaders/c/peas-plugin-loader-c.c           |    6 +++---
 loaders/python/peas-plugin-loader-python.c |   22 +++++++++++-----------
 loaders/seed/peas-extension-seed.c         |   12 ++++++------
 loaders/seed/peas-plugin-loader-seed.c     |    4 ++--
 11 files changed, 40 insertions(+), 36 deletions(-)
---
diff --git a/data/libpeas-1.0.pc.in b/data/libpeas-1.0.pc.in
index b84a604..3f3347e 100644
--- a/data/libpeas-1.0.pc.in
+++ b/data/libpeas-1.0.pc.in
@@ -4,7 +4,7 @@ libdir= libdir@
 includedir= includedir@
 
 Name: libpeas
-Description: libpeas, a plugins library
+Description: libpeas, a GObject plugins library
 Requires: glib-2.0 >= 2.18, gobject-2.0 >= 2.23.6, gmodule-2.0 >= 2.18, gobject-introspection-1.0 >= 0.6.7
 Version: @VERSION@
 Cflags: -I${includedir}/libpeas-1.0
diff --git a/data/libpeasui-1.0.pc.in b/data/libpeasui-1.0.pc.in
index 70b1b34..99e5585 100644
--- a/data/libpeasui-1.0.pc.in
+++ b/data/libpeasui-1.0.pc.in
@@ -4,7 +4,7 @@ libdir= libdir@
 includedir= includedir@
 
 Name: libpeas
-Description: libpeas, a plugins library (UI part)
+Description: libpeas, a GObject plugins library (UI part)
 Requires: glib-2.0 >= 2.14, @GTK_PKG_REQUIREMENT@, libpeas-1.0 >= @VERSION@
 Version: @VERSION@
 Cflags: -I${includedir}/libpeas-1.0
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index fdcf7ad..f2737d0 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -172,7 +172,7 @@ peas_engine_rescan_plugins (PeasEngine *engine)
   sp = engine->priv->search_paths;
   if (sp == NULL)
     {
-      g_debug ("No search paths where provided.");
+      g_debug ("No search paths where provided");
       return;
     }
 
@@ -539,7 +539,8 @@ load_plugin_loader (PeasEngine  *engine,
 
       if (loader == NULL || !PEAS_IS_PLUGIN_LOADER (loader))
         {
-          g_warning ("Loader object is not a valid PeasPluginLoader instance");
+          g_warning ("Loader '%s' is not a valid PeasPluginLoader instance",
+                     loader_id);
           if (loader != NULL && G_IS_OBJECT (loader))
             g_object_unref (loader);
           module = NULL;
@@ -556,7 +557,7 @@ load_plugin_loader (PeasEngine  *engine,
     }
   else
     {
-      g_warning ("Plugin loader module '%s' could not be loaded",
+      g_warning ("Loader '%s' could not be loaded",
                  loader_id);
       g_object_unref (module);
       module = NULL;
@@ -611,7 +612,8 @@ peas_engine_disable_loader (PeasEngine  *engine,
                                                     loader_id);
   if (loader_info != NULL)
     {
-      g_warning ("Loader %s cannot be disabled as it is already loaded", loader_id);
+      g_warning ("Loader '%s' cannot be disabled as it is already loaded",
+                 loader_id);
       return;
     }
 
diff --git a/libpeas/peas-introspection.c b/libpeas/peas-introspection.c
index ec506e9..6e11ec4 100644
--- a/libpeas/peas-introspection.c
+++ b/libpeas/peas-introspection.c
@@ -240,7 +240,7 @@ peas_method_get_info (GType        iface_type,
   iface_info = g_irepository_find_by_gtype (repo, iface_type);
   if (iface_info == NULL)
     {
-      g_warning ("Type not found in introspection: %s",
+      g_warning ("Type not found in introspection: '%s'",
                  g_type_name (iface_type));
       return NULL;
     }
@@ -261,7 +261,7 @@ peas_method_get_info (GType        iface_type,
 
   if (func_info == NULL)
     {
-      g_warning ("Method %s.%s not found",
+      g_warning ("Method '%s.%s' not found",
                  g_type_name (iface_type),
                  method_name);
     }
@@ -334,6 +334,9 @@ peas_method_apply_valist (GObject     *instance,
       goto out;
     }
 
+  g_debug ("Calling '%s.%s' on '%p'",
+           g_type_name (iface_type), method_name, instance);
+
   ret = g_function_info_invoke (func_info, in_args, n_in_args, out_args,
                                 n_out_args, &out_retval, &error);
   if (!ret)
diff --git a/libpeas/peas-object-module.c b/libpeas/peas-object-module.c
index c6aaaf8..fdad671 100644
--- a/libpeas/peas-object-module.c
+++ b/libpeas/peas-object-module.c
@@ -114,7 +114,8 @@ peas_object_module_load (GTypeModule *gmodule)
    * returned TRUE */
   if (module->priv->register_func == NULL)
     {
-      g_warning ("Symbol 'peas_register_types' should not be NULL");
+      g_warning ("%s: Symbol 'peas_register_types' is not defined",
+                 module->priv->module_name);
       g_module_close (module->priv->library);
 
       return FALSE;
diff --git a/libpeas/peas-plugin-info.c b/libpeas/peas-plugin-info.c
index 9ab95df..4fca6f0 100644
--- a/libpeas/peas-plugin-info.c
+++ b/libpeas/peas-plugin-info.c
@@ -198,7 +198,7 @@ _peas_plugin_info_new (const gchar *filename,
   plugin_file = g_key_file_new ();
   if (!g_key_file_load_from_file (plugin_file, filename, G_KEY_FILE_NONE, NULL))
     {
-      g_warning ("Bad plugin file: %s", filename);
+      g_warning ("Bad plugin file: '%s'", filename);
       goto error;
     }
 
@@ -217,7 +217,7 @@ _peas_plugin_info_new (const gchar *filename,
     }
   else
     {
-      g_warning ("Could not find 'Module' in %s", filename);
+      g_warning ("Could not find 'Module' in '%s'", filename);
       goto error;
     }
 
@@ -248,7 +248,7 @@ _peas_plugin_info_new (const gchar *filename,
     info->name = str;
   else
     {
-      g_warning ("Could not find 'Name' in %s", filename);
+      g_warning ("Could not find 'Name' in '%s'", filename);
       goto error;
     }
 
diff --git a/libpeasui/peas-ui-plugin-manager.c b/libpeasui/peas-ui-plugin-manager.c
index 1533b79..35f0055 100644
--- a/libpeasui/peas-ui-plugin-manager.c
+++ b/libpeasui/peas-ui-plugin-manager.c
@@ -211,8 +211,6 @@ configure_button_cb (GtkWidget           *button,
   exten = peas_engine_get_extension (pm->priv->engine, info, PEAS_UI_TYPE_CONFIGURABLE); 
   g_return_if_fail (exten != NULL);
 
-  g_debug ("Calling create_configure_widget on %p", exten);
-
   peas_extension_call (exten, "create_configure_widget", &conf_widget);
 
   g_object_unref (exten);
diff --git a/loaders/c/peas-plugin-loader-c.c b/loaders/c/peas-plugin-loader-c.c
index 08551d8..d07f423 100644
--- a/loaders/c/peas-plugin-loader-c.c
+++ b/loaders/c/peas-plugin-loader-c.c
@@ -77,12 +77,12 @@ peas_plugin_loader_c_load (PeasPluginLoader *loader,
        * If this changes, we should use weak refs or something */
 
       g_hash_table_insert (cloader->priv->loaded_plugins, info, module);
-      g_debug ("Insert module %s into C module set", module_name);
+      g_debug ("Insert module '%s' into C module set", module_name);
     }
 
   if (!g_type_module_use (G_TYPE_MODULE (module)))
     {
-      g_warning ("Could not load plugin module: %s",
+      g_warning ("Could not load plugin module: '%s'",
                  peas_plugin_info_get_name (info));
 
       return FALSE;
@@ -132,7 +132,7 @@ peas_plugin_loader_c_get_extension (PeasPluginLoader *loader,
 
   if (instance == NULL)
     {
-      g_debug ("Plugin '%s' doesn't provide a '%s' extension",
+      g_debug ("Plugin '%s' does not provide a '%s' extension",
                peas_plugin_info_get_module_name (info),
                g_type_name (exten_type));
       return NULL;
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 8706cd2..7e2cdf1 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -108,7 +108,7 @@ find_python_extension_type (PeasPluginInfo *info,
     }
 
   Py_DECREF (pygtype);
-  g_debug ("No %s derivative found in Python plugin '%s'",
+  g_debug ("No '%s' derivative found in Python plugin '%s'",
            g_type_name (exten_type), peas_plugin_info_get_name (info));
   return NULL;
 }
@@ -172,7 +172,7 @@ peas_plugin_loader_python_get_extension (PeasPluginLoader *loader,
   if (pyobject == NULL)
     {
       pyg_gil_state_release (state);
-      g_error ("Could not create instance for %s.",
+      g_error ("Could not create instance for '%s'",
                peas_plugin_info_get_name (info));
 
       return NULL;
@@ -184,7 +184,7 @@ peas_plugin_loader_python_get_extension (PeasPluginLoader *loader,
     {
       Py_DECREF (pyobject);
       pyg_gil_state_release (state);
-      g_error ("Could not create instance for %s (GObject already initialized).",
+      g_error ("Could not create instance for '%s': GObject already initialized",
                peas_plugin_info_get_name (info));
 
       return NULL;
@@ -196,7 +196,7 @@ peas_plugin_loader_python_get_extension (PeasPluginLoader *loader,
     {
       Py_DECREF (pyobject);
       pyg_gil_state_release (state);
-      g_error ("Could not create %s instance for %s (GObject not constructed).",
+      g_error ("Could not create '%s' instance for '%s': GObject not constructed",
                g_type_name (exten_type), peas_plugin_info_get_name (info));
 
       return NULL;
@@ -253,7 +253,7 @@ peas_plugin_loader_python_add_module_directory (PeasPluginLoader *loader,
 
   state = pyg_gil_state_ensure ();
 
-  g_debug ("Adding %s as a module path for the python loader.", module_dir);
+  g_debug ("Adding '%s' as a module path for the python loader", module_dir);
   peas_plugin_loader_python_add_module_path (pyloader, module_dir);
 
   pyg_gil_state_release (state);
@@ -271,7 +271,7 @@ peas_plugin_loader_python_load (PeasPluginLoader *loader,
   if (pyloader->priv->init_failed)
     {
       g_warning ("Cannot load python plugin Python '%s' since libpeas was "
-                 "not able to initialize the Python interpreter.",
+                 "not able to initialize the Python interpreter",
                  peas_plugin_info_get_name (info));
 
       return FALSE;
@@ -472,7 +472,7 @@ peas_python_init (PeasPluginLoaderPython *loader)
   if (PyErr_Occurred ())
     {
       g_warning ("Error initializing Python interpreter: could not "
-                 "import pygobject.");
+                 "import pygobject");
 
       goto python_init_error;
     }
@@ -484,7 +484,7 @@ peas_python_init (PeasPluginLoaderPython *loader)
   if (gobject == NULL)
     {
       g_warning ("Error initializing Python interpreter: cound not "
-                 "import gobject.");
+                 "import gobject");
 
       goto python_init_error;
     }
@@ -503,7 +503,7 @@ peas_python_init (PeasPluginLoaderPython *loader)
   if (gi == NULL)
     {
       g_warning ("Error initializing Python interpreter: could not "
-                 "import gi.");
+                 "import gi");
 
       goto python_init_error;
     }
@@ -513,7 +513,7 @@ peas_python_init (PeasPluginLoaderPython *loader)
   if (gettext == NULL)
     {
       g_warning ("Error initializing Python interpreter: could not "
-                 "import gettext.");
+                 "import gettext");
 
       goto python_init_error;
     }
@@ -534,7 +534,7 @@ peas_python_init (PeasPluginLoaderPython *loader)
 python_init_error:
 
   g_warning ("Please check the installation of all the Python related packages "
-             "required by libpeas and try again.");
+             "required by libpeas and try again");
 
   PyErr_Clear ();
 
diff --git a/loaders/seed/peas-extension-seed.c b/loaders/seed/peas-extension-seed.c
index 3b624b4..e5e6435 100644
--- a/loaders/seed/peas-extension-seed.c
+++ b/loaders/seed/peas-extension-seed.c
@@ -288,7 +288,7 @@ peas_extension_seed_call (PeasExtension *exten,
                                         method_name);
   if (seed_value_is_undefined (sexten->js_context, js_method))
     {
-      g_warning ("Method %s.%s is not defined",
+      g_warning ("Method '%s.%s' is not defined",
                  g_type_name (sexten->exten_type), method_name);
       return FALSE;
     }
@@ -296,7 +296,7 @@ peas_extension_seed_call (PeasExtension *exten,
   /* We want to display an error if the method is defined but is not a function. */
   if (!seed_value_is_function (sexten->js_context, js_method))
     {
-      g_warning ("Method %s.%s is not a function",
+      g_warning ("Method '%s.%s' is not a function",
                  g_type_name (sexten->exten_type), method_name);
       return FALSE;
     }
@@ -412,16 +412,16 @@ peas_extension_seed_class_init (PeasExtensionSeedClass *klass)
   g_object_class_install_property (object_class,
                                    PROP_JS_CONTEXT,
                                    g_param_spec_pointer ("js-context",
-                                                         "Javascript Context",
-                                                         "A Javascript context from Seed",
+                                                         "JavaScript Context",
+                                                         "A Seed JavaScript context",
                                                          G_PARAM_WRITABLE |
                                                          G_PARAM_CONSTRUCT_ONLY));
 
   g_object_class_install_property (object_class,
                                    PROP_JS_OBJECT,
                                    g_param_spec_pointer ("js-object",
-                                                         "Javascript Object",
-                                                         "A Javascript object from Seed",
+                                                         "JavaScript Object",
+                                                         "A Seed JavaScript object",
                                                          G_PARAM_WRITABLE |
                                                          G_PARAM_CONSTRUCT_ONLY));
 }
diff --git a/loaders/seed/peas-plugin-loader-seed.c b/loaders/seed/peas-plugin-loader-seed.c
index 0ac4cc0..5b4e78e 100644
--- a/loaders/seed/peas-plugin-loader-seed.c
+++ b/loaders/seed/peas-plugin-loader-seed.c
@@ -70,7 +70,7 @@ get_script_for_plugin_info (PeasPluginInfo   *info,
   basename = g_strconcat (peas_plugin_info_get_module_name (info), ".js", NULL);
   filename = g_build_filename (peas_plugin_info_get_module_dir (info), basename, NULL);
 
-  g_debug ("Seed script filename is %s", filename);
+  g_debug ("Seed script filename is '%s'", filename);
 
   g_file_get_contents (filename, &script, NULL, NULL);
 
@@ -169,7 +169,7 @@ peas_plugin_loader_seed_get_extension (PeasPluginLoader *loader,
 
   if (!seed_value_is_object (sinfo->context, extension))
     {
-      g_warning ("Extension %s in plugin %s is not a javascript object.",
+      g_warning ("Extension '%s' in plugin '%s' is not a Seed object",
                  g_type_name (exten_type), peas_plugin_info_get_module_name (info));
       return NULL;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]