Exemple #1
0
IAnjutaMessageView* 
npw_plugin_create_view (NPWPlugin* plugin)
{
	if (plugin->view == NULL)
	{
		IAnjutaMessageManager* man;

		man = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
										  IAnjutaMessageManager, NULL);
		plugin->view =
			ianjuta_message_manager_add_view (man, _("New Project Assistant"),
											  ICON_FILE, NULL);
		if (plugin->view != NULL)
		{
			g_signal_connect (G_OBJECT (plugin->view), "buffer_flushed",
							  G_CALLBACK (on_message_buffer_flush), plugin);
			g_object_add_weak_pointer (G_OBJECT (plugin->view),
									   (gpointer *)(gpointer)&plugin->view);
		}
	}
	else
	{
		ianjuta_message_view_clear (plugin->view, NULL);
	}

	return plugin->view;
}
Exemple #2
0
void
git_pane_create_message_view (Git *plugin)
{
	IAnjutaMessageManager *message_manager; 
		
		
	message_manager = anjuta_shell_get_interface  (ANJUTA_PLUGIN (plugin)->shell,	
												   IAnjutaMessageManager, NULL);
	plugin->message_view = ianjuta_message_manager_get_view_by_name (message_manager, 
																	 _("Git"), 
																	 NULL);
	if (!plugin->message_view)
	{
		plugin->message_view = ianjuta_message_manager_add_view (message_manager, 
																 _("Git"), 
																 ICON_FILE, 
																 NULL);
		g_object_weak_ref (G_OBJECT (plugin->message_view), 
						   (GWeakNotify) on_message_view_destroyed, plugin);
	}
	
	ianjuta_message_view_clear (plugin->message_view, NULL);
	ianjuta_message_manager_set_current_view (message_manager, 
											  plugin->message_view, 
											  NULL);
}