[anjuta] anjuta: Rename AnjutaApp as AnjutaWindow



commit 3a14746f5cc97db1e8eeaaa8d535c01e59a3b421
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sat Oct 27 19:12:38 2012 +0200

    anjuta: Rename AnjutaApp as AnjutaWindow
    
    AnjutaApp is derived from a GtkWindow.

 src/Makefile.am                       |    4 +-
 src/action-callbacks.c                |   46 ++--
 src/action-callbacks.h                |   14 +-
 src/{anjuta-app.c => anjuta-window.c} |  641 +++++++++++++++++----------------
 src/{anjuta-app.h => anjuta-window.h} |   36 +-
 src/anjuta.c                          |   94 +++---
 src/anjuta.h                          |    4 +-
 src/main.c                            |    6 +-
 8 files changed, 423 insertions(+), 422 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index fc61dd2..44605b4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,8 +37,8 @@ anjuta_SOURCES = \
 	about.h \
 	anjuta.c \
 	anjuta.h \
-	anjuta-app.c \
-	anjuta-app.h \
+	anjuta-window.c \
+	anjuta-window.h \
 	anjuta-actions.h \
 	action-callbacks.h \
 	action-callbacks.c \
diff --git a/src/action-callbacks.c b/src/action-callbacks.c
index 6d91d17..c790995 100644
--- a/src/action-callbacks.c
+++ b/src/action-callbacks.c
@@ -33,7 +33,7 @@
 #include <libanjuta/resources.h>
 #include <libanjuta/interfaces/ianjuta-preferences.h>
 
-#include "anjuta-app.h"
+#include "anjuta-window.h"
 #include "about.h"
 #include "action-callbacks.h"
 #include "anjuta.h"
@@ -41,11 +41,11 @@
 #define TOOLBAR_VISIBLE "toolbar-visible"
 
 void
-on_exit1_activate (GtkAction * action, AnjutaApp *app)
+on_exit1_activate (GtkAction * action, AnjutaWindow *win)
 {
 	GdkEvent *event = gdk_event_new (GDK_DELETE);
 
-	event->any.window = g_object_ref (gtk_widget_get_window (GTK_WIDGET(app)));
+	event->any.window = g_object_ref (gtk_widget_get_window (GTK_WIDGET(win)));
 	event->any.send_event = TRUE;
   
 	gtk_main_do_event (event);
@@ -53,61 +53,61 @@ on_exit1_activate (GtkAction * action, AnjutaApp *app)
 }
 
 void
-on_fullscreen_toggle (GtkAction *action, AnjutaApp *app)
+on_fullscreen_toggle (GtkAction *action, AnjutaWindow *win)
 {
 	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
-		gtk_window_fullscreen (GTK_WINDOW(app));
+		gtk_window_fullscreen (GTK_WINDOW(win));
 	else
-		gtk_window_unfullscreen (GTK_WINDOW(app));
+		gtk_window_unfullscreen (GTK_WINDOW(win));
 }
 
 void
-on_layout_lock_toggle (GtkAction *action, AnjutaApp *app)
+on_layout_lock_toggle (GtkAction *action, AnjutaWindow *win)
 {
-	if (app->layout_manager)
-		g_object_set (app->layout_manager->master, "locked",
+	if (win->layout_manager)
+		g_object_set (win->layout_manager->master, "locked",
 					  gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)),
 					  NULL);
 }
 
 void
-on_reset_layout_activate(GtkAction *action, AnjutaApp *app)
+on_reset_layout_activate(GtkAction *action, AnjutaWindow *win)
 {
-	anjuta_app_layout_reset (app);
+	anjuta_window_layout_reset (win);
 }
 
 void
-on_toolbar_view_toggled (GtkAction *action, AnjutaApp *app)
+on_toolbar_view_toggled (GtkAction *action, AnjutaWindow *win)
 {
 	gboolean status = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
 	if (status)
 	{
-		gtk_widget_show (app->toolbar);
+		gtk_widget_show (win->toolbar);
 	}
 	else
 	{
-		gtk_widget_hide (app->toolbar);
+		gtk_widget_hide (win->toolbar);
 	}
-	g_settings_set_boolean (app->settings,
+	g_settings_set_boolean (win->settings,
 	                        TOOLBAR_VISIBLE,
 	                        status);
 }
 
 void
-on_set_preferences1_activate (GtkAction * action, AnjutaApp *app)
+on_set_preferences1_activate (GtkAction * action, AnjutaWindow *win)
 {
 
 	GtkWidget *preferences_dialog;
 	
-	if (anjuta_preferences_is_dialog_created (app->preferences))
+	if (anjuta_preferences_is_dialog_created (win->preferences))
 	{
-		gtk_window_present (GTK_WINDOW (anjuta_preferences_get_dialog (app->preferences)));
+		gtk_window_present (GTK_WINDOW (anjuta_preferences_get_dialog (win->preferences)));
 		return;
 	}
-	preferences_dialog = anjuta_preferences_get_dialog (app->preferences);
+	preferences_dialog = anjuta_preferences_get_dialog (win->preferences);
 	
 	/* Install main application preferences */
-	anjuta_app_install_preferences (app);
+	anjuta_window_install_preferences (win);
 	
 	g_signal_connect_swapped (G_OBJECT (preferences_dialog),
 					  		  "response",
@@ -115,7 +115,7 @@ on_set_preferences1_activate (GtkAction * action, AnjutaApp *app)
 					  		  preferences_dialog); 
 	
 	gtk_window_set_transient_for (GTK_WINDOW (preferences_dialog),
-								  GTK_WINDOW (app));
+								  GTK_WINDOW (win));
 								  
 	gtk_widget_show (preferences_dialog);
 }
@@ -151,9 +151,9 @@ on_url_faqs_activate (GtkAction * action, gpointer user_data)
 }
 
 void
-on_about_activate (GtkAction * action, AnjutaApp *app)
+on_about_activate (GtkAction * action, AnjutaWindow *win)
 {	
-	GtkWidget *about_dlg = about_box_new (GTK_WINDOW (app));
+	GtkWidget *about_dlg = about_box_new (GTK_WINDOW (win));
 
 	g_signal_connect_swapped(about_dlg, "response",
 		G_CALLBACK(gtk_widget_destroy), about_dlg);
diff --git a/src/action-callbacks.h b/src/action-callbacks.h
index 6a71f60..677b6ed 100644
--- a/src/action-callbacks.h
+++ b/src/action-callbacks.h
@@ -22,12 +22,12 @@
 
 #include <gtk/gtk.h>
 
-void on_exit1_activate (GtkAction * action, AnjutaApp *app);
-void on_fullscreen_toggle (GtkAction *action, AnjutaApp *app);
-void on_layout_lock_toggle (GtkAction *action, AnjutaApp *app);
-void on_reset_layout_activate (GtkAction *action, AnjutaApp *app);
-void on_toolbar_view_toggled (GtkAction *action,  AnjutaApp *app);
-void on_set_preferences1_activate (GtkAction * action, AnjutaApp *app);
+void on_exit1_activate (GtkAction * action, AnjutaWindow *win);
+void on_fullscreen_toggle (GtkAction *action, AnjutaWindow *win);
+void on_layout_lock_toggle (GtkAction *action, AnjutaWindow *win);
+void on_reset_layout_activate (GtkAction *action, AnjutaWindow *win);
+void on_toolbar_view_toggled (GtkAction *action,  AnjutaWindow *win);
+void on_set_preferences1_activate (GtkAction * action, AnjutaWindow *win);
 
 /* Help actions */
 void on_help_manual_activate (GtkAction *action, gpointer data);
@@ -37,6 +37,6 @@ void on_url_home_activate (GtkAction * action, gpointer user_data);
 void on_url_bugs_activate (GtkAction * action, gpointer user_data);
 void on_url_faqs_activate (GtkAction * action, gpointer user_data);
 void on_url_activate (GtkAction * action, gpointer url);
-void on_about_activate (GtkAction * action, AnjutaApp *app);
+void on_about_activate (GtkAction * action, AnjutaWindow *win);
 
 #endif
diff --git a/src/anjuta-app.c b/src/anjuta-window.c
similarity index 62%
rename from src/anjuta-app.c
rename to src/anjuta-window.c
index faa421b..b9cd14d 100644
--- a/src/anjuta-app.c
+++ b/src/anjuta-window.c
@@ -1,6 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
- * anjuta.c Copyright (C) 2003 Naba Kumar  <naba gnome org>
+ * anjuta-window.c
+ * Copyright (C) 2003 Naba Kumar  <naba gnome org>
  *
  * 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
@@ -40,7 +41,7 @@
 #include <libanjuta/anjuta-plugin-manager.h>
 #include <libanjuta/anjuta-debug.h>
 
-#include "anjuta-app.h"
+#include "anjuta-window.h"
 #include "anjuta-actions.h"
 #include "about.h"
 
@@ -53,10 +54,10 @@
 #define TOOLBAR_VISIBLE "toolbar-visible"
 #define TOOLBAR_STYLE "toolbar-style"
 
-static void anjuta_app_layout_load (AnjutaApp *app,
+static void anjuta_window_layout_load (AnjutaWindow *win,
 									const gchar *layout_filename,
 									const gchar *name);
-static void anjuta_app_layout_save (AnjutaApp *app,
+static void anjuta_window_layout_save (AnjutaWindow *win,
 									const gchar *layout_filename,
 									const gchar *name);
 
@@ -65,7 +66,7 @@ static GtkToolbarStyle style = -1;
 
 static void
 menu_item_select_cb (GtkMenuItem *proxy,
-                     AnjutaApp *app)
+                     AnjutaWindow *win)
 {
 	GtkAction *action;
 	char *message;
@@ -76,16 +77,16 @@ menu_item_select_cb (GtkMenuItem *proxy,
 	g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
 	if (message)
 	{
-		anjuta_status_push (app->status, "%s", message);
+		anjuta_status_push (win->status, "%s", message);
 		g_free (message);
 	}
 }
 
 static void
 menu_item_deselect_cb (GtkMenuItem *proxy,
-                       AnjutaApp *app)
+                       AnjutaWindow *win)
 {
-	anjuta_status_pop (app->status);
+	anjuta_status_pop (win->status);
 }
 
 
@@ -93,14 +94,14 @@ static void
 connect_proxy_cb (GtkUIManager *manager,
                   GtkAction *action,
                   GtkWidget *proxy,
-                  AnjutaApp *app)
+                  AnjutaWindow *win)
 {
 	if (GTK_IS_MENU_ITEM (proxy))
 	{
 		g_signal_connect (proxy, "select",
-				  G_CALLBACK (menu_item_select_cb), app);
+				  G_CALLBACK (menu_item_select_cb), win);
 		g_signal_connect (proxy, "deselect",
-				  G_CALLBACK (menu_item_deselect_cb), app);
+				  G_CALLBACK (menu_item_deselect_cb), win);
 	}
 }
 
@@ -108,30 +109,30 @@ static void
 disconnect_proxy_cb (GtkUIManager *manager,
                      GtkAction *action,
                      GtkWidget *proxy,
-	                 AnjutaApp *app)
+	                 AnjutaWindow *win)
 {
 	if (GTK_IS_MENU_ITEM (proxy))
 	{
 		g_signal_handlers_disconnect_by_func
-			(proxy, G_CALLBACK (menu_item_select_cb), app);
+			(proxy, G_CALLBACK (menu_item_select_cb), win);
 		g_signal_handlers_disconnect_by_func
-			(proxy, G_CALLBACK (menu_item_deselect_cb), app);
+			(proxy, G_CALLBACK (menu_item_deselect_cb), win);
 	}
 }
 
 static void
-anjuta_app_iconify_dockable_widget (AnjutaShell *shell, GtkWidget *widget,
+anjuta_window_iconify_dockable_widget (AnjutaShell *shell, GtkWidget *widget,
                                     GError **error)
 {
-	AnjutaApp *app = NULL;
+	AnjutaWindow *win = NULL;
 	GtkWidget *dock_item = NULL;
 
 	/* Argumments assertions */
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (GTK_IS_WIDGET (widget));
 
-	app = ANJUTA_APP (shell);
-	g_return_if_fail (app->widgets != NULL);
+	win = ANJUTA_WINDOW (shell);
+	g_return_if_fail (win->widgets != NULL);
 
 	dock_item = g_object_get_data (G_OBJECT (widget), "dockitem");
 	g_return_if_fail (dock_item != NULL);
@@ -141,18 +142,18 @@ anjuta_app_iconify_dockable_widget (AnjutaShell *shell, GtkWidget *widget,
 }
 
 static void
-anjuta_app_hide_dockable_widget (AnjutaShell *shell, GtkWidget *widget,
+anjuta_window_hide_dockable_widget (AnjutaShell *shell, GtkWidget *widget,
                                  GError **error)
 {
-	AnjutaApp *app = NULL;
+	AnjutaWindow *win = NULL;
 	GtkWidget *dock_item = NULL;
 
 	/* Argumments assertions */
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (GTK_IS_WIDGET (widget));
 
-	app = ANJUTA_APP (shell);
-	g_return_if_fail (app->widgets != NULL);
+	win = ANJUTA_WINDOW (shell);
+	g_return_if_fail (win->widgets != NULL);
 
 	dock_item = g_object_get_data (G_OBJECT (widget), "dockitem");
 	g_return_if_fail (dock_item != NULL);
@@ -162,18 +163,18 @@ anjuta_app_hide_dockable_widget (AnjutaShell *shell, GtkWidget *widget,
 }
 
 static void
-anjuta_app_show_dockable_widget (AnjutaShell *shell, GtkWidget* widget,
+anjuta_window_show_dockable_widget (AnjutaShell *shell, GtkWidget* widget,
                                  GError **error)
 {
-	AnjutaApp *app = NULL;
+	AnjutaWindow *win = NULL;
 	GtkWidget *dock_item = NULL;
 
 	/* Argumments assertions */
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (GTK_IS_WIDGET (widget));
 
-	app = ANJUTA_APP (shell);
-	g_return_if_fail (app->widgets != NULL);
+	win = ANJUTA_WINDOW (shell);
+	g_return_if_fail (win->widgets != NULL);
 
 	dock_item = g_object_get_data (G_OBJECT (widget), "dockitem");
 	g_return_if_fail (dock_item != NULL);
@@ -183,33 +184,33 @@ anjuta_app_show_dockable_widget (AnjutaShell *shell, GtkWidget* widget,
 }
 
 static void
-anjuta_app_maximize_widget (AnjutaShell *shell,
+anjuta_window_maximize_widget (AnjutaShell *shell,
                             const char  *widget_name,
                             GError **error)
 {
-	AnjutaApp *app = NULL;
+	AnjutaWindow *win = NULL;
 	GtkWidget *dock_item = NULL;
 	gpointer  value, key;
 	GtkWidget *widget = NULL;
 	GHashTableIter iter;
 
-	/* AnjutaApp assertions */
-	g_return_if_fail (ANJUTA_IS_APP (shell));
-	app = ANJUTA_APP (shell);
+	/* AnjutaWindow assertions */
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
+	win = ANJUTA_WINDOW (shell);
 
-	/* If app->maximized is TRUE then another widget is already maximized.
+	/* If win->maximized is TRUE then another widget is already maximized.
 	   Restoring the UI for a new maximization. */
-	if(app->maximized)
-		gdl_dock_layout_load_layout (app->layout_manager, "back-up");
+	if(win->maximized)
+		gdl_dock_layout_load_layout (win->layout_manager, "back-up");
 
 	/* Back-up the layout so it can be restored */
-	gdl_dock_layout_save_layout(app->layout_manager, "back-up");
+	gdl_dock_layout_save_layout(win->layout_manager, "back-up");
 
-	/* Mark the app as maximized (the other widgets except center are hidden) */
-	app->maximized = TRUE;
+	/* Mark the win as maximized (the other widgets except center are hidden) */
+	win->maximized = TRUE;
 
 	/* Hide all DockItem's except the ones positioned in the center */
-	g_hash_table_iter_init (&iter, app->widgets);
+	g_hash_table_iter_init (&iter, win->widgets);
 	while (g_hash_table_iter_next (&iter, &key, &value))
 	{
 		if (value == NULL)
@@ -235,24 +236,24 @@ anjuta_app_maximize_widget (AnjutaShell *shell,
 }
 
 static void
-anjuta_app_unmaximize (AnjutaShell *shell,
+anjuta_window_unmaximize (AnjutaShell *shell,
                        GError **error)
 {
-	AnjutaApp *app = NULL;
+	AnjutaWindow *win = NULL;
 
-	/* AnjutaApp assertions */
-	g_return_if_fail (ANJUTA_IS_APP (shell));
-	app = ANJUTA_APP (shell);
+	/* AnjutaWindow assertions */
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
+	win = ANJUTA_WINDOW (shell);
 
 	/* If not maximized then the operation doesn't make sence. */
-	g_return_if_fail (app->maximized);
+	g_return_if_fail (win->maximized);
 
 	/* Load the backed-up layout */
-	gdl_dock_layout_load_layout (app->layout_manager, "back-up");
-	gdl_dock_layout_delete_layout (app->layout_manager, "back-up");
+	gdl_dock_layout_load_layout (win->layout_manager, "back-up");
+	gdl_dock_layout_delete_layout (win->layout_manager, "back-up");
 
 	/* Un-mark maximized */
-	app->maximized = FALSE;
+	win->maximized = FALSE;
 }
 
 static void
@@ -260,7 +261,7 @@ on_toolbar_style_changed (GSettings* settings,
                           const gchar* key,
                           gpointer user_data)
 {
-	AnjutaApp* app = ANJUTA_APP (user_data);
+	AnjutaWindow* win = ANJUTA_WINDOW (user_data);
 	gchar* tb_style = g_settings_get_string (settings, key);
 
 	if (strcasecmp (tb_style, "Default") == 0)
@@ -276,11 +277,11 @@ on_toolbar_style_changed (GSettings* settings,
 
 	if (style != -1)
 	{
-		gtk_toolbar_set_style (GTK_TOOLBAR (app->toolbar), style);
+		gtk_toolbar_set_style (GTK_TOOLBAR (win->toolbar), style);
 	}
 	else
 	{
-		gtk_toolbar_unset_style (GTK_TOOLBAR (app->toolbar));
+		gtk_toolbar_unset_style (GTK_TOOLBAR (win->toolbar));
 	}
 	g_free (tb_style);
 }
@@ -290,7 +291,7 @@ on_gdl_style_changed (GSettings* settings,
                       const gchar* key,
                       gpointer user_data)
 {
-	AnjutaApp* app = ANJUTA_APP (user_data);
+	AnjutaWindow* win = ANJUTA_WINDOW (user_data);
 	GdlSwitcherStyle style = GDL_SWITCHER_STYLE_BOTH;
 
 	gchar* pr_style = g_settings_get_string (settings, key);
@@ -306,7 +307,7 @@ on_gdl_style_changed (GSettings* settings,
 	else if (strcasecmp (pr_style, "Tabs") == 0)
 		style = GDL_SWITCHER_STYLE_TABS;
 
-	g_object_set (G_OBJECT(app->layout_manager->master), "switcher-style",
+	g_object_set (G_OBJECT(win->layout_manager->master), "switcher-style",
 				  style, NULL);
 	g_free (pr_style);
 }
@@ -353,7 +354,7 @@ on_layout_dirty_notify (GObject *object, GParamSpec *pspec, gpointer user_data)
 		g_object_get (object, "dirty", &dirty, NULL);
 		if (dirty) {
 			/* Update UI toggle buttons */
-			g_hash_table_foreach (ANJUTA_APP (user_data)->widgets,
+			g_hash_table_foreach (ANJUTA_WINDOW (user_data)->widgets,
 								  on_update_widget_view_menuitem,
 								  NULL);
 		}
@@ -362,13 +363,13 @@ on_layout_dirty_notify (GObject *object, GParamSpec *pspec, gpointer user_data)
 
 static void
 on_layout_locked_notify (GdlDockMaster *master, GParamSpec *pspec,
-						 AnjutaApp     *app)
+						 AnjutaWindow     *win)
 {
 	AnjutaUI *ui;
 	GtkAction *action;
 	gint locked;
 
-	ui = app->ui;
+	ui = win->ui;
 	action = anjuta_ui_get_action (ui, "ActionGroupToggleView",
 								   "ActionViewLockLayout");
 
@@ -379,7 +380,7 @@ on_layout_locked_notify (GdlDockMaster *master, GParamSpec *pspec,
 
 static void
 on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
-				 AnjutaSession *session, AnjutaApp *app)
+				 AnjutaSession *session, AnjutaWindow *win)
 {
 	gchar *geometry, *layout_file;
 	GdkWindowState state;
@@ -388,7 +389,7 @@ on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
 		return;
 
 	/* Save geometry */
-	state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (app)));
+	state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (win)));
 	if (state & GDK_WINDOW_STATE_MAXIMIZED) {
 		anjuta_session_set_int (session, "Anjuta", "Maximized", 1);
 	}
@@ -400,7 +401,7 @@ on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
 	if (!(state & GDK_WINDOW_STATE_MAXIMIZED) ||
 		!(state & GDK_WINDOW_STATE_FULLSCREEN))
 	{
-		geometry = anjuta_app_get_geometry (app);
+		geometry = anjuta_window_get_geometry (win);
 		if (geometry)
 			anjuta_session_set_string (session, "Anjuta", "Geometry",
 									   geometry);
@@ -410,13 +411,13 @@ on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
 	/* Save layout */
 	layout_file = g_build_filename (anjuta_session_get_session_directory (session),
 									"dock-layout.xml", NULL);
-	anjuta_app_layout_save (app, layout_file, NULL);
+	anjuta_window_layout_save (win, layout_file, NULL);
 	g_free (layout_file);
 }
 
 static void
 on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase,
-				 AnjutaSession *session, AnjutaApp *app)
+				 AnjutaSession *session, AnjutaWindow *win)
 {
 	/* We load layout at last so that all plugins would have loaded by now */
 	if (phase == ANJUTA_SESSION_PHASE_LAST)
@@ -426,7 +427,7 @@ on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase,
 
 		/* Restore geometry */
 		geometry = anjuta_session_get_string (session, "Anjuta", "Geometry");
-		anjuta_app_set_geometry (app, geometry);
+		anjuta_window_set_geometry (win, geometry);
 		g_free (geometry);
 
 		/* Restore window state */
@@ -450,90 +451,90 @@ on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase,
 		/* Restore layout */
 		layout_file = g_build_filename (anjuta_session_get_session_directory (session),
 										"dock-layout.xml", NULL);
-		anjuta_app_layout_load (app, layout_file, NULL);
+		anjuta_window_layout_load (win, layout_file, NULL);
 		g_free (layout_file);
 	}
 }
 
 static void
-anjuta_app_dispose (GObject *widget)
+anjuta_window_dispose (GObject *widget)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 
-	g_return_if_fail (ANJUTA_IS_APP (widget));
+	g_return_if_fail (ANJUTA_IS_WINDOW (widget));
 
-	app = ANJUTA_APP (widget);
+	win = ANJUTA_WINDOW (widget);
 
-	if (app->widgets)
+	if (win->widgets)
 	{
-		if (g_hash_table_size (app->widgets) > 0)
+		if (g_hash_table_size (win->widgets) > 0)
 		{
 			/*
 			g_warning ("Some widgets are still inside shell (%d widgets), they are:",
-					   g_hash_table_size (app->widgets));
-			g_hash_table_foreach (app->widgets, (GHFunc)puts, NULL);
+					   g_hash_table_size (win->widgets));
+			g_hash_table_foreach (win->widgets, (GHFunc)puts, NULL);
 			*/
 		}
-		g_hash_table_destroy (app->widgets);
-		app->widgets = NULL;
+		g_hash_table_destroy (win->widgets);
+		win->widgets = NULL;
 	}
 
-	if (app->values)
+	if (win->values)
 	{
-		if (g_hash_table_size (app->values) > 0)
+		if (g_hash_table_size (win->values) > 0)
 		{
 			/*
 			g_warning ("Some Values are still left in shell (%d Values), they are:",
-					   g_hash_table_size (app->values));
-			g_hash_table_foreach (app->values, (GHFunc)puts, NULL);
+					   g_hash_table_size (win->values));
+			g_hash_table_foreach (win->values, (GHFunc)puts, NULL);
 			*/
 		}
-		g_hash_table_destroy (app->values);
-		app->values = NULL;
+		g_hash_table_destroy (win->values);
+		win->values = NULL;
 	}
 
-	if (app->layout_manager) {
-		g_object_unref (app->layout_manager);
-		app->layout_manager = NULL;
+	if (win->layout_manager) {
+		g_object_unref (win->layout_manager);
+		win->layout_manager = NULL;
 	}
-	if (app->profile_manager) {
-		g_object_unref (G_OBJECT (app->profile_manager));
-		app->profile_manager = NULL;
+	if (win->profile_manager) {
+		g_object_unref (G_OBJECT (win->profile_manager));
+		win->profile_manager = NULL;
 	}
-	if (app->plugin_manager) {
-		g_object_unref (G_OBJECT (app->plugin_manager));
-		app->plugin_manager = NULL;
+	if (win->plugin_manager) {
+		g_object_unref (G_OBJECT (win->plugin_manager));
+		win->plugin_manager = NULL;
 	}
-	if (app->status) {
-		g_object_unref (G_OBJECT (app->status));
-		app->status = NULL;
+	if (win->status) {
+		g_object_unref (G_OBJECT (win->status));
+		win->status = NULL;
 	}
 
-	if (app->settings) {
-		g_object_unref (app->settings);
-		app->settings = NULL;
+	if (win->settings) {
+		g_object_unref (win->settings);
+		win->settings = NULL;
 	}
 
 	G_OBJECT_CLASS (parent_class)->dispose (widget);
 }
 
 static void
-anjuta_app_finalize (GObject *widget)
+anjuta_window_finalize (GObject *widget)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 
-	g_return_if_fail (ANJUTA_IS_APP (widget));
+	g_return_if_fail (ANJUTA_IS_WINDOW (widget));
 
-	app = ANJUTA_APP (widget);
+	win = ANJUTA_WINDOW (widget);
 
-	gtk_widget_destroy (GTK_WIDGET (app->ui));
-	gtk_widget_destroy (GTK_WIDGET (app->preferences));
+	gtk_widget_destroy (GTK_WIDGET (win->ui));
+	gtk_widget_destroy (GTK_WIDGET (win->preferences));
 
 	G_OBJECT_CLASS (parent_class)->finalize (widget);
 }
 
 static void
-anjuta_app_instance_init (AnjutaApp *app)
+anjuta_window_instance_init (AnjutaWindow *win)
 {
 	gint merge_id;
 	GtkWidget *menubar, *about_menu;
@@ -548,159 +549,159 @@ anjuta_app_instance_init (AnjutaApp *app)
 
 	DEBUG_PRINT ("%s", "Initializing Anjuta...");
 
-	gtk_window_set_geometry_hints (GTK_WINDOW (app), GTK_WIDGET (app),
+	gtk_window_set_geometry_hints (GTK_WINDOW (win), GTK_WIDGET (win),
 								   &size_hints, GDK_HINT_RESIZE_INC);
-	gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
+	gtk_window_set_resizable (GTK_WINDOW (win), TRUE);
 
 	/*
 	 * Main box
 	 */
 	main_box = gtk_vbox_new (FALSE, 0);
-	gtk_container_add (GTK_CONTAINER (app), main_box);
+	gtk_container_add (GTK_CONTAINER (win), main_box);
 	gtk_widget_show (main_box);
 
-	app->values = NULL;
-	app->widgets = NULL;
-	app->maximized = FALSE;
+	win->values = NULL;
+	win->widgets = NULL;
+	win->maximized = FALSE;
 
 	/* Settings */
-	app->settings = g_settings_new (PREF_SCHEMA);
+	win->settings = g_settings_new (PREF_SCHEMA);
 
 	/* Status bar */
-	app->status = ANJUTA_STATUS (anjuta_status_new ());
-	anjuta_status_set_title_window (app->status, GTK_WIDGET (app));
-	gtk_widget_show (GTK_WIDGET (app->status));
+	win->status = ANJUTA_STATUS (anjuta_status_new ());
+	anjuta_status_set_title_window (win->status, GTK_WIDGET (win));
+	gtk_widget_show (GTK_WIDGET (win->status));
 	gtk_box_pack_end (GTK_BOX (main_box),
-					  GTK_WIDGET (app->status), FALSE, TRUE, 0);
-	g_object_ref (G_OBJECT (app->status));
-	g_object_add_weak_pointer (G_OBJECT (app->status), (gpointer)&app->status);
+					  GTK_WIDGET (win->status), FALSE, TRUE, 0);
+	g_object_ref (G_OBJECT (win->status));
+	g_object_add_weak_pointer (G_OBJECT (win->status), (gpointer)&win->status);
 
 	/* configure dock */
 	hbox = gtk_hbox_new (FALSE, 0);
 	gtk_widget_show (hbox);
-	app->dock = gdl_dock_new ();
-	gtk_widget_show (app->dock);
-	gtk_box_pack_end(GTK_BOX (hbox), app->dock, TRUE, TRUE, 0);
+	win->dock = gdl_dock_new ();
+	gtk_widget_show (win->dock);
+	gtk_box_pack_end(GTK_BOX (hbox), win->dock, TRUE, TRUE, 0);
 
-	dockbar = gdl_dock_bar_new (GDL_DOCK(app->dock));
+	dockbar = gdl_dock_bar_new (GDL_DOCK(win->dock));
 	gtk_widget_show (dockbar);
 	gtk_box_pack_start(GTK_BOX (hbox), dockbar, FALSE, FALSE, 0);
 
-	app->layout_manager = gdl_dock_layout_new (GDL_DOCK (app->dock));
-	g_signal_connect (app->layout_manager, "notify::dirty",
-					  G_CALLBACK (on_layout_dirty_notify), app);
-	g_signal_connect (app->layout_manager->master, "notify::locked",
-					  G_CALLBACK (on_layout_locked_notify), app);
+	win->layout_manager = gdl_dock_layout_new (GDL_DOCK (win->dock));
+	g_signal_connect (win->layout_manager, "notify::dirty",
+					  G_CALLBACK (on_layout_dirty_notify), win);
+	g_signal_connect (win->layout_manager->master, "notify::locked",
+					  G_CALLBACK (on_layout_locked_notify), win);
 
 	/* UI engine */
-	app->ui = anjuta_ui_new ();
-	g_object_add_weak_pointer (G_OBJECT (app->ui), (gpointer)&app->ui);
+	win->ui = anjuta_ui_new ();
+	g_object_add_weak_pointer (G_OBJECT (win->ui), (gpointer)&win->ui);
 	/* show tooltips in the statusbar */
-	g_signal_connect (app->ui,
+	g_signal_connect (win->ui,
 			  "connect_proxy",
 			  G_CALLBACK (connect_proxy_cb),
-			  app);
-	g_signal_connect (app->ui,
+			  win);
+	g_signal_connect (win->ui,
 			  "disconnect_proxy",
 			  G_CALLBACK (disconnect_proxy_cb),
-			  app);
+			  win);
 
 	/* Plugin Manager */
 	plugins_dirs = g_list_prepend (plugins_dirs, PACKAGE_PLUGIN_DIR);
-	app->plugin_manager = anjuta_plugin_manager_new (G_OBJECT (app),
-													 app->status,
+	win->plugin_manager = anjuta_plugin_manager_new (G_OBJECT (win),
+													 win->status,
 													 plugins_dirs);
-	app->profile_manager = anjuta_profile_manager_new (app->plugin_manager);
+	win->profile_manager = anjuta_profile_manager_new (win->plugin_manager);
 	g_list_free (plugins_dirs);
 
 	/* Preferences */
-	app->preferences = anjuta_preferences_new (app->plugin_manager, PREF_SCHEMA);
-	g_object_add_weak_pointer (G_OBJECT (app->preferences),
-							   (gpointer)&app->preferences);
+	win->preferences = anjuta_preferences_new (win->plugin_manager, PREF_SCHEMA);
+	g_object_add_weak_pointer (G_OBJECT (win->preferences),
+							   (gpointer)&win->preferences);
 
-	g_signal_connect (app->settings, "changed::" GDL_STYLE,
-	                  G_CALLBACK (on_gdl_style_changed), app);
-	on_gdl_style_changed (app->settings, GDL_STYLE, app);
+	g_signal_connect (win->settings, "changed::" GDL_STYLE,
+	                  G_CALLBACK (on_gdl_style_changed), win);
+	on_gdl_style_changed (win->settings, GDL_STYLE, win);
 
 	/* Register actions */
-	anjuta_ui_add_action_group_entries (app->ui, "ActionGroupFile", _("File"),
+	anjuta_ui_add_action_group_entries (win->ui, "ActionGroupFile", _("File"),
 										menu_entries_file,
 										G_N_ELEMENTS (menu_entries_file),
-										GETTEXT_PACKAGE, TRUE, app);
-	anjuta_ui_add_action_group_entries (app->ui, "ActionGroupEdit", _("Edit"),
+										GETTEXT_PACKAGE, TRUE, win);
+	anjuta_ui_add_action_group_entries (win->ui, "ActionGroupEdit", _("Edit"),
 										menu_entries_edit,
 										G_N_ELEMENTS (menu_entries_edit),
-										GETTEXT_PACKAGE, TRUE, app);
-	anjuta_ui_add_action_group_entries (app->ui, "ActionGroupView", _("View"),
+										GETTEXT_PACKAGE, TRUE, win);
+	anjuta_ui_add_action_group_entries (win->ui, "ActionGroupView", _("View"),
 										menu_entries_view,
 										G_N_ELEMENTS (menu_entries_view),
-										GETTEXT_PACKAGE, TRUE, app);
-	anjuta_ui_add_toggle_action_group_entries (app->ui, "ActionGroupToggleView",
+										GETTEXT_PACKAGE, TRUE, win);
+	anjuta_ui_add_toggle_action_group_entries (win->ui, "ActionGroupToggleView",
 										_("View"),
 										menu_entries_toggle_view,
 										G_N_ELEMENTS (menu_entries_toggle_view),
-										GETTEXT_PACKAGE, TRUE, app);
-	anjuta_ui_add_action_group_entries (app->ui, "ActionGroupHelp", _("Help"),
+										GETTEXT_PACKAGE, TRUE, win);
+	anjuta_ui_add_action_group_entries (win->ui, "ActionGroupHelp", _("Help"),
 										menu_entries_help,
 										G_N_ELEMENTS (menu_entries_help),
-										GETTEXT_PACKAGE, TRUE, app);
+										GETTEXT_PACKAGE, TRUE, win);
 
 	/* Merge UI */
-	merge_id = anjuta_ui_merge (app->ui, UI_FILE);
+	merge_id = anjuta_ui_merge (win->ui, UI_FILE);
 
 	/* Adding accels group */
-	gtk_window_add_accel_group (GTK_WINDOW (app),
-								gtk_ui_manager_get_accel_group (GTK_UI_MANAGER (app->ui)));
+	gtk_window_add_accel_group (GTK_WINDOW (win),
+								gtk_ui_manager_get_accel_group (GTK_UI_MANAGER (win->ui)));
 
 	/* create main menu */
-	menubar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (app->ui),
+	menubar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (win->ui),
 										 "/MenuMain");
 	gtk_box_pack_start (GTK_BOX (main_box), menubar, FALSE, FALSE, 0);
 	gtk_widget_show (menubar);
 
 	/* create toolbar */
-	app->toolbar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (app->ui),
+	win->toolbar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (win->ui),
 										 "/ToolbarMain");
-    if (!g_settings_get_boolean (app->settings, TOOLBAR_VISIBLE))
-		gtk_widget_hide (app->toolbar);
-	gtk_style_context_add_class (gtk_widget_get_style_context (app->toolbar),
+    if (!g_settings_get_boolean (win->settings, TOOLBAR_VISIBLE))
+		gtk_widget_hide (win->toolbar);
+	gtk_style_context_add_class (gtk_widget_get_style_context (win->toolbar),
 	                             GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
-	gtk_box_pack_start (GTK_BOX (main_box), app->toolbar, FALSE, FALSE, 0);
-	action = gtk_ui_manager_get_action (GTK_UI_MANAGER (app->ui),
+	gtk_box_pack_start (GTK_BOX (main_box), win->toolbar, FALSE, FALSE, 0);
+	action = gtk_ui_manager_get_action (GTK_UI_MANAGER (win->ui),
 										"/MenuMain/MenuView/Toolbar");
 	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION(action),
-								  g_settings_get_boolean (app->settings,
+								  g_settings_get_boolean (win->settings,
 								                          TOOLBAR_VISIBLE));
-	g_signal_connect (app->settings, "changed::" TOOLBAR_STYLE,
-	                  G_CALLBACK (on_toolbar_style_changed), app);
-	on_toolbar_style_changed (app->settings, TOOLBAR_STYLE, app);
+	g_signal_connect (win->settings, "changed::" TOOLBAR_STYLE,
+	                  G_CALLBACK (on_toolbar_style_changed), win);
+	on_toolbar_style_changed (win->settings, TOOLBAR_STYLE, win);
 
 	/* Create widgets menu */
 	view_menu =
-		gtk_ui_manager_get_widget (GTK_UI_MANAGER(app->ui),
+		gtk_ui_manager_get_widget (GTK_UI_MANAGER(win->ui),
 								  "/MenuMain/MenuView");
-	app->view_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (view_menu));
+	win->view_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (view_menu));
 
 	/* Create about plugins menu */
 	about_menu =
-		gtk_ui_manager_get_widget (GTK_UI_MANAGER(app->ui),
+		gtk_ui_manager_get_widget (GTK_UI_MANAGER(win->ui),
 								   "/MenuMain/PlaceHolderHelpMenus/MenuHelp/"
 								   "PlaceHolderHelpAbout/AboutPlugins");
-	about_create_plugins_submenu (ANJUTA_SHELL (app), about_menu);
+	about_create_plugins_submenu (ANJUTA_SHELL (win), about_menu);
 
 	/* Add main view */
 	gtk_box_pack_start (GTK_BOX (main_box), hbox, TRUE, TRUE, 0);
 
 	/* Connect to session */
-	g_signal_connect (G_OBJECT (app), "save_session",
-					  G_CALLBACK (on_session_save), app);
-	g_signal_connect (G_OBJECT (app), "load_session",
-					  G_CALLBACK (on_session_load), app);
+	g_signal_connect (G_OBJECT (win), "save_session",
+					  G_CALLBACK (on_session_save), win);
+	g_signal_connect (G_OBJECT (win), "load_session",
+					  G_CALLBACK (on_session_load), win);
 
 	/* Loading accels */
 	anjuta_ui_load_accels (NULL);
 
-	app->save_count = 0;
+	win->save_count = 0;
 }
 
 /*
@@ -712,7 +713,7 @@ anjuta_app_instance_init (AnjutaApp *app)
  * parent handler, skipping gtk_window_key_press_event.
  */
 static gboolean
-anjuta_app_key_press_event (GtkWidget   *widget,
+anjuta_window_key_press_event (GtkWidget   *widget,
                             GdkEventKey *event)
 {
 	static gpointer grand_parent_class = NULL;
@@ -763,7 +764,7 @@ anjuta_app_key_press_event (GtkWidget   *widget,
 }
 
 static void
-anjuta_app_class_init (AnjutaAppClass *class)
+anjuta_window_class_init (AnjutaWindowClass *class)
 {
 	GObjectClass *object_class;
 	GtkWidgetClass *widget_class;
@@ -772,37 +773,37 @@ anjuta_app_class_init (AnjutaAppClass *class)
 	object_class = (GObjectClass*) class;
 	widget_class = (GtkWidgetClass*) class;
 
-	object_class->finalize = anjuta_app_finalize;
-	object_class->dispose = anjuta_app_dispose;
+	object_class->finalize = anjuta_window_finalize;
+	object_class->dispose = anjuta_window_dispose;
 
-	widget_class->key_press_event = anjuta_app_key_press_event;
+	widget_class->key_press_event = anjuta_window_key_press_event;
 }
 
 GtkWidget *
-anjuta_app_new (void)
+anjuta_window_new (void)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 
-	app = ANJUTA_APP (g_object_new (ANJUTA_TYPE_APP,
+	win = ANJUTA_WINDOW (g_object_new (ANJUTA_TYPE_WINDOW,
 									"title", "Anjuta",
 									NULL));
-	return GTK_WIDGET (app);
+	return GTK_WIDGET (win);
 }
 
 gchar*
-anjuta_app_get_geometry (AnjutaApp *app)
+anjuta_window_get_geometry (AnjutaWindow *win)
 {
 	gchar *geometry;
 	gint width, height, posx, posy;
 
-	g_return_val_if_fail (ANJUTA_IS_APP (app), NULL);
+	g_return_val_if_fail (ANJUTA_IS_WINDOW (win), NULL);
 
 	geometry = NULL;
 	width = height = posx = posy = 0;
-	if (gtk_widget_get_window (GTK_WIDGET (app)))
+	if (gtk_widget_get_window (GTK_WIDGET (win)))
 	{
-		gtk_window_get_size (GTK_WINDOW (app), &width, &height);
-		gtk_window_get_position (GTK_WINDOW(app), &posx, &posy);
+		gtk_window_get_size (GTK_WINDOW (win), &width, &height);
+		gtk_window_get_position (GTK_WINDOW(win), &posx, &posy);
 
 		geometry = g_strdup_printf ("%dx%d+%d+%d", width, height, posx, posy);
 	}
@@ -810,7 +811,7 @@ anjuta_app_get_geometry (AnjutaApp *app)
 }
 
 void
-anjuta_app_set_geometry (AnjutaApp *app, const gchar *geometry)
+anjuta_window_set_geometry (AnjutaWindow *win, const gchar *geometry)
 {
 	gint width, height, posx, posy;
 	gboolean geometry_set = FALSE;
@@ -822,14 +823,14 @@ anjuta_app_set_geometry (AnjutaApp *app, const gchar *geometry)
 		if (sscanf (geometry, "%dx%d+%d+%d", &width, &height,
 					&posx, &posy) == 4)
 		{
-			if (gtk_widget_get_realized (GTK_WIDGET (app)))
+			if (gtk_widget_get_realized (GTK_WIDGET (win)))
 			{
-				gtk_window_resize (GTK_WINDOW (app), width, height);
+				gtk_window_resize (GTK_WINDOW (win), width, height);
 			}
 			else
 			{
-				gtk_window_set_default_size (GTK_WINDOW (app), width, height);
-				gtk_window_move (GTK_WINDOW (app), posx, posy);
+				gtk_window_set_default_size (GTK_WINDOW (win), width, height);
+				gtk_window_move (GTK_WINDOW (win), posx, posy);
 			}
 			geometry_set = TRUE;
 		}
@@ -846,28 +847,28 @@ anjuta_app_set_geometry (AnjutaApp *app, const gchar *geometry)
 		height = gdk_screen_height () - 25;
 		width = (width < 790)? width : 790;
 		height = (height < 575)? width : 575;
-		if (gtk_widget_get_realized (GTK_WIDGET (app)) == FALSE)
+		if (gtk_widget_get_realized (GTK_WIDGET (win)) == FALSE)
 		{
-			gtk_window_set_default_size (GTK_WINDOW (app), width, height);
-			gtk_window_move (GTK_WINDOW (app), posx, posy);
+			gtk_window_set_default_size (GTK_WINDOW (win), width, height);
+			gtk_window_move (GTK_WINDOW (win), posx, posy);
 		}
 	}
 }
 
 static void
-anjuta_app_layout_save (AnjutaApp *app, const gchar *filename,
+anjuta_window_layout_save (AnjutaWindow *win, const gchar *filename,
 						const gchar *name)
 {
-	g_return_if_fail (ANJUTA_IS_APP (app));
+	g_return_if_fail (ANJUTA_IS_WINDOW (win));
 	g_return_if_fail (filename != NULL);
 
 	/* If maximized, the layout should be loaded from the back-up first */
-	if(app->maximized)
-		gdl_dock_layout_load_layout (app->layout_manager, "back-up");
+	if(win->maximized)
+		gdl_dock_layout_load_layout (win->layout_manager, "back-up");
 
 	/* Continue with the saving */
-	gdl_dock_layout_save_layout (app->layout_manager, name);
-	if (!gdl_dock_layout_save_to_file (app->layout_manager, filename))
+	gdl_dock_layout_save_layout (win->layout_manager, name);
+	if (!gdl_dock_layout_save_to_file (win->layout_manager, filename))
 		g_warning ("Saving dock layout to '%s' failed!", filename);
 
 	/* This is a good place to save the accels too */
@@ -875,13 +876,13 @@ anjuta_app_layout_save (AnjutaApp *app, const gchar *filename,
 }
 
 static void
-anjuta_app_layout_load (AnjutaApp *app, const gchar *layout_filename,
+anjuta_window_layout_load (AnjutaWindow *win, const gchar *layout_filename,
 						const gchar *name)
 {
-	g_return_if_fail (ANJUTA_IS_APP (app));
+	g_return_if_fail (ANJUTA_IS_WINDOW (win));
 
 	if (!layout_filename ||
-		!gdl_dock_layout_load_from_file (app->layout_manager, layout_filename))
+		!gdl_dock_layout_load_from_file (win->layout_manager, layout_filename))
 	{
 		gchar *datadir, *filename;
 		datadir = anjuta_res_get_data_dir();
@@ -889,23 +890,23 @@ anjuta_app_layout_load (AnjutaApp *app, const gchar *layout_filename,
 		filename = g_build_filename (datadir, "layout.xml", NULL);
 		DEBUG_PRINT ("Layout = %s", filename);
 		g_free (datadir);
-		if (!gdl_dock_layout_load_from_file (app->layout_manager, filename))
+		if (!gdl_dock_layout_load_from_file (win->layout_manager, filename))
 			g_warning ("Loading layout from '%s' failed!!", filename);
 		g_free (filename);
 	}
 
-	if (!gdl_dock_layout_load_layout (app->layout_manager, name))
+	if (!gdl_dock_layout_load_layout (win->layout_manager, name))
 		g_warning ("Loading layout failed!!");
 }
 
 void
-anjuta_app_layout_reset (AnjutaApp *app)
+anjuta_window_layout_reset (AnjutaWindow *win)
 {
-	anjuta_app_layout_load (app, NULL, NULL);
+	anjuta_window_layout_load (win, NULL, NULL);
 }
 
 void
-anjuta_app_install_preferences (AnjutaApp *app)
+anjuta_window_install_preferences (AnjutaWindow *win)
 {
 	GtkBuilder* builder = gtk_builder_new ();
 	GError* error = NULL;
@@ -920,12 +921,12 @@ anjuta_app_install_preferences (AnjutaApp *app)
 		g_error_free (error);
 		return;
 	}
-	anjuta_preferences_add_from_builder (app->preferences, builder, app->settings,
+	anjuta_preferences_add_from_builder (win->preferences, builder, win->settings,
 								 "General", _("General"), ICON_FILE);
 	notebook = 	GTK_WIDGET (gtk_builder_get_object (builder, "General"));
-	shortcuts = anjuta_ui_get_accel_editor (ANJUTA_UI (app->ui));
-	plugins = anjuta_plugin_manager_get_plugins_page (app->plugin_manager);
-	remember_plugins = anjuta_plugin_manager_get_remembered_plugins_page (app->plugin_manager);
+	shortcuts = anjuta_ui_get_accel_editor (ANJUTA_UI (win->ui));
+	plugins = anjuta_plugin_manager_get_plugins_page (win->plugin_manager);
+	remember_plugins = anjuta_plugin_manager_get_remembered_plugins_page (win->plugin_manager);
 
 	gtk_widget_show (shortcuts);
 	gtk_widget_show (plugins);
@@ -951,21 +952,21 @@ on_value_removed_from_hash (gpointer value)
 }
 
 static void
-anjuta_app_add_value (AnjutaShell *shell, const char *name,
+anjuta_window_add_value (AnjutaShell *shell, const char *name,
 					  const GValue *value, GError **error)
 {
 	GValue *copy;
-	AnjutaApp *app;
+	AnjutaWindow *win;
 
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (name != NULL);
 	g_return_if_fail (G_IS_VALUE(value));
 
-	app = ANJUTA_APP (shell);
+	win = ANJUTA_WINDOW (shell);
 
-	if (app->values == NULL)
+	if (win->values == NULL)
 	{
-		app->values = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
+		win->values = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
 											 on_value_removed_from_hash);
 	}
 	anjuta_shell_remove_value (shell, name, error);
@@ -974,26 +975,26 @@ anjuta_app_add_value (AnjutaShell *shell, const char *name,
 	g_value_init (copy, value->g_type);
 	g_value_copy (value, copy);
 
-	g_hash_table_insert (app->values, g_strdup (name), copy);
+	g_hash_table_insert (win->values, g_strdup (name), copy);
 	g_signal_emit_by_name (shell, "value_added", name, copy);
 }
 
 static void
-anjuta_app_get_value (AnjutaShell *shell, const char *name, GValue *value,
+anjuta_window_get_value (AnjutaShell *shell, const char *name, GValue *value,
 					  GError **error)
 {
 	GValue *val;
-	AnjutaApp *app;
+	AnjutaWindow *win;
 
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (name != NULL);
 	/* g_return_if_fail (G_IS_VALUE (value)); */
 
-	app = ANJUTA_APP (shell);
+	win = ANJUTA_WINDOW (shell);
 
 	val = NULL;
-	if (app->values)
-		val = g_hash_table_lookup (app->values, name);
+	if (win->values)
+		val = g_hash_table_lookup (win->values, name);
 	if (val)
 	{
 		if (!value->g_type)
@@ -1014,20 +1015,20 @@ anjuta_app_get_value (AnjutaShell *shell, const char *name, GValue *value,
 }
 
 static void
-anjuta_app_remove_value (AnjutaShell *shell, const char *name, GError **error)
+anjuta_window_remove_value (AnjutaShell *shell, const char *name, GError **error)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 	GValue *value;
 	char *key;
 
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (name != NULL);
 
-	app = ANJUTA_APP (shell);
+	win = ANJUTA_WINDOW (shell);
 
 	/*
-	g_return_if_fail (app->values != NULL);
-	if (app->widgets && g_hash_table_lookup_extended (app->widgets, name,
+	g_return_if_fail (win->values != NULL);
+	if (win->widgets && g_hash_table_lookup_extended (win->widgets, name,
 													  (gpointer*)&key,
 													  (gpointer*)&w)) {
 		GtkWidget *item;
@@ -1038,26 +1039,26 @@ anjuta_app_remove_value (AnjutaShell *shell, const char *name, GError **error)
 	}
 	*/
 
-	if (app->values && g_hash_table_lookup_extended (app->values, name,
+	if (win->values && g_hash_table_lookup_extended (win->values, name,
 													 (gpointer)&key,
 													 (gpointer)&value)) {
-		g_signal_emit_by_name (app, "value_removed", name);
-		g_hash_table_remove (app->values, name);
+		g_signal_emit_by_name (win, "value_removed", name);
+		g_hash_table_remove (win->values, name);
 	}
 }
 
 static void
-anjuta_app_saving_push (AnjutaShell* shell)
+anjuta_window_saving_push (AnjutaShell* shell)
 {
-	AnjutaApp* app = ANJUTA_APP (shell);
-	app->save_count++;
+	AnjutaWindow* win = ANJUTA_WINDOW (shell);
+	win->save_count++;
 }
 
 static void
-anjuta_app_saving_pop (AnjutaShell* shell)
+anjuta_window_saving_pop (AnjutaShell* shell)
 {
-	AnjutaApp* app = ANJUTA_APP (shell);
-	app->save_count--;
+	AnjutaWindow* win = ANJUTA_WINDOW (shell);
+	win->save_count--;
 }
 
 static gboolean
@@ -1069,15 +1070,15 @@ remove_from_widgets_hash (gpointer name, gpointer hash_widget, gpointer widget)
 }
 
 static void
-on_widget_destroy (GtkWidget *widget, AnjutaApp *app)
+on_widget_destroy (GtkWidget *widget, AnjutaWindow *win)
 {
 	DEBUG_PRINT ("%s", "Widget about to be destroyed");
-	g_hash_table_foreach_remove (app->widgets, remove_from_widgets_hash,
+	g_hash_table_foreach_remove (win->widgets, remove_from_widgets_hash,
 								 widget);
 }
 
 static void
-on_widget_remove (GtkWidget *container, GtkWidget *widget, AnjutaApp *app)
+on_widget_remove (GtkWidget *container, GtkWidget *widget, AnjutaWindow *win)
 {
 	GtkWidget *dock_item;
 
@@ -1087,10 +1088,10 @@ on_widget_remove (GtkWidget *container, GtkWidget *widget, AnjutaApp *app)
 		gchar* unique_name = g_object_get_data(G_OBJECT(dock_item), "unique_name");
 		g_free(unique_name);
 		g_signal_handlers_disconnect_by_func (G_OBJECT (dock_item),
-					G_CALLBACK (on_widget_remove), app);
+					G_CALLBACK (on_widget_remove), win);
 		gdl_dock_item_unbind (GDL_DOCK_ITEM(dock_item));
 	}
-	if (g_hash_table_foreach_remove (app->widgets,
+	if (g_hash_table_foreach_remove (win->widgets,
 									 remove_from_widgets_hash,
 									 widget)){
 		DEBUG_PRINT ("%s", "Widget removed from container");
@@ -1100,13 +1101,13 @@ on_widget_remove (GtkWidget *container, GtkWidget *widget, AnjutaApp *app)
 static void
 on_widget_removed_from_hash (gpointer widget)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 	GtkWidget *menuitem;
 	GdlDockItem *dockitem;
 
 	DEBUG_PRINT ("%s", "Removing widget from hash");
 
-	app = g_object_get_data (G_OBJECT (widget), "app-object");
+	win = g_object_get_data (G_OBJECT (widget), "app-object");
 	dockitem = g_object_get_data (G_OBJECT (widget), "dockitem");
 	menuitem = g_object_get_data (G_OBJECT (widget), "menuitem");
 
@@ -1116,15 +1117,15 @@ on_widget_removed_from_hash (gpointer widget)
 	g_object_set_data (G_OBJECT (widget), "menuitem", NULL);
 
 	g_signal_handlers_disconnect_by_func (G_OBJECT (widget),
-				G_CALLBACK (on_widget_destroy), app);
+				G_CALLBACK (on_widget_destroy), win);
 	g_signal_handlers_disconnect_by_func (G_OBJECT (dockitem),
-				G_CALLBACK (on_widget_remove), app);
+				G_CALLBACK (on_widget_remove), win);
 
 	g_object_unref (G_OBJECT (widget));
 }
 
 static void
-anjuta_app_setup_widget (AnjutaApp* app,
+anjuta_window_setup_widget (AnjutaWindow* win,
                          const gchar* name,
                          GtkWidget *widget,
                          GtkWidget* item,
@@ -1134,26 +1135,26 @@ anjuta_app_setup_widget (AnjutaApp* app,
 	GtkCheckMenuItem* menuitem;
 
 	/* Add the widget to hash */
-	if (app->widgets == NULL)
+	if (win->widgets == NULL)
 	{
-		app->widgets = g_hash_table_new_full (g_str_hash, g_str_equal,
+		win->widgets = g_hash_table_new_full (g_str_hash, g_str_equal,
 											  g_free,
 											  on_widget_removed_from_hash);
 	}
-	g_hash_table_insert (app->widgets, g_strdup (name), widget);
+	g_hash_table_insert (win->widgets, g_strdup (name), widget);
 	g_object_ref (widget);
 
 	/* Add toggle button for the widget */
 	menuitem = GTK_CHECK_MENU_ITEM (gtk_check_menu_item_new_with_label (title));
 	gtk_widget_show (GTK_WIDGET (menuitem));
 	gtk_check_menu_item_set_active (menuitem, TRUE);
-	gtk_menu_shell_append (GTK_MENU_SHELL (app->view_menu), GTK_WIDGET (menuitem));
+	gtk_menu_shell_append (GTK_MENU_SHELL (win->view_menu), GTK_WIDGET (menuitem));
 
 	if (locked)
 		g_object_set( G_OBJECT(menuitem), "visible", FALSE, NULL);
 
 
-	g_object_set_data (G_OBJECT (widget), "app-object", app);
+	g_object_set_data (G_OBJECT (widget), "app-object", win);
 	g_object_set_data (G_OBJECT (widget), "menuitem", menuitem);
 	g_object_set_data (G_OBJECT (widget), "dockitem", item);
 
@@ -1166,16 +1167,16 @@ anjuta_app_setup_widget (AnjutaApp* app,
 	  removed from widgets hash.
 	*/
 	g_signal_connect (G_OBJECT (item), "remove",
-					  G_CALLBACK (on_widget_remove), app);
+					  G_CALLBACK (on_widget_remove), win);
 	g_signal_connect_after (G_OBJECT (widget), "destroy",
-					  G_CALLBACK (on_widget_destroy), app);
+					  G_CALLBACK (on_widget_destroy), win);
 
 	gtk_widget_show_all (item);
 }
 
 
 static void
-anjuta_app_add_widget_full (AnjutaShell *shell,
+anjuta_window_add_widget_full (AnjutaShell *shell,
 					   GtkWidget *widget,
 					   const char *name,
 					   const char *title,
@@ -1184,15 +1185,15 @@ anjuta_app_add_widget_full (AnjutaShell *shell,
 					   gboolean locked,
 					   GError **error)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 	GtkWidget *item;
 
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (GTK_IS_WIDGET (widget));
 	g_return_if_fail (name != NULL);
 	g_return_if_fail (title != NULL);
 
-	app = ANJUTA_APP (shell);
+	win = ANJUTA_WINDOW (shell);
 
 	/* Add the widget to dock */
 	if (stock_id == NULL)
@@ -1211,17 +1212,17 @@ anjuta_app_add_widget_full (AnjutaShell *shell,
 	}
 
 	gtk_container_add (GTK_CONTAINER (item), widget);
-    gdl_dock_add_item (GDL_DOCK (app->dock),
+    gdl_dock_add_item (GDL_DOCK (win->dock),
                        GDL_DOCK_ITEM (item), placement);
 
 	if (locked)
-		gdl_dock_item_set_default_position(GDL_DOCK_ITEM(item), GDL_DOCK_OBJECT(app->dock));
+		gdl_dock_item_set_default_position(GDL_DOCK_ITEM(item), GDL_DOCK_OBJECT(win->dock));
 
-	anjuta_app_setup_widget (app, name, widget, item, title, locked);
+	anjuta_window_setup_widget (win, name, widget, item, title, locked);
 }
 
 static void
-anjuta_app_add_widget_custom (AnjutaShell *shell,
+anjuta_window_add_widget_custom (AnjutaShell *shell,
                               GtkWidget *widget,
                               const char *name,
                               const char *title,
@@ -1230,16 +1231,16 @@ anjuta_app_add_widget_custom (AnjutaShell *shell,
                               AnjutaShellPlacement placement,
                               GError **error)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 	GtkWidget *item;
 	GtkWidget *grip;
 
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (GTK_IS_WIDGET (widget));
 	g_return_if_fail (name != NULL);
 	g_return_if_fail (title != NULL);
 
-	app = ANJUTA_APP (shell);
+	win = ANJUTA_WINDOW (shell);
 
 	/* Add the widget to dock */
 	/* Add the widget to dock */
@@ -1250,29 +1251,29 @@ anjuta_app_add_widget_custom (AnjutaShell *shell,
 											 GDL_DOCK_ITEM_BEH_NORMAL);
 
 	gtk_container_add (GTK_CONTAINER (item), widget);
-    gdl_dock_add_item (GDL_DOCK (app->dock),
+    gdl_dock_add_item (GDL_DOCK (win->dock),
                        GDL_DOCK_ITEM (item), placement);
 
 	grip = gdl_dock_item_get_grip (GDL_DOCK_ITEM (item));
 
 	gdl_dock_item_grip_set_label (GDL_DOCK_ITEM_GRIP (grip), label);
 
-	anjuta_app_setup_widget (app, name, widget, item, title, FALSE);
+	anjuta_window_setup_widget (win, name, widget, item, title, FALSE);
 }
 
 static void
-anjuta_app_remove_widget (AnjutaShell *shell, GtkWidget *widget,
+anjuta_window_remove_widget (AnjutaShell *shell, GtkWidget *widget,
 						  GError **error)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 	GtkWidget *dock_item;
 
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (GTK_IS_WIDGET (widget));
 
-	app = ANJUTA_APP (shell);
+	win = ANJUTA_WINDOW (shell);
 
-	g_return_if_fail (app->widgets != NULL);
+	g_return_if_fail (win->widgets != NULL);
 
 	dock_item = g_object_get_data (G_OBJECT (widget), "dockitem");
 	g_return_if_fail (dock_item != NULL);
@@ -1285,19 +1286,19 @@ anjuta_app_remove_widget (AnjutaShell *shell, GtkWidget *widget,
 }
 
 static void
-anjuta_app_present_widget (AnjutaShell *shell, GtkWidget *widget,
+anjuta_window_present_widget (AnjutaShell *shell, GtkWidget *widget,
 						   GError **error)
 {
-	AnjutaApp *app;
+	AnjutaWindow *win;
 	GdlDockItem *dock_item;
 	GtkWidget *parent;
 
-	g_return_if_fail (ANJUTA_IS_APP (shell));
+	g_return_if_fail (ANJUTA_IS_WINDOW (shell));
 	g_return_if_fail (GTK_IS_WIDGET (widget));
 
-	app = ANJUTA_APP (shell);
+	win = ANJUTA_WINDOW (shell);
 
-	g_return_if_fail (app->widgets != NULL);
+	g_return_if_fail (win->widgets != NULL);
 
 	dock_item = g_object_get_data (G_OBJECT(widget), "dockitem");
 	g_return_if_fail (dock_item != NULL);
@@ -1322,75 +1323,75 @@ anjuta_app_present_widget (AnjutaShell *shell, GtkWidget *widget,
 }
 
 static GObject*
-anjuta_app_get_object  (AnjutaShell *shell, const char *iface_name,
+anjuta_window_get_object  (AnjutaShell *shell, const char *iface_name,
 					    GError **error)
 {
-	g_return_val_if_fail (ANJUTA_IS_APP (shell), NULL);
+	g_return_val_if_fail (ANJUTA_IS_WINDOW (shell), NULL);
 	g_return_val_if_fail (iface_name != NULL, NULL);
-	return anjuta_plugin_manager_get_plugin (ANJUTA_APP (shell)->plugin_manager,
+	return anjuta_plugin_manager_get_plugin (ANJUTA_WINDOW (shell)->plugin_manager,
 											 iface_name);
 }
 
 static AnjutaStatus*
-anjuta_app_get_status (AnjutaShell *shell, GError **error)
+anjuta_window_get_status (AnjutaShell *shell, GError **error)
 {
-	g_return_val_if_fail (ANJUTA_IS_APP (shell), NULL);
-	return ANJUTA_APP (shell)->status;
+	g_return_val_if_fail (ANJUTA_IS_WINDOW (shell), NULL);
+	return ANJUTA_WINDOW (shell)->status;
 }
 
 static AnjutaUI *
-anjuta_app_get_ui  (AnjutaShell *shell, GError **error)
+anjuta_window_get_ui  (AnjutaShell *shell, GError **error)
 {
-	g_return_val_if_fail (ANJUTA_IS_APP (shell), NULL);
-	return ANJUTA_APP (shell)->ui;
+	g_return_val_if_fail (ANJUTA_IS_WINDOW (shell), NULL);
+	return ANJUTA_WINDOW (shell)->ui;
 }
 
 static AnjutaPreferences *
-anjuta_app_get_preferences  (AnjutaShell *shell, GError **error)
+anjuta_window_get_preferences  (AnjutaShell *shell, GError **error)
 {
-	g_return_val_if_fail (ANJUTA_IS_APP (shell), NULL);
-	return ANJUTA_APP (shell)->preferences;
+	g_return_val_if_fail (ANJUTA_IS_WINDOW (shell), NULL);
+	return ANJUTA_WINDOW (shell)->preferences;
 }
 
 static AnjutaPluginManager *
-anjuta_app_get_plugin_manager  (AnjutaShell *shell, GError **error)
+anjuta_window_get_plugin_manager  (AnjutaShell *shell, GError **error)
 {
-	g_return_val_if_fail (ANJUTA_IS_APP (shell), NULL);
-	return ANJUTA_APP (shell)->plugin_manager;
+	g_return_val_if_fail (ANJUTA_IS_WINDOW (shell), NULL);
+	return ANJUTA_WINDOW (shell)->plugin_manager;
 }
 
 static AnjutaProfileManager *
-anjuta_app_get_profile_manager (AnjutaShell *shell, GError **error)
+anjuta_window_get_profile_manager (AnjutaShell *shell, GError **error)
 {
-	g_return_val_if_fail (ANJUTA_IS_APP (shell), NULL);
-	return ANJUTA_APP (shell)->profile_manager;
+	g_return_val_if_fail (ANJUTA_IS_WINDOW (shell), NULL);
+	return ANJUTA_WINDOW (shell)->profile_manager;
 }
 
 static void
 anjuta_shell_iface_init (AnjutaShellIface *iface)
 {
-	iface->add_widget_full = anjuta_app_add_widget_full;
-	iface->add_widget_custom = anjuta_app_add_widget_custom;
-	iface->remove_widget = anjuta_app_remove_widget;
-	iface->present_widget = anjuta_app_present_widget;
-	iface->iconify_dockable_widget = anjuta_app_iconify_dockable_widget;
-	iface->hide_dockable_widget = anjuta_app_hide_dockable_widget;
-	iface->show_dockable_widget = anjuta_app_show_dockable_widget;
-	iface->maximize_widget = anjuta_app_maximize_widget;
-	iface->unmaximize = anjuta_app_unmaximize;
-	iface->add_value = anjuta_app_add_value;
-	iface->get_value = anjuta_app_get_value;
-	iface->remove_value = anjuta_app_remove_value;
-	iface->get_object = anjuta_app_get_object;
-	iface->get_status = anjuta_app_get_status;
-	iface->get_ui = anjuta_app_get_ui;
-	iface->get_preferences = anjuta_app_get_preferences;
-	iface->get_plugin_manager = anjuta_app_get_plugin_manager;
-	iface->get_profile_manager = anjuta_app_get_profile_manager;
-	iface->saving_push = anjuta_app_saving_push;
-	iface->saving_pop = anjuta_app_saving_pop;
+	iface->add_widget_full = anjuta_window_add_widget_full;
+	iface->add_widget_custom = anjuta_window_add_widget_custom;
+	iface->remove_widget = anjuta_window_remove_widget;
+	iface->present_widget = anjuta_window_present_widget;
+	iface->iconify_dockable_widget = anjuta_window_iconify_dockable_widget;
+	iface->hide_dockable_widget = anjuta_window_hide_dockable_widget;
+	iface->show_dockable_widget = anjuta_window_show_dockable_widget;
+	iface->maximize_widget = anjuta_window_maximize_widget;
+	iface->unmaximize = anjuta_window_unmaximize;
+	iface->add_value = anjuta_window_add_value;
+	iface->get_value = anjuta_window_get_value;
+	iface->remove_value = anjuta_window_remove_value;
+	iface->get_object = anjuta_window_get_object;
+	iface->get_status = anjuta_window_get_status;
+	iface->get_ui = anjuta_window_get_ui;
+	iface->get_preferences = anjuta_window_get_preferences;
+	iface->get_plugin_manager = anjuta_window_get_plugin_manager;
+	iface->get_profile_manager = anjuta_window_get_profile_manager;
+	iface->saving_push = anjuta_window_saving_push;
+	iface->saving_pop = anjuta_window_saving_pop;
 }
 
-ANJUTA_TYPE_BEGIN(AnjutaApp, anjuta_app, GTK_TYPE_WINDOW);
+ANJUTA_TYPE_BEGIN(AnjutaWindow, anjuta_window, GTK_TYPE_WINDOW);
 ANJUTA_TYPE_ADD_INTERFACE(anjuta_shell, ANJUTA_TYPE_SHELL);
 ANJUTA_TYPE_END;
diff --git a/src/anjuta-app.h b/src/anjuta-window.h
similarity index 61%
rename from src/anjuta-app.h
rename to src/anjuta-window.h
index d4f875d..4438bfe 100644
--- a/src/anjuta-app.h
+++ b/src/anjuta-window.h
@@ -1,6 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
- * anjuta-app.h
+ * anjuta-window.h
  * Copyright (C) 2003 Naba Kumar  <naba gnome org>
  * 
  * This program is free software; you can redistribute it and/or modify it
@@ -18,8 +18,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA 
  */
 
-#ifndef _ANJUTA_APP_H_
-#define _ANJUTA_APP_H_
+#ifndef _ANJUTA_WINDOW_H_
+#define _ANJUTA_WINDOW_H_
 
 #include <gmodule.h>
 #include <gdl/gdl-dock-layout.h>
@@ -31,16 +31,16 @@
 
 G_BEGIN_DECLS
 
-#define ANJUTA_TYPE_APP        (anjuta_app_get_type ())
-#define ANJUTA_APP(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_APP, AnjutaApp))
-#define ANJUTA_APP_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_APP, AnjutaAppClass))
-#define ANJUTA_IS_APP(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_APP))
-#define ANJUTA_IS_APP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_APP))
+#define ANJUTA_TYPE_WINDOW        (anjuta_window_get_type ())
+#define ANJUTA_WINDOW(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_WINDOW, AnjutaWindow))
+#define ANJUTA_WINDOW_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_WINDOW, AnjutaWindowClass))
+#define ANJUTA_IS_WINDOW(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_WINDOW))
+#define ANJUTA_IS_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_WINDOW))
 
-typedef struct _AnjutaApp AnjutaApp;
-typedef struct _AnjutaAppClass AnjutaAppClass;
+typedef struct _AnjutaWindow AnjutaWindow;
+typedef struct _AnjutaWindowClass AnjutaWindowClass;
 
-struct _AnjutaApp
+struct _AnjutaWindow
 {
 	GtkWindow parent;
 	GtkWidget *toolbar;
@@ -64,18 +64,18 @@ struct _AnjutaApp
 	gint save_count;
 };
 
-struct _AnjutaAppClass
+struct _AnjutaWindowClass
 {
 	GtkWindowClass klass;
 };
 
-GType      anjuta_app_get_type (void);
-GtkWidget* anjuta_app_new (void);
+GType      anjuta_window_get_type (void);
+GtkWidget* anjuta_window_new (void);
 
-void       anjuta_app_set_geometry (AnjutaApp *app, const gchar *geometry);
-gchar*     anjuta_app_get_geometry (AnjutaApp *app);
-void       anjuta_app_layout_reset (AnjutaApp *app);
-void	   anjuta_app_install_preferences (AnjutaApp *app);
+void       anjuta_window_set_geometry (AnjutaWindow *win, const gchar *geometry);
+gchar*     anjuta_window_get_geometry (AnjutaWindow *win);
+void       anjuta_window_layout_reset (AnjutaWindow *win);
+void	   anjuta_window_install_preferences (AnjutaWindow *win);
 
 G_END_DECLS
 
diff --git a/src/anjuta.c b/src/anjuta.c
index 6700e4c..130a6d8 100644
--- a/src/anjuta.c
+++ b/src/anjuta.c
@@ -43,7 +43,7 @@
 static gchar *system_restore_session = NULL;
 
 static gboolean
-on_anjuta_delete_event (AnjutaApp *app, GdkEvent *event, gpointer data)
+on_anjuta_delete_event (AnjutaWindow *win, GdkEvent *event, gpointer data)
 {
 	AnjutaPluginManager *plugin_manager;
 	AnjutaProfileManager *profile_manager;
@@ -51,22 +51,22 @@ on_anjuta_delete_event (AnjutaApp *app, GdkEvent *event, gpointer data)
 	AnjutaSavePrompt *save_prompt;
 	gchar *remembered_plugins;
 
-	DEBUG_PRINT ("%s", "AnjutaApp delete event");
+	DEBUG_PRINT ("%s", "AnjutaWindow delete event");
 
-	plugin_manager = anjuta_shell_get_plugin_manager (ANJUTA_SHELL (app), NULL);
-	profile_manager = anjuta_shell_get_profile_manager (ANJUTA_SHELL (app), NULL);
+	plugin_manager = anjuta_shell_get_plugin_manager (ANJUTA_SHELL (win), NULL);
+	profile_manager = anjuta_shell_get_profile_manager (ANJUTA_SHELL (win), NULL);
 
 	/* Save remembered plugins */
 	remembered_plugins =
 		anjuta_plugin_manager_get_remembered_plugins (plugin_manager);
-	g_settings_set_string (app->settings,
+	g_settings_set_string (win->settings,
 	                       ANJUTA_REMEMBERED_PLUGINS,
 	                       remembered_plugins);
 	g_free (remembered_plugins);
 
 	/* Check for unsaved data */
-	save_prompt = anjuta_save_prompt_new (GTK_WINDOW (app));
-	anjuta_shell_save_prompt (ANJUTA_SHELL (app), save_prompt, NULL);
+	save_prompt = anjuta_save_prompt_new (GTK_WINDOW (win));
+	anjuta_shell_save_prompt (ANJUTA_SHELL (win), save_prompt, NULL);
 
 	if (anjuta_save_prompt_get_items_count (save_prompt) > 0)
 	{
@@ -84,10 +84,10 @@ on_anjuta_delete_event (AnjutaApp *app, GdkEvent *event, gpointer data)
 		}
 	}
 	/* Wait for files to be really saved (asyncronous operation) */
-	if (app->save_count > 0)
+	if (win->save_count > 0)
 	{
-		g_message ("Waiting for %d file(s) to be saved!", app->save_count);
-		while (app->save_count > 0)
+		g_message ("Waiting for %d file(s) to be saved!", win->save_count);
+		while (win->save_count > 0)
 		{
 			g_main_context_iteration (NULL, TRUE);
 		}
@@ -101,20 +101,20 @@ on_anjuta_delete_event (AnjutaApp *app, GdkEvent *event, gpointer data)
 	{
 		gchar *session_dir;
 		session_dir = USER_SESSION_PATH_NEW;
-		anjuta_shell_session_save (ANJUTA_SHELL (app), session_dir, NULL);
+		anjuta_shell_session_save (ANJUTA_SHELL (win), session_dir, NULL);
 		g_free (session_dir);
 	}
 
-	anjuta_shell_notify_exit (ANJUTA_SHELL (app), NULL);
+	anjuta_shell_notify_exit (ANJUTA_SHELL (win), NULL);
 
 	gtk_widget_destroy (GTK_WIDGET (save_prompt));
 
 	/* Shutdown */
-	if (g_object_get_data (G_OBJECT (app), "__proper_shutdown"))
+	if (g_object_get_data (G_OBJECT (win), "__proper_shutdown"))
 	{
-		gtk_widget_hide (GTK_WIDGET (app));
+		gtk_widget_hide (GTK_WIDGET (win));
 		anjuta_plugin_manager_unload_all_plugins
-			(anjuta_shell_get_plugin_manager (ANJUTA_SHELL (app), NULL));
+			(anjuta_shell_get_plugin_manager (ANJUTA_SHELL (win), NULL));
 	}
 	return FALSE;
 }
@@ -122,14 +122,14 @@ on_anjuta_delete_event (AnjutaApp *app, GdkEvent *event, gpointer data)
 static void
 on_anjuta_destroy (GtkWidget * w, gpointer data)
 {
-	DEBUG_PRINT ("%s", "AnjutaApp destroy event");
+	DEBUG_PRINT ("%s", "AnjutaWindow destroy event");
 
 	gtk_widget_hide (w);
 }
 
 static void
 on_profile_scoped (AnjutaProfileManager *profile_manager,
-				   AnjutaProfile *profile, AnjutaApp *app)
+				   AnjutaProfile *profile, AnjutaWindow *win)
 {
 	gchar *session_dir;
 	static gboolean first_time = TRUE;
@@ -167,13 +167,13 @@ on_profile_scoped (AnjutaProfileManager *profile_manager,
 	}
 
 	/* Restore session */
-	anjuta_shell_session_load (ANJUTA_SHELL (app), session_dir, NULL);
+	anjuta_shell_session_load (ANJUTA_SHELL (win), session_dir, NULL);
 	g_free (session_dir);
 }
 
 static void
 on_profile_descoped (AnjutaProfileManager *profile_manager,
-					 AnjutaProfile *profile, AnjutaApp *app)
+					 AnjutaProfile *profile, AnjutaWindow *win)
 {
 	gchar *session_dir;
 
@@ -187,7 +187,7 @@ on_profile_descoped (AnjutaProfileManager *profile_manager,
 	session_dir = USER_SESSION_PATH_NEW;
 
 	/* Save current session */
-	anjuta_shell_session_save (ANJUTA_SHELL (app), session_dir, NULL);
+	anjuta_shell_session_save (ANJUTA_SHELL (win), session_dir, NULL);
 	g_free (session_dir);
 }
 
@@ -226,14 +226,14 @@ extract_project_from_session (const gchar* session_dir)
 	return project;
 }
 
-AnjutaApp*
+AnjutaWindow*
 create_window (GFile **files, int n_files, gboolean no_splash,
 			gboolean no_session, gboolean no_files,
 			gboolean proper_shutdown, const gchar *geometry)
 {
 	AnjutaPluginManager *plugin_manager;
 	AnjutaProfileManager *profile_manager;
-	AnjutaApp *app;
+	AnjutaWindow *win;
 	AnjutaStatus *status;
 	AnjutaProfile *profile;
 	GFile *session_profile;
@@ -245,13 +245,13 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 	GError *error = NULL;
 
 	/* Initialize application */
-	app = ANJUTA_APP (anjuta_app_new ());
-	status = anjuta_shell_get_status (ANJUTA_SHELL (app), NULL);
+	win = ANJUTA_WINDOW (anjuta_window_new ());
+	status = anjuta_shell_get_status (ANJUTA_SHELL (win), NULL);
 	anjuta_status_progress_add_ticks (status, 1);
 
 	im_file = anjuta_res_get_pixmap_file (ANJUTA_PIXMAP_SPLASH_SCREEN);
 
-	gtk_window_set_role (GTK_WINDOW (app), "anjuta-app");
+	gtk_window_set_role (GTK_WINDOW (win), "anjuta-app");
 	gtk_window_set_auto_startup_notification(TRUE);
 	gtk_window_set_default_icon_name ("anjuta");
 	gtk_window_set_auto_startup_notification(FALSE);
@@ -266,22 +266,22 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 
 	if (proper_shutdown)
 	{
-		g_object_set_data (G_OBJECT (app), "__proper_shutdown", "1");
+		g_object_set_data (G_OBJECT (win), "__proper_shutdown", "1");
 	}
-	g_signal_connect (G_OBJECT (app), "delete_event",
+	g_signal_connect (G_OBJECT (win), "delete_event",
 					  G_CALLBACK (on_anjuta_delete_event), NULL);
-	g_signal_connect (G_OBJECT (app), "destroy",
+	g_signal_connect (G_OBJECT (win), "destroy",
 					  G_CALLBACK (on_anjuta_destroy), NULL);
 
 	/* Setup application framework */
-	plugin_manager  = anjuta_shell_get_plugin_manager (ANJUTA_SHELL (app),
+	plugin_manager  = anjuta_shell_get_plugin_manager (ANJUTA_SHELL (win),
 													   NULL);
-	profile_manager = anjuta_shell_get_profile_manager (ANJUTA_SHELL (app),
+	profile_manager = anjuta_shell_get_profile_manager (ANJUTA_SHELL (win),
 														NULL);
 
 	/* Restore remembered plugins */
 	remembered_plugins =
-		g_settings_get_string (app->settings, ANJUTA_REMEMBERED_PLUGINS);
+		g_settings_get_string (win->settings, ANJUTA_REMEMBERED_PLUGINS);
 	if (remembered_plugins)
 		anjuta_plugin_manager_set_remembered_plugins (plugin_manager,
 													  remembered_plugins);
@@ -294,7 +294,7 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 										 TRUE, &error);
 	if (error)
 	{
-		anjuta_util_dialog_error (GTK_WINDOW (app), "%s", error->message);
+		anjuta_util_dialog_error (GTK_WINDOW (win), "%s", error->message);
 		g_error_free (error);
 		error = NULL;
 	}
@@ -309,7 +309,7 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 											 FALSE, &error);
 		if (error)
 		{
-			anjuta_util_dialog_error (GTK_WINDOW (app), "%s", error->message);
+			anjuta_util_dialog_error (GTK_WINDOW (win), "%s", error->message);
 			g_error_free (error);
 			error = NULL;
 		}
@@ -323,7 +323,7 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 	anjuta_profile_manager_push (profile_manager, profile, &error);
 	if (error)
 	{
-		anjuta_util_dialog_error (GTK_WINDOW (app), "%s", error->message);
+		anjuta_util_dialog_error (GTK_WINDOW (win), "%s", error->message);
 		g_error_free (error);
 		error = NULL;
 	}
@@ -390,7 +390,7 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 
 		/* If preferences is set to not load last session, clear it */
 		if (no_session ||
-			g_settings_get_boolean (app->settings,
+			g_settings_get_boolean (win->settings,
 			                        ANJUTA_SESSION_SKIP_LAST))
 		{
 			/* Reset default session */
@@ -400,7 +400,7 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 		}
 		/* If preferences is set to not load last project, clear it */
 		else if (no_files ||
-				g_settings_get_boolean (app->settings,
+				g_settings_get_boolean (win->settings,
 				                        ANJUTA_SESSION_SKIP_LAST_FILES))
 		{
 			session = anjuta_session_new (session_dir);
@@ -419,12 +419,12 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 
 	/* Prepare for session save and load on profile change */
 	g_signal_connect (profile_manager, "profile-scoped",
-					  G_CALLBACK (on_profile_scoped), app);
+					  G_CALLBACK (on_profile_scoped), win);
 	/* Load project file */
 	if ((project != NULL) && (template == NULL))
 	{
 		IAnjutaFileLoader *loader;
-		loader = anjuta_shell_get_interface (ANJUTA_SHELL (app),
+		loader = anjuta_shell_get_interface (ANJUTA_SHELL (win),
 											 IAnjutaFileLoader, NULL);
 		ianjuta_file_loader_load (loader, project, FALSE, NULL);
 		g_object_unref (project);
@@ -433,12 +433,12 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 
 	if (error)
 	{
-		anjuta_util_dialog_error (GTK_WINDOW (app), "%s", error->message);
+		anjuta_util_dialog_error (GTK_WINDOW (win), "%s", error->message);
 		g_error_free (error);
 		error = NULL;
 	}
 	g_signal_connect (profile_manager, "profile-descoped",
-					  G_CALLBACK (on_profile_descoped), app);
+					  G_CALLBACK (on_profile_descoped), win);
 
 	anjuta_status_progress_tick (status, NULL, _("Loaded Sessionâ"));
 	anjuta_status_disable_splash (status, TRUE);
@@ -447,13 +447,13 @@ create_window (GFile **files, int n_files, gboolean no_splash,
 	if (template != NULL)
 	{
 		IAnjutaFileLoader *loader;
-		loader = anjuta_shell_get_interface (ANJUTA_SHELL (app),
+		loader = anjuta_shell_get_interface (ANJUTA_SHELL (win),
 											 IAnjutaFileLoader, NULL);
 		ianjuta_file_loader_load (loader, template, FALSE, NULL);
 		g_object_unref (template);
 	}
 
-	return app;
+	return win;
 }
 
 /* Application */
@@ -474,9 +474,9 @@ anjuta_open (GApplication *application,
 {
 	int i;
 	GList* windows = gtk_application_get_windows (GTK_APPLICATION (application));
-	AnjutaApp *app = ANJUTA_APP (windows->data);
+	AnjutaWindow *win = ANJUTA_WINDOW (windows->data);
 	IAnjutaFileLoader* loader =
-		anjuta_shell_get_interface(ANJUTA_SHELL(app), IAnjutaFileLoader, NULL);
+		anjuta_shell_get_interface(ANJUTA_SHELL(win), IAnjutaFileLoader, NULL);
 
 	if (!loader)
 		return;
@@ -489,11 +489,11 @@ anjuta_open (GApplication *application,
 			continue;
 		if (anjuta_util_is_project_file (file))
 		{
-			AnjutaApp* new_app = create_window (files, n_files,
+			AnjutaWindow* new_win = create_window (files, n_files,
 			                                    TRUE, TRUE, FALSE, FALSE, NULL);
 			gtk_application_add_window (GTK_APPLICATION (application),
-			                            GTK_WINDOW (new_app));
-			gtk_widget_show (GTK_WIDGET (new_app));
+			                            GTK_WINDOW (new_win));
+			gtk_widget_show (GTK_WIDGET (new_win));
 			g_free (file);
 			return;
 		}
diff --git a/src/anjuta.h b/src/anjuta.h
index 28a921a..7bcbc23 100644
--- a/src/anjuta.h
+++ b/src/anjuta.h
@@ -22,7 +22,7 @@
 #define _ANJUTA_H_
 
 #include <libanjuta/e-splash.h>
-#include "anjuta-app.h"
+#include "anjuta-window.h"
 
 #define ANJUTA_TYPE_ANJUTA     (anjuta_get_type ())
 #define ANJUTA(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_ANJUTA, Anjuta))
@@ -46,7 +46,7 @@ struct _Anjuta
 GType anjuta_get_type (void);
 Anjuta *anjuta_new (void);
 
-AnjutaApp*
+AnjutaWindow*
 create_window (GFile **files, int n_files, gboolean no_splash,
 			gboolean no_session, gboolean no_files,
 			gboolean proper_shutdown, const gchar *geometry);
diff --git a/src/main.c b/src/main.c
index f7f0899..064a958 100644
--- a/src/main.c
+++ b/src/main.c
@@ -199,11 +199,11 @@ main (int argc, char *argv[])
 	}
 	else
 	{
-		AnjutaApp *app = create_window (files, n_files,
+		AnjutaWindow *win = create_window (files, n_files,
 										no_splash, no_session, no_files,
 										proper_shutdown, anjuta_geometry);
-		gtk_window_set_application (GTK_WINDOW (app), GTK_APPLICATION (anjuta));
-		gtk_widget_show (GTK_WIDGET (app));
+		gtk_window_set_application (GTK_WINDOW (win), GTK_APPLICATION (anjuta));
+		gtk_widget_show (GTK_WIDGET (win));
 		
 		free_files (files, n_files);
 	}



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