Example #1
0
static gboolean
deactivate_plugin (AnjutaPlugin *plugin)
{
	StarterPlugin* splugin = ANJUTA_PLUGIN_STARTER (plugin);
	DEBUG_PRINT ("StarterPlugin: Deactivating starter plugin...");
	if (splugin->priv->starter)
		anjuta_shell_remove_widget (anjuta_plugin_get_shell (plugin),
									splugin->priv->starter, NULL);

	anjuta_plugin_remove_watch (plugin, splugin->priv->editor_watch_id, FALSE);
	anjuta_plugin_remove_watch (plugin, splugin->priv->project_watch_id, FALSE);
	
	return TRUE;
}
Example #2
0
static gboolean
file_manager_deactivate (AnjutaPlugin *plugin)
{
	AnjutaUI *ui;
	AnjutaFileManager *file_manager;

	DEBUG_PRINT ("%s", "AnjutaFileManager: Dectivating AnjutaFileManager plugin ...");
	
	file_manager = (AnjutaFileManager*) plugin;
	ui = anjuta_shell_get_ui (plugin->shell, NULL);
	
	anjuta_plugin_remove_watch (plugin, file_manager->root_watch_id, TRUE);
	anjuta_plugin_remove_watch (plugin, file_manager->current_document_watch_id, FALSE);
	anjuta_ui_remove_action_group (ui, ((AnjutaFileManager*)plugin)->action_group);
	anjuta_ui_unmerge (ui, ((AnjutaFileManager*)plugin)->uiid);
	
	anjuta_shell_remove_widget (plugin->shell, file_manager->sw, NULL);
	return TRUE;
}
Example #3
0
static gboolean
js_support_plugin_deactivate (AnjutaPlugin *plugin)
{
	JSLang *js_support_plugin;

	DEBUG_PRINT ("%s", "JSLang: Dectivating JSLang plugin ...");
	js_support_plugin = (JSLang*) plugin;
	anjuta_plugin_remove_watch (plugin, js_support_plugin->editor_watch_id, TRUE);
	return TRUE;
}
Example #4
0
static gboolean
python_plugin_deactivate (AnjutaPlugin *plugin)
{

	AnjutaUI *ui;
	PythonPlugin *lang_plugin;
	lang_plugin = (PythonPlugin*) (plugin);

	anjuta_plugin_remove_watch (plugin,
								lang_plugin->editor_watch_id,
								TRUE);
	anjuta_plugin_remove_watch (plugin,
								lang_plugin->project_root_watch_id,
								TRUE);	


	ui = anjuta_shell_get_ui (plugin->shell, NULL);
	anjuta_ui_remove_action_group (ui, ANJUTA_PLUGIN_PYTHON(plugin)->action_group);
	anjuta_ui_unmerge (ui, ANJUTA_PLUGIN_PYTHON(plugin)->uiid);
	
	return TRUE;
}
Example #5
0
static gboolean
deactivate_plugin (AnjutaPlugin * plugin)
{
	AnjutaUI *ui = anjuta_shell_get_ui (plugin->shell, NULL);

	DEBUG_PRINT ("%s", "MacroPlugin: Deactivating Macro plugin…");

	anjuta_plugin_remove_watch (plugin,
								ANJUTA_PLUGIN_MACRO (plugin)->editor_watch_id,
								TRUE);
	anjuta_ui_unmerge (ui, ANJUTA_PLUGIN_MACRO (plugin)->uiid);
	anjuta_ui_remove_action_group (ui, ANJUTA_PLUGIN_MACRO (plugin)->action_group);
	return TRUE;
}
static gboolean
snippets_manager_deactivate (AnjutaPlugin *plugin)
{
    SnippetsManagerPlugin *snippets_manager_plugin = NULL;
    AnjutaUI *anjuta_ui = NULL;

    /* Assertions */
    g_return_val_if_fail (ANJUTA_IS_PLUGIN_SNIPPETS_MANAGER (plugin), FALSE);
    snippets_manager_plugin = ANJUTA_PLUGIN_SNIPPETS_MANAGER (plugin);

    DEBUG_PRINT ("%s", "SnippetsManager: Deactivating SnippetsManager plugin …");

    anjuta_plugin_remove_watch (plugin,
                                snippets_manager_plugin->cur_editor_watch_id,
                                FALSE);

    /* Remove the Menu UI */
    anjuta_ui = anjuta_shell_get_ui (plugin->shell, NULL);
    anjuta_ui_unmerge (anjuta_ui, snippets_manager_plugin->uiid);
    anjuta_ui_remove_action_group (anjuta_ui, snippets_manager_plugin->action_group);

    /* Unload the SnippetsBrowser */
    if (snippets_manager_plugin->browser_maximized)
        on_snippets_browser_unmaximize_request (snippets_manager_plugin->snippets_browser,
                                                snippets_manager_plugin);
    snippets_browser_unload (snippets_manager_plugin->snippets_browser);
    g_object_ref (snippets_manager_plugin->snippets_browser);
    anjuta_shell_remove_widget (plugin->shell,
                                GTK_WIDGET (snippets_manager_plugin->snippets_browser),
                                NULL);

    /* Destroy the SnippetsDB */
    snippets_db_close (snippets_manager_plugin->snippets_db);

    /* Destroy the Interaction Interpreter */
    snippets_interaction_destroy (snippets_manager_plugin->snippets_interaction);

    /* Unload the SnippetsProvider */
    snippets_provider_unload (snippets_manager_plugin->snippets_provider);

    return TRUE;
}
Example #7
0
static gboolean
cpp_java_plugin_deactivate_plugin (AnjutaPlugin *plugin)
{
    AnjutaUI *ui;
    CppJavaPlugin *lang_plugin;
    lang_plugin = ANJUTA_PLUGIN_CPP_JAVA (plugin);

    anjuta_plugin_remove_watch (plugin,
                                lang_plugin->editor_watch_id,
                                TRUE);

    ui = anjuta_shell_get_ui (plugin->shell, NULL);
    anjuta_ui_unmerge (ui, lang_plugin->uiid);
    anjuta_ui_remove_action_group (ui, lang_plugin->action_group);

    lang_plugin->action_group = NULL;
    lang_plugin->uiid = 0;
    DEBUG_PRINT ("%s", "AnjutaLanguageCppJavaPlugin: Deactivated plugin.");
    return TRUE;
}
Example #8
0
static gboolean
deactivate_plugin (AnjutaPlugin *plugin)
{
	TerminalPlugin *term_plugin;
	AnjutaUI *ui;	
	
	term_plugin = ANJUTA_PLUGIN_TERMINAL (plugin);

	ui = anjuta_shell_get_ui (plugin->shell, NULL);
	anjuta_ui_unmerge (ui, term_plugin->uiid);	
	if (term_plugin->action_group)
	{
		anjuta_ui_remove_action_group (ui, term_plugin->action_group);
		term_plugin->action_group = NULL;
	}

	/* terminal plugin widgets are destroyed as soon as it is removed */
	anjuta_shell_remove_widget (plugin->shell, term_plugin->frame, NULL);
	
	g_object_unref (term_plugin->shell_box);
	g_object_unref (term_plugin->term_box);
	
	g_signal_handlers_disconnect_by_func (vte_reaper_get (), terminal_child_exited_cb,
										  term_plugin);
	
	/* remove watch */
	anjuta_plugin_remove_watch (plugin, term_plugin->root_watch_id, FALSE);
	
	term_plugin->child_pid = 0;
	
#if OLD_VTE == 1
	g_signal_handlers_disconnect_by_func (G_OBJECT (term_plugin->term),
			 G_CALLBACK (terminal_unrealize_cb), term_plugin);
	
	term_plugin->first_time_realization = TRUE;
#endif

	return TRUE;
}
Example #9
0
static gboolean
quick_open_plugin_deactivate(AnjutaPlugin *plugin)
{
    QuickOpenPlugin *self = ANJUTA_PLUGIN_QUICK_OPEN(plugin);

    AnjutaUI *ui;

    DEBUG_PRINT("%s", "Quick Open Plugin: Deactivating plugin…");

    ui = anjuta_shell_get_ui(plugin->shell, NULL);
    anjuta_ui_remove_action_group(ui, self->action_group);

    anjuta_ui_unmerge(ui, self->uiid);

    anjuta_plugin_remove_watch(plugin, self->project_watch_id, FALSE);

    /* Disconnect signals. */
    if (self->project_manager)
    {
        g_signal_handlers_disconnect_by_func(self->project_manager, on_project_loaded, self);
        g_object_remove_weak_pointer(G_OBJECT(self->project_manager), (void**)&self->project_manager);
        self->project_manager = NULL;
    }

    if (self->docman)
    {
        g_signal_handlers_disconnect_by_func(self->docman, on_document_added, self);
        g_signal_handlers_disconnect_by_func(self->docman, on_document_removed, self);
        g_object_remove_weak_pointer(G_OBJECT(self->docman), (void**)&self->docman);
        self->docman = NULL;
    }

    gtk_widget_destroy(GTK_WIDGET(self->dialog));

    return TRUE;
}