[anjuta] glade: Update glade plugin to match with latest libgladeui



commit 8c1b0730e164461c7056c6c2e987ee69f7fff3a3
Author: Johannes Schmid <jhs gnome org>
Date:   Fri May 14 10:47:27 2010 +0200

    glade: Update glade plugin to match with latest libgladeui
    
    Requires glade-3 from master and allows a clear shutdown. Also fixed some other issues and#
    use a GtkPaned instead of just a box for widgets/editor.

 plugins/glade/anjuta-design-document.c |    2 +-
 plugins/glade/plugin.c                 |  366 ++++++++++++++------------------
 2 files changed, 157 insertions(+), 211 deletions(-)
---
diff --git a/plugins/glade/anjuta-design-document.c b/plugins/glade/anjuta-design-document.c
index b34951e..e9187ba 100644
--- a/plugins/glade/anjuta-design-document.c
+++ b/plugins/glade/anjuta-design-document.c
@@ -155,7 +155,7 @@ static void ifile_savable_save (IAnjutaFileSavable* file, GError **e)
 		{
 			anjuta_status_set (status, _("Glade project '%s' saved"),
 							   glade_project_get_name(project));
-			g_signal_emit_by_name(G_OBJECT(self), "save_point", TRUE);
+			g_signal_emit_by_name(G_OBJECT(self), "update-save-ui", TRUE);
 		} 
 		else 
 		{
diff --git a/plugins/glade/plugin.c b/plugins/glade/plugin.c
index f9dca39..eb05bf3 100644
--- a/plugins/glade/plugin.c
+++ b/plugins/glade/plugin.c
@@ -1,22 +1,22 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
-    plugin.c
-    Copyright (C) 2000 Naba Kumar
+ plugin.c
+ Copyright (C) 2000 Naba Kumar
 
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+	 This program is free software; you can redistribute it and/or modify
+	 it under the terms of the GNU General Public License as published by
+	 the Free Software Foundation; either version 2 of the License, or
+	 (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+		 This program is distributed in the hope that it will be useful,
+	 but WITHOUT ANY WARRANTY; without even the implied warranty of
+		 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+		 GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
+		 You should have received a copy of the GNU General Public License
+		 along with this program; if not, write to the Free Software
+		 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+		 */
 
 #include <config.h>
 
@@ -45,6 +45,7 @@ struct _GladePluginPriv
 	GladeApp  *gpw;
 	GtkWidget *inspector;
 	GtkWidget *view_box;
+	GtkWidget *paned;
 	GtkWidget *projects_combo;
 	gint editor_watch_id;
 	gboolean destroying;
@@ -63,23 +64,23 @@ update_current_project (GtkComboBox *projects_combo,
 	GtkTreeIter iter;
 	GladeProject *cur_project;	
 	GtkTreeModel* model = gtk_combo_box_get_model (projects_combo);
-	
+
 	if (gtk_tree_model_get_iter_first (model, &iter))
 		do
+	{
+		gtk_tree_model_get (model, &iter, PROJECT_COL, &cur_project, -1);
+		if (project == cur_project)
 		{
-			gtk_tree_model_get (model, &iter, PROJECT_COL, &cur_project, -1);
-			if (project == cur_project)
-			{
-				gtk_combo_box_set_active_iter (projects_combo, &iter);
-				break;
-			}
+			gtk_combo_box_set_active_iter (projects_combo, &iter);
+			break;
 		}
-		while (gtk_tree_model_iter_next (model, &iter));
+	}
+	while (gtk_tree_model_iter_next (model, &iter));
 }
 
 static void
 value_added_current_editor (AnjutaPlugin *plugin, const char *name,
-							const GValue *value, gpointer data)
+                            const GValue *value, gpointer data)
 {
 	//GladePlugin* glade_plugin = ANJUTA_PLUGIN_GLADE(plugin);
 	GObject *editor;	
@@ -99,9 +100,9 @@ value_added_current_editor (AnjutaPlugin *plugin, const char *name,
 
 static void
 value_removed_current_editor (AnjutaPlugin *plugin,
-							  const char *name, gpointer data)
+                              const char *name, gpointer data)
 {
-	
+
 }
 
 static void
@@ -110,8 +111,8 @@ glade_update_ui (GladeApp *app, GladePlugin *plugin)
 	IAnjutaDocument* doc;
 	IAnjutaDocumentManager* docman = 
 		anjuta_shell_get_interface(ANJUTA_PLUGIN(plugin)->shell,
-								   IAnjutaDocumentManager, NULL);
-	
+		                           IAnjutaDocumentManager, NULL);
+
 	update_current_project (GTK_COMBO_BOX (plugin->priv->projects_combo), glade_app_get_project ());
 	/* Emit IAnjutaDocument signal */	
 	doc = ianjuta_document_manager_get_current_document(docman, NULL);
@@ -120,15 +121,15 @@ glade_update_ui (GladeApp *app, GladePlugin *plugin)
 		g_signal_emit_by_name (G_OBJECT(doc), "update_ui");
 		g_signal_emit_by_name (G_OBJECT(doc), "update-save-ui");
 	}
-	
+
 }
 
 static void
 on_api_help (GladeEditor* editor, 
-			 const gchar* book,
-			 const gchar* page,
-			 const gchar* search,
-			 GladePlugin* plugin)
+             const gchar* book,
+             const gchar* page,
+             const gchar* search,
+             GladePlugin* plugin)
 {
 	gchar *book_comm = NULL, *page_comm = NULL;
 	gchar *string;
@@ -136,20 +137,20 @@ on_api_help (GladeEditor* editor,
 	AnjutaPlugin* aplugin = ANJUTA_PLUGIN(plugin);
 	AnjutaShell* shell = aplugin->shell;
 	IAnjutaHelp* help;
-	
+
 	help = anjuta_shell_get_interface(shell, IAnjutaHelp, NULL);
-	
+
 	/* No API Help Plugin */
 	if (help == NULL)
 		return;
-	
+
 	if (book) book_comm = g_strdup_printf ("book:%s ", book);
 	if (page) page_comm = g_strdup_printf ("page:%s ", page);
 
 	string = g_strdup_printf ("%s%s%s",
-		book_comm ? book_comm : "",
-		page_comm ? page_comm : "",
-		search ? search : "");
+	                          book_comm ? book_comm : "",
+	                          page_comm ? page_comm : "",
+	                          search ? search : "");
 
 	ianjuta_help_search(help, string, NULL);
 
@@ -170,19 +171,19 @@ on_document_destroy (GtkWidget* document, GladePlugin *plugin)
 	GtkTreeIter iter;
 
 	DEBUG_PRINT ("%s", "Destroying Document");
-	
+
 	if (plugin->priv->destroying)
 	{
 		return;
 	}
-	
+
 	project = glade_design_view_get_project(GLADE_DESIGN_VIEW(document));
 
 	if (!project)
 	{
 		return;
 	}
-		
+
 	/* Remove project from our list */
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (plugin->priv->projects_combo));
 	if (gtk_tree_model_get_iter_first (model, &iter))
@@ -190,7 +191,7 @@ on_document_destroy (GtkWidget* document, GladePlugin *plugin)
 		do
 		{
 			GladeProject *project_node;
-			
+
 			gtk_tree_model_get (model, &iter, PROJECT_COL, &project_node, -1);
 			if (project == project_node)
 			{
@@ -219,21 +220,21 @@ on_glade_project_changed (GtkComboBox *combo, GladePlugin *plugin)
 	GtkTreeIter iter;
 	IAnjutaDocumentManager* docman = 
 		anjuta_shell_get_interface(ANJUTA_PLUGIN(plugin)->shell,
-								   IAnjutaDocumentManager, NULL);
-	
+		                           IAnjutaDocumentManager, NULL);
+
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (plugin->priv->projects_combo));
 	if (gtk_combo_box_get_active_iter (combo, &iter))
 	{
 		GladeProject *project;
-		
+
 		GtkWidget *design_view;
 		gtk_tree_model_get (model, &iter, PROJECT_COL, &project, -1);
 		glade_app_set_project (project);
-		
+
 		design_view = g_object_get_data (G_OBJECT (project), "design_view");
 		ianjuta_document_manager_set_current_document(docman, IANJUTA_DOCUMENT(design_view), NULL);
-		
-        glade_inspector_set_project (GLADE_INSPECTOR (plugin->priv->inspector), project);
+
+		glade_inspector_set_project (GLADE_INSPECTOR (plugin->priv->inspector), project);
 	}
 }
 
@@ -249,25 +250,25 @@ register_stock_icons (AnjutaPlugin *plugin)
 	/* Register stock icons */
 	BEGIN_REGISTER_ICON (plugin);
 	REGISTER_ICON ("anjuta-glade-plugin-48.png",
-				   "glade-plugin-icon");
+	               "glade-plugin-icon");
 	END_REGISTER_ICON;
 }
 
 static void
 on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
-				 AnjutaSession *session, GladePlugin *plugin)
+                 AnjutaSession *session, GladePlugin *plugin)
 {
 	GList *files, *docwids, *node;
-/*	GtkTreeModel *model;
-	GtkTreeIter iter;
-*/
+	/*	GtkTreeModel *model;
+	 GtkTreeIter iter;
+	 */
 	IAnjutaDocumentManager *docman;
-	
+
 	if (phase != ANJUTA_SESSION_PHASE_NORMAL)
 		return;
-	
+
 	docman = anjuta_shell_get_interface (ANJUTA_PLUGIN(plugin)->shell,
-										 IAnjutaDocumentManager, NULL);
+	                                     IAnjutaDocumentManager, NULL);
 	docwids = ianjuta_document_manager_get_doc_widgets (docman, NULL);
 	if (docwids)
 	{
@@ -297,56 +298,6 @@ on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
 			g_list_free (files);
 		}
 	}
-/*
-	files = anjuta_session_get_string_list (session, "File Loader", "Files");
-	if (files)
-		files = g_list_reverse (files);
-	
-	model = gtk_combo_box_get_model (GTK_COMBO_BOX (plugin->priv->projects_combo));
-	if (gtk_tree_model_get_iter_first (model, &iter))
-	{
-		do
-		{
-#if (GLADEUI_VERSION >= 330)
-			const gchar *ppath;
-#endif
-			gchar *uri;
-			GladeProject *project;
-			gtk_tree_model_get (model, &iter, PROJECT_COL, &project, -1);
-#if (GLADEUI_VERSION >= 330)
-			ppath = glade_project_get_path (project);
-			if (ppath)
-#else
-			if (project->path)
-#endif
-			{
-				GFile *file = g_file_new_for_path (
-#if (GLADEUI_VERSION >= 330)
-					ppath);
-#else
-					project->path);
-#endif
-				uri = g_file_get_uri (file);
-				g_object_unref (file);
-				if (uri)
-				{
-					/ * FIXME only log file if it's still open in docman * /
-					files = g_list_prepend (files, uri);
-					/ * uri is not freed here * /
-				}
-			}
-		}
-		while (gtk_tree_model_iter_next (model, &iter));
-	}
-
-	if (files)
-	{
-		files = g_list_reverse (files);
-		anjuta_session_set_string_list (session, "File Loader", "Files", files);
-		g_list_foreach (files, (GFunc)g_free, NULL);
-		g_list_free (files);
-	}
-*/
 }
 
 static void
@@ -356,14 +307,14 @@ glade_plugin_add_project (GladePlugin *glade_plugin, GladeProject *project)
 	GladePluginPriv *priv;
 	IAnjutaDocumentManager* docman = 
 		anjuta_shell_get_interface(ANJUTA_PLUGIN(glade_plugin)->shell,
-								   IAnjutaDocumentManager, NULL);
-	
- 	g_return_if_fail (GLADE_IS_PROJECT (project));
- 	
+		                           IAnjutaDocumentManager, NULL);
+
+	g_return_if_fail (GLADE_IS_PROJECT (project));
+
 	priv = glade_plugin->priv;
- 	view = anjuta_design_document_new(glade_plugin, project);
+	view = anjuta_design_document_new(glade_plugin, project);
 	g_signal_connect (G_OBJECT(view), "destroy",
-					  G_CALLBACK (on_document_destroy), glade_plugin);
+	                  G_CALLBACK (on_document_destroy), glade_plugin);
 	gtk_widget_show (view);
 	g_object_set_data (G_OBJECT (project), "design_view", view);
 	ianjuta_document_manager_add_document(docman, IANJUTA_DOCUMENT(view), NULL);
@@ -371,14 +322,14 @@ glade_plugin_add_project (GladePlugin *glade_plugin, GladeProject *project)
 
 static void
 inspector_item_activated_cb (GladeInspector     *inspector,
-							 AnjutaPlugin       *plugin)
+                             AnjutaPlugin       *plugin)
 {
 	GList *item = glade_inspector_get_selected_items (inspector);
 	g_assert (GLADE_IS_WIDGET (item->data) && (item->next == NULL));
-	
+
 	/* switch to this widget in the workspace */
 	glade_widget_show (GLADE_WIDGET (item->data));
-	
+
 	g_list_free (item);
 }
 
@@ -390,99 +341,95 @@ activate_plugin (AnjutaPlugin *plugin)
 	GladePluginPriv *priv;
 	GtkListStore *store;
 	GtkCellRenderer *renderer;
-	
+
 	DEBUG_PRINT ("%s", "GladePlugin: Activating Glade pluginâ?¦");
-	
+
 	glade_plugin = ANJUTA_PLUGIN_GLADE (plugin);
-	
+
 	ui = anjuta_shell_get_ui (plugin->shell, NULL);
 	priv = glade_plugin->priv;
-	
+
 	register_stock_icons (plugin);
-	
+
 	if (!priv->gpw)
 	{
 		priv->gpw = g_object_new(GLADE_TYPE_APP, NULL);
-	
+
 		glade_app_set_window (GTK_WIDGET (ANJUTA_PLUGIN(plugin)->shell));
 		glade_app_set_transient_parent (GTK_WINDOW (ANJUTA_PLUGIN(plugin)->shell));
-    	
+
 		/* Create a view for us */
 		priv->view_box = gtk_vbox_new (FALSE, 0);
 		store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING,
-									G_TYPE_POINTER, NULL);
-		
+		                            G_TYPE_POINTER, NULL);
+
 		priv->projects_combo = gtk_combo_box_new ();
 		renderer = gtk_cell_renderer_text_new ();
 		gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->projects_combo),
-									renderer, TRUE);
+		                            renderer, TRUE);
 		gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->projects_combo),
-										renderer, "text", NAME_COL, NULL);
+		                                renderer, "text", NAME_COL, NULL);
 		gtk_combo_box_set_model (GTK_COMBO_BOX (priv->projects_combo),
-								 GTK_TREE_MODEL (store));
+		                         GTK_TREE_MODEL (store));
 		g_object_unref (G_OBJECT (store));
 		gtk_box_pack_start (GTK_BOX (priv->view_box), priv->projects_combo,
-							FALSE, FALSE, 0);
-
-        priv->inspector = glade_inspector_new ();
-        
-        g_signal_connect (priv->inspector, "item-activated",
-        				  G_CALLBACK (inspector_item_activated_cb),
-        				  plugin);		
-
+		                    FALSE, FALSE, 0);
+		priv->inspector = glade_inspector_new ();
 		gtk_box_pack_start (GTK_BOX (priv->view_box), GTK_WIDGET (priv->inspector),
-							TRUE, TRUE, 0);
-		gtk_box_pack_start (GTK_BOX(priv->view_box), GTK_WIDGET (glade_app_get_editor()),
 		                    TRUE, TRUE, 0);
+
+		g_signal_connect (priv->inspector, "item-activated",
+		                  G_CALLBACK (inspector_item_activated_cb),
+		                  plugin);
+
+		priv->paned = gtk_vpaned_new ();
+
+		gtk_paned_add1 (GTK_PANED(priv->paned), priv->view_box);
+		gtk_paned_add2 (GTK_PANED(priv->paned), GTK_WIDGET(glade_app_get_editor()));
+
 		
-		gtk_widget_show_all (priv->view_box);
+		gtk_widget_show_all (priv->paned);
 		gtk_notebook_set_scrollable (GTK_NOTEBOOK (glade_app_get_editor ()->notebook),
-									 TRUE);
+		                             TRUE);
 		gtk_notebook_popup_enable (GTK_NOTEBOOK (glade_app_get_editor ()->notebook));
 	}
-	
+
 	g_signal_connect(G_OBJECT(plugin->shell), "destroy",
-					 G_CALLBACK(on_shell_destroy), plugin);
-	
+	                 G_CALLBACK(on_shell_destroy), plugin);
+
 	g_signal_connect (G_OBJECT (priv->projects_combo), "changed",
-					  G_CALLBACK (on_glade_project_changed), plugin);
+	                  G_CALLBACK (on_glade_project_changed), plugin);
 	g_signal_connect (G_OBJECT (priv->gpw), "update-ui",
-					  G_CALLBACK (glade_update_ui), plugin);
-	
+	                  G_CALLBACK (glade_update_ui), plugin);
+
 	g_signal_connect(G_OBJECT(glade_app_get_editor()), "gtk-doc-search",
-					 G_CALLBACK(on_api_help), plugin);
-	
-	/* FIXME: Glade doesn't want to die these widget, so
-	 * hold a permenent refs on them
-	 */
-	g_object_ref (glade_app_get_palette ());
-	g_object_ref (glade_app_get_editor ());
-	g_object_ref (priv->view_box);
+	                 G_CALLBACK(on_api_help), plugin);
 
 	gtk_widget_show (GTK_WIDGET (glade_app_get_palette ()));
 	gtk_widget_show (GTK_WIDGET (glade_app_get_editor ()));
+	gtk_widget_show (GTK_WIDGET (priv->inspector));
 	
 	/* Add widgets */
 	anjuta_shell_add_widget (ANJUTA_PLUGIN (plugin)->shell,
-							 GTK_WIDGET (priv->view_box),
-							 "AnjutaGladeTree", _("Widgets"),
-							 "glade-plugin-icon",
-							 ANJUTA_SHELL_PLACEMENT_LEFT, NULL);
+	                         GTK_WIDGET (priv->paned),
+	                         "AnjutaGladeTree", _("Widgets"),
+	                         "glade-plugin-icon",
+	                         ANJUTA_SHELL_PLACEMENT_LEFT, NULL);
 	anjuta_shell_add_widget (ANJUTA_PLUGIN (plugin)->shell,
-							 GTK_WIDGET (glade_app_get_palette ()),
-							 "AnjutaGladePalette", _("Palette"),
-							 "glade-plugin-icon",
-							 ANJUTA_SHELL_PLACEMENT_LEFT, NULL);
+	                         GTK_WIDGET (glade_app_get_palette ()),
+	                         "AnjutaGladePalette", _("Palette"),
+	                         "glade-plugin-icon",
+	                         ANJUTA_SHELL_PLACEMENT_RIGHT, NULL);
 	/* Connect to save session */
 	g_signal_connect (G_OBJECT (plugin->shell), "save_session",
-					  G_CALLBACK (on_session_save), plugin);
-	
+	                  G_CALLBACK (on_session_save), plugin);
+
 	/* Watch documents */
 	glade_plugin->priv->editor_watch_id = 
 		anjuta_plugin_add_watch (plugin, IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT,
-								 value_added_current_editor,
-								 value_removed_current_editor, NULL);
-	
+		                         value_added_current_editor,
+		                         value_removed_current_editor, NULL);
+
 	return TRUE;
 }
 
@@ -490,44 +437,44 @@ static gboolean
 deactivate_plugin (AnjutaPlugin *plugin)
 {
 	GladePluginPriv *priv;
-	
+
 	priv = ANJUTA_PLUGIN_GLADE (plugin)->priv;
-		
+
 	DEBUG_PRINT ("%s", "GladePlugin: Dectivating Glade pluginâ?¦");
-	
+
 	/* Disconnect signals */
 	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell),
-										  G_CALLBACK (on_shell_destroy),
-										  plugin);
-	
+	                                      G_CALLBACK (on_shell_destroy),
+	                                      plugin);
+
 	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell),
-										  G_CALLBACK (on_session_save), plugin);
-	
+	                                      G_CALLBACK (on_session_save), plugin);
+
 	g_signal_handlers_disconnect_by_func (G_OBJECT (priv->projects_combo),
-										  G_CALLBACK (on_glade_project_changed),
-										  plugin);
+	                                      G_CALLBACK (on_glade_project_changed),
+	                                      plugin);
 	g_signal_handlers_disconnect_by_func (G_OBJECT (priv->gpw),
-										  G_CALLBACK (glade_update_ui),
-										  plugin);
-	
+	                                      G_CALLBACK (glade_update_ui),
+	                                      plugin);
+
 	g_signal_handlers_disconnect_by_func (G_OBJECT(glade_app_get_editor()),
-										  G_CALLBACK(on_api_help), plugin);
+	                                      G_CALLBACK(on_api_help), plugin);
 
 	/* Remove widgets */
 	anjuta_shell_remove_widget (plugin->shell,
-								GTK_WIDGET (glade_app_get_palette ()),
-								NULL);
+	                            GTK_WIDGET (glade_app_get_palette ()),
+	                            NULL);
 	anjuta_shell_remove_widget (plugin->shell,
-								GTK_WIDGET (priv->view_box),
-								NULL);
-	/* FIXME: Don't destroy glade, since it doesn't want to */
-	/* g_object_unref (G_OBJECT (priv->gpw)); */
-	/* priv->gpw = NULL */
-	
+	                            GTK_WIDGET (priv->paned),
+	                            NULL);
+
 	priv->uiid = 0;
 	priv->action_group = NULL;
-	priv->gpw = NULL;
+
+	g_object_unref (priv->gpw);
 	
+	priv->gpw = NULL;
+
 	return TRUE;
 }
 
@@ -535,8 +482,7 @@ static void
 glade_plugin_dispose (GObject *obj)
 {
 	/* GladePlugin *plugin = ANJUTA_PLUGIN_GLADE (obj); */
-	
-	/* FIXME: Glade widgets should be destroyed */
+
 	G_OBJECT_CLASS (parent_class)->dispose (obj);
 }
 
@@ -553,11 +499,11 @@ glade_plugin_instance_init (GObject *obj)
 {
 	GladePluginPriv *priv;
 	GladePlugin *plugin = ANJUTA_PLUGIN_GLADE (obj);
-	
+
 	plugin->priv = (GladePluginPriv *) g_new0 (GladePluginPriv, 1);
 	priv = plugin->priv;
 	priv->destroying = FALSE;
-	
+
 	DEBUG_PRINT ("%s", "Intializing Glade plugin");
 }
 
@@ -590,23 +536,23 @@ ifile_open (IAnjutaFile *ifile, GFile* file, GError **err)
 	IAnjutaDocumentManager* docman;
 	GList* docwids, *node;
 	GList *glade_obj_node;
-	
+
 	g_return_if_fail (file != NULL);
-	
+
 	priv = ANJUTA_PLUGIN_GLADE (ifile)->priv;
-	
+
 	filename = g_file_get_path (file);
 	if (!filename)
 	{
 		gchar* uri = g_file_get_parse_name(file);
 		anjuta_util_dialog_warning (GTK_WINDOW (ANJUTA_PLUGIN (ifile)->shell),
-								    _("Not local file: %s"), uri);
+		                            _("Not local file: %s"), uri);
 		g_free (uri);
 		return;
 	}
-	
+
 	docman = anjuta_shell_get_interface(ANJUTA_PLUGIN(ifile)->shell, IAnjutaDocumentManager,
-										NULL);
+	                                    NULL);
 	docwids = ianjuta_document_manager_get_doc_widgets (docman, NULL);
 	if (docwids)
 	{
@@ -621,7 +567,7 @@ ifile_open (IAnjutaFile *ifile, GFile* file, GError **err)
 					if (g_file_equal (file, cur_file))
 					{
 						ianjuta_document_manager_set_current_document (docman,
-							IANJUTA_DOCUMENT (node->data), NULL);
+						                                               IANJUTA_DOCUMENT (node->data), NULL);
 						g_object_unref (file);
 						return;
 					}
@@ -631,34 +577,34 @@ ifile_open (IAnjutaFile *ifile, GFile* file, GError **err)
 		}
 		g_list_free (docwids);
 	}
-	
+
 	project = glade_project_load (filename);
 	g_free (filename);
 	if (!project)
 	{
 		gchar* name = g_file_get_parse_name (file);
 		anjuta_util_dialog_warning (GTK_WINDOW (ANJUTA_PLUGIN (ifile)->shell),
-								    _("Could not open %s"), name);
+		                            _("Could not open %s"), name);
 		g_free (name);
 		return;
 	}
 	store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->projects_combo)));
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter, NAME_COL, glade_project_get_name(project),
-						PROJECT_COL, project, -1);
+	                    PROJECT_COL, project, -1);
 	glade_plugin_add_project (ANJUTA_PLUGIN_GLADE (ifile), project);
 
 	/* Select the first window in the project */
 	for (glade_obj_node = (GList *) glade_project_get_objects (project);
-		 glade_obj_node != NULL;
-		 glade_obj_node = g_list_next (glade_obj_node))
+	     glade_obj_node != NULL;
+	     glade_obj_node = g_list_next (glade_obj_node))
 	{
 		GObject *glade_obj = G_OBJECT (glade_obj_node->data);
 		if (GTK_IS_WINDOW (glade_obj))
 			glade_widget_show (glade_widget_get_from_gobject (glade_obj));
 		break;
 	}
-	anjuta_shell_present_widget (ANJUTA_PLUGIN (ifile)->shell, priv->view_box, NULL);
+	anjuta_shell_present_widget (ANJUTA_PLUGIN (ifile)->shell, priv->paned, NULL);
 }
 
 static GFile*
@@ -683,23 +629,23 @@ iwizard_activate (IAnjutaWizard *iwizard, GError **err)
 	GladeProject *project;
 	GtkListStore *store;
 	GtkTreeIter iter;
-	
+
 	priv = ANJUTA_PLUGIN_GLADE (iwizard)->priv;
 
 	project = glade_project_new ();
 	if (!project)
 	{
 		anjuta_util_dialog_warning (GTK_WINDOW (ANJUTA_PLUGIN (iwizard)->shell),
-								    _("Could not create a new glade project."));
+		                            _("Could not create a new glade project."));
 		return;
 	}
 	store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->projects_combo)));
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter, NAME_COL, glade_project_get_name(project),
- 						PROJECT_COL, project, -1);
+	                    PROJECT_COL, project, -1);
 	glade_plugin_add_project (ANJUTA_PLUGIN_GLADE (iwizard), project);
 	anjuta_shell_present_widget (ANJUTA_PLUGIN (iwizard)->shell,
-				     GTK_WIDGET (glade_app_get_palette ()), NULL);
+	                             GTK_WIDGET (glade_app_get_palette ()), NULL);
 }
 
 static void



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