Esempio n. 1
0
static void
mex_search_plugin_finalize (GObject *object)
{
  MexSearchPluginPrivate *priv = MEX_SEARCH_PLUGIN (object)->priv;

  g_list_free (priv->models);
  g_list_free (priv->actions);

  G_OBJECT_CLASS (mex_search_plugin_parent_class)->finalize (object);
}
Esempio n. 2
0
static gboolean
mex_search_plugin_model_activated (MexModelProvider *self,
                                   MexModel         *model)
{
  MexSearchPluginPrivate *priv = MEX_SEARCH_PLUGIN (self)->priv;

  mex_tool_provider_present_actor (MEX_TOOL_PROVIDER (self),
                                   g_object_ref (priv->search_page));

  return TRUE;
}
static void
mex_search_plugin_dispose (GObject *object)
{
  MexSearchPlugin *self = MEX_SEARCH_PLUGIN (object);
  MexSearchPluginPrivate *priv = self->priv;

  mex_model_manager_remove_category (mex_model_manager_get_default (),
                                     "search");

  if (priv->history_model)
    {
      g_object_unref (priv->history_model);
      priv->history_model = NULL;
    }

  if (priv->suggest_model)
    {
      g_object_unref (priv->suggest_model);
      priv->suggest_model = NULL;
    }

  if (priv->suggest_timeout)
    {
      g_source_remove (priv->suggest_timeout);
      priv->suggest_timeout = 0;
    }

  if (priv->suggest_id)
    {
      MexDownloadQueue *dq = mex_download_queue_get_default ();
      mex_download_queue_cancel (dq, priv->suggest_id);
      priv->suggest_id = NULL;
    }

  if (priv->search_proxy)
    {
      g_object_unref (priv->search_proxy);
      priv->search_proxy = NULL;
    }

  if (priv->search_page)
    {
      g_object_unref (priv->search_page);
      priv->search_page = NULL;
    }

  if (priv->action_info.action)
    {
      g_object_unref (priv->action_info.action);
      priv->action_info.action = NULL;
    }

  G_OBJECT_CLASS (mex_search_plugin_parent_class)->dispose (object);
}
Esempio n. 4
0
static const GList *
mex_search_plugin_get_actions (MexActionProvider *self)
{
  MexSearchPluginPrivate *priv = MEX_SEARCH_PLUGIN (self)->priv;
  return priv->actions;
}
Esempio n. 5
0
static const GList *
mex_search_plugin_get_models (MexModelProvider *self)
{
  MexSearchPluginPrivate *priv = MEX_SEARCH_PLUGIN (self)->priv;
  return priv->models;
}