[libpeas] Don't update the plugin info in the model twice
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Don't update the plugin info in the model twice
- Date: Sat, 20 Dec 2014 17:21:45 +0000 (UTC)
commit 5b172412a63855cf0762032711a7eba3bccd2562
Author: Garrett Regier <garrettregier gmail com>
Date: Mon Sep 8 23:47:35 2014 -0700
Don't update the plugin info in the model twice
It was already being updated when the plugin was
{un,}loaded by the engine because it connects to the signals.
libpeas-gtk/peas-gtk-plugin-manager-store.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/libpeas-gtk/peas-gtk-plugin-manager-store.c b/libpeas-gtk/peas-gtk-plugin-manager-store.c
index 1a91cdc..2e2fe38 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager-store.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager-store.c
@@ -393,7 +393,6 @@ peas_gtk_plugin_manager_store_set_enabled (PeasGtkPluginManagerStore *store,
gboolean enabled)
{
PeasPluginInfo *info;
- gboolean success = TRUE;
g_return_if_fail (PEAS_GTK_IS_PLUGIN_MANAGER_STORE (store));
g_return_if_fail (iter != NULL);
@@ -404,19 +403,16 @@ peas_gtk_plugin_manager_store_set_enabled (PeasGtkPluginManagerStore *store,
if (enabled)
{
- /* load the plugin */
- if (!peas_engine_load_plugin (store->priv->engine, info))
- success = FALSE;
+ peas_engine_load_plugin (store->priv->engine, info);
}
else
{
- /* unload the plugin */
- if (!peas_engine_unload_plugin (store->priv->engine, info))
- success = FALSE;
+ peas_engine_unload_plugin (store->priv->engine, info);
}
- if (success)
- update_plugin (store, iter, info);
+ /* Don't need to manually update the plugin as
+ * PeasEngine::{load,unload}-plugin are connected to
+ */
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]