anjuta r3461 - in trunk: . libanjuta/interfaces plugins/class-gen plugins/glade plugins/project-manager



Author: naba
Date: Sun Jan 13 10:35:32 2008
New Revision: 3461
URL: http://svn.gnome.org/viewvc/anjuta?rev=3461&view=rev

Log:
	* libanjuta/interfaces/libanjuta.idl:
	* plugins/class-gen/plugin.c: (cg_plugin_add_to_project):
	* plugins/project-manager/plugin.c: (iproject_manager_iface_init):
	Renamed IAnjutaProjectManager::add_source_multi() to more appropriate
	IAnjutaProjectManager::add_sources().

	* plugins/glade/plugin.c: (on_glade_resource_removed),
	(on_glade_resource_updated), (ifile_open), (iwizard_activate): Added
	stubs for handing resources in glade file.


Modified:
   trunk/ChangeLog
   trunk/libanjuta/interfaces/libanjuta.idl
   trunk/plugins/class-gen/plugin.c
   trunk/plugins/glade/plugin.c
   trunk/plugins/project-manager/plugin.c

Modified: trunk/libanjuta/interfaces/libanjuta.idl
==============================================================================
--- trunk/libanjuta/interfaces/libanjuta.idl	(original)
+++ trunk/libanjuta/interfaces/libanjuta.idl	Sun Jan 13 10:35:32 2008
@@ -2709,7 +2709,7 @@
 	gchar* add_source (const gchar *source_uri_to_add, const gchar *default_location_uri);
 	
 	/**
-	* ianjuta_project_manager_add_source_multi:
+	* ianjuta_project_manager_add_sources:
 	* @obj: Self
 	* @source_uris_to_add: fixme
 	* @default_location_uri: fixme
@@ -2720,7 +2720,7 @@
 	*
 	* Returns: element URIs. Must be freed when no longer required.
 	*/
-	List<const gchar*> add_source_multi (List<const gchar*> source_uri_to_add, const gchar *default_location_uri);
+	List<const gchar*> add_sources (List<const gchar*> source_uri_to_add, const gchar *default_location_uri);
 	
 	/**
 	* ianjuta_project_manager_add_target:

Modified: trunk/plugins/class-gen/plugin.c
==============================================================================
--- trunk/plugins/class-gen/plugin.c	(original)
+++ trunk/plugins/class-gen/plugin.c	Sun Jan 13 10:35:32 2008
@@ -198,17 +198,13 @@
 
 	if (dirname != NULL && strcmp (dirname, ".") != 0)
 	{
-		added_files = ianjuta_project_manager_add_source_multi (manager,
-		                                                        filenames,
-		                                                        dirname,
-		                                                        NULL);
+		added_files = ianjuta_project_manager_add_sources (manager, filenames,
+														   dirname, NULL);
 	}
 	else
 	{
-		added_files = ianjuta_project_manager_add_source_multi (manager,
-		                                                        filenames,
-		                                                        curdir,
-		                                                        NULL);
+		added_files = ianjuta_project_manager_add_sources (manager, filenames,
+														   curdir, NULL);
 	}
 
 	if (g_list_length (added_files) != 2)

Modified: trunk/plugins/glade/plugin.c
==============================================================================
--- trunk/plugins/glade/plugin.c	(original)
+++ trunk/plugins/glade/plugin.c	Sun Jan 13 10:35:32 2008
@@ -397,6 +397,17 @@
 	
 	g_list_free (item);
 }
+
+static void
+on_glade_resource_removed (GladeProject *project, GladePlugin *plugin)
+{
+}
+
+static void
+on_glade_resource_updated (GladeProject *project, GladePlugin *plugin)
+{
+}
+
 #endif
 
 static gboolean
@@ -676,6 +687,15 @@
 	
 #if (GLADEUI_VERSION >= 330)
 	project = glade_project_load (filename);
+	if (project)
+	{
+		g_signal_connect (project, "resource-removed",
+						  G_CALLBACK (on_glade_resource_removed),
+						  ANJUTA_PLUGIN_GLADE (ifile));
+		g_signal_connect (project, "resource-updated",
+						  G_CALLBACK (on_glade_resource_updated),
+						  ANJUTA_PLUGIN_GLADE (ifile));
+	}
 #else
 	project = glade_project_open (filename);
 #endif
@@ -747,6 +767,13 @@
 
 #if (GLADEUI_VERSION >= 330)
 	project = glade_project_new ();
+	
+	g_signal_connect (project, "resource-removed",
+					  G_CALLBACK (on_glade_resource_removed),
+					  ANJUTA_PLUGIN_GLADE (iwizard));
+	g_signal_connect (project, "resource-updated",
+					  G_CALLBACK (on_glade_resource_updated),
+					  ANJUTA_PLUGIN_GLADE (iwizard));
 #else
 	project = glade_project_new (TRUE);
 #endif

Modified: trunk/plugins/project-manager/plugin.c
==============================================================================
--- trunk/plugins/project-manager/plugin.c	(original)
+++ trunk/plugins/project-manager/plugin.c	Sun Jan 13 10:35:32 2008
@@ -2226,7 +2226,7 @@
 	iface->get_selected = iproject_manager_get_selected;
 	iface->get_capabilities = iproject_manager_get_capabilities;
 	iface->add_source = iproject_manager_add_source;
-	iface->add_source_multi = iproject_manager_add_source_multi;
+	iface->add_sources = iproject_manager_add_source_multi;
 	iface->add_target = iproject_manager_add_target;
 	iface->add_group = iproject_manager_add_group;
 	iface->is_open = iproject_manager_is_open;



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