Index: anjuta-app.c
===================================================================
--- anjuta-app.c	(revision 3551)
+++ anjuta-app.c	(working copy)
@@ -27,9 +27,9 @@
 #include <ctype.h>
 #include <sys/wait.h>
 
-#include <gnome.h>
+#include <glade/glade-xml.h>
 #include <gtk/gtkwidget.h>
-#include <glade/glade.h>
+#include <gtk/gtkwindow.h>
 
 #include <gdl/gdl-dock.h>
 #include <gdl/gdl-dock-bar.h>
@@ -52,11 +52,6 @@
 #define GLADE_FILE PACKAGE_DATA_DIR"/glade/anjuta.glade"
 #define ICON_FILE "anjuta-preferences-general-48.png"
 
-#define DOCK_PH_LEFT    "ph_left"
-#define DOCK_PH_RIGHT   "ph_right"
-#define DOCK_PH_TOP     "ph_top"
-#define DOCK_PH_BOTTOM  "ph_bottom"
-
 static void anjuta_app_layout_load (AnjutaApp *app,
 									const gchar *layout_filename,
 									const gchar *name);
@@ -68,7 +63,8 @@
 static GList* toolbars = NULL;
 
 static void
-on_gdl_style_changed (GConfClient* client, guint id, GConfEntry* entry,
+on_gdl_style_changed (GConfClient* client,
+					  guint id, GConfEntry* entry,
 					  gpointer user_data)
 {
 	AnjutaApp* app = ANJUTA_APP (user_data);
@@ -94,11 +90,12 @@
 		g_free (pr_style);
 	}
 	g_object_set (G_OBJECT(app->layout_manager->master), "switcher-style",
-					  style, NULL);
+				  style, NULL);
 }
 
 static void
-on_toggle_widget_view (GtkCheckMenuItem *menuitem, GtkWidget *dockitem)
+on_toggle_widget_view (GtkCheckMenuItem *menuitem,
+					   GtkWidget *dockitem)
 {
 	gboolean state;
 	state = gtk_check_menu_item_get_active (menuitem);
@@ -109,7 +106,9 @@
 }
 
 static void
-on_update_widget_view_menuitem (gpointer key, gpointer wid, gpointer data)
+on_update_widget_view_menuitem (gpointer key,
+								gpointer wid,
+								gpointer data)
 {
 	GtkCheckMenuItem *menuitem;
 	GdlDockItem *dockitem;
@@ -132,7 +131,9 @@
 }
 
 static void 
-on_layout_dirty_notify (GObject *object, GParamSpec *pspec, gpointer user_data)
+on_layout_dirty_notify (GObject *object,
+						GParamSpec *pspec,
+						gpointer user_data)
 {
 	if (!strcmp (pspec->name, "dirty")) {
 		gboolean dirty;
@@ -165,7 +166,8 @@
 }
 
 static void
-on_toolbar_view_toggled (GtkCheckMenuItem *menuitem, GtkWidget *widget)
+on_toolbar_view_toggled (GtkCheckMenuItem *menuitem,
+						 GtkWidget *widget)
 {
 	AnjutaApp *app;
 	BonoboDockItem *dock_item;
@@ -194,11 +196,11 @@
 			 * a previously used name (even if the previous widget has
 			 * has be destroyed. Hence a unique_name is used by using a 
 			 * static counter */
-			DEBUG_PRINT ("Adding dock item %s band %d, offset %d, position %d", unique_name,
-						 band, offset, position);
+			DEBUG_PRINT ("Adding dock item %s band %d, offset %d, position %d",
+						 unique_name, band, offset, position);
 			
 			/* Widget not yet added to the dock. Add it */
-			gnome_app_add_docked (GNOME_APP (app), widget,
+			/*gnome_app_add_docked (GNOME_APP (app), widget,
 								  unique_name,
 								  BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL |
 								  BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING,
@@ -206,12 +208,13 @@
 									   									   
 			dock_item = gnome_app_get_dock_item_by_name (GNOME_APP (app),
 														 unique_name);
-			g_object_set_data_full (G_OBJECT(dock_item), "unique_name", unique_name, g_free);
+			g_object_set_data_full (G_OBJECT(dock_item), "unique_name",
+									unique_name, g_free);
 			g_object_set_data (G_OBJECT(widget), "dock_item", dock_item);
-			count++;
+			count++;*/
 		}
-		gtk_widget_show (GTK_WIDGET (dock_item));
-		gtk_widget_show (GTK_BIN (dock_item)->child);
+		/*gtk_widget_show (GTK_WIDGET (dock_item));
+		gtk_widget_show (GTK_BIN (dock_item)->child);*/
 	}
 	else if (dock_item)
 	{
@@ -221,7 +224,8 @@
 }
 
 static void
-on_merge_widget_destroy (GtkWidget *merge_widget, GtkWidget *menuitem)
+on_merge_widget_destroy (GtkWidget *merge_widget,
+						 GtkWidget *menuitem)
 {
 	toolbars = g_list_remove (toolbars, merge_widget);
 	DEBUG_PRINT ("Destroying menuitem for toolbar widget");
@@ -229,15 +233,16 @@
 }
 
 static void
-on_add_merge_widget (GtkUIManager *merge, GtkWidget *widget,
+on_add_merge_widget (GtkUIManager *merge,
+					 GtkWidget *widget,
 					 GtkWidget *ui_container)
 {
 	DEBUG_PRINT ("Adding UI item ...");
 	
 	if (GTK_IS_MENU_BAR (widget))
 	{
-		gnome_app_set_menus (GNOME_APP (ui_container), GTK_MENU_BAR (widget));
-		gtk_widget_show (widget);
+		//We don't need to manage GtkMenuBar widgets
+		return;
 	}
 	else
 	{
@@ -342,7 +347,6 @@
 			gchar* band_key = g_strconcat (toolbarname, ".band", NULL);
 			gchar* position_key = g_strconcat (toolbarname, ".position", NULL);
 			gchar* offset_key = g_strconcat (toolbarname, ".offset", NULL);
-			GnomeApp* gnome_app = GNOME_APP(app);
 			
 			/* Save visibility */
 			g_object_get(G_OBJECT(dock_item), "visible", &visible, NULL);
@@ -350,15 +354,16 @@
 			g_free(key);
 			
 			/* Save toolbar position */
-			if (gnome_app->dock != NULL)
+			if (app->dock != NULL)
 			{
 				guint band;
 				guint position;
 				guint offset;
 				BonoboDockPlacement placement;
-				gchar* unique_name = g_object_get_data(G_OBJECT(dock_item), "unique_name");
+				gchar* unique_name = g_object_get_data(G_OBJECT(dock_item),
+													   "unique_name");
 				
-				BonoboDockItem* item = bonobo_dock_get_item_by_name(BONOBO_DOCK(gnome_app->dock), 
+				BonoboDockItem* item = bonobo_dock_get_item_by_name(BONOBO_DOCK(app->dock), 
 																  unique_name, &placement, 
 																   &band, &position, &offset);
 				g_return_if_fail(item != NULL);
@@ -439,10 +444,12 @@
 }
 
 static void
-on_accel_changed (GtkAccelGroup *accelgroup, guint arg1, GdkModifierType arg2,
+on_accel_changed (GtkAccelGroup *accelgroup, guint arg1,
+				  GdkModifierType arg2,
 				  GClosure *arg3, AnjutaApp *app)
 {
-	gnome_accelerators_sync ();
+	//FIXME
+	//gnome_accelerators_sync ();
 }
 
 static void
@@ -511,7 +518,8 @@
 		g_object_unref (G_OBJECT (app->status));
 		app->status = NULL;
 	}
-	GNOME_CALL_PARENT(G_OBJECT_CLASS, dispose, (widget));
+
+	G_OBJECT_CLASS (parent_class)->dispose (widget);
 }
 
 static void
@@ -526,15 +534,16 @@
 	gtk_widget_destroy (GTK_WIDGET (app->ui));
 	gtk_widget_destroy (GTK_WIDGET (app->preferences));
 	
-	GNOME_CALL_PARENT(G_OBJECT_CLASS, finalize, (widget));
+	G_OBJECT_CLASS (parent_class)->finalize (widget);
 }
 
 static void
 anjuta_app_instance_init (AnjutaApp *app)
 {
 	gint merge_id;
-	GtkWidget *toolbar_menu, *about_menu;
+	GtkWidget *menubar, *toolbar_menu, *about_menu;
 	GtkWidget *view_menu, *hbox;
+	GtkWidget *main_box;
 	GtkWidget *dockbar;
 	GtkAccelGroup *accel_group;
 	GtkAction* action;
@@ -549,17 +558,30 @@
 								   &size_hints, GDK_HINT_RESIZE_INC);
 	gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
 	
-	gnome_app_enable_layout_config (GNOME_APP (app), FALSE);
-	
+	/*
+	 * Main box
+	 */
+	main_box = gtk_vbox_new (FALSE, 0);
+	gtk_container_add (GTK_CONTAINER (app), main_box);
+	gtk_widget_show (main_box);
+		
 	app->layout_manager = NULL;
 	
 	app->values = NULL;
 	app->widgets = NULL;
-
+	
+	/* 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));
+	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);
+	
 	/* configure dock */
 	hbox = gtk_hbox_new (FALSE, 0);
 	gtk_widget_show (hbox);
-	gnome_app_set_contents (GNOME_APP (app), hbox);
 	app->dock = gdl_dock_new ();
 	gtk_widget_show (app->dock);
 	gtk_box_pack_end(GTK_BOX (hbox), app->dock, TRUE, TRUE, 0);
@@ -567,19 +589,14 @@
 	dockbar = gdl_dock_bar_new (GDL_DOCK(app->dock));
 	gtk_widget_show (dockbar);
 	gtk_box_pack_start(GTK_BOX (hbox), dockbar, FALSE, FALSE, 0);
+	gtk_box_pack_end (GTK_BOX (main_box),
+						hbox, TRUE, TRUE, 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);
-	/* 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));
-	gnome_app_set_statusbar (GNOME_APP (app), GTK_WIDGET (app->status));
-	g_object_ref (G_OBJECT (app->status));
-	g_object_add_weak_pointer (G_OBJECT (app->status), (gpointer)&app->status);
 	
 	/* UI engine */
 	app->ui = anjuta_ui_new ();
@@ -637,13 +654,15 @@
 
 	/* Merge UI */
 	merge_id = anjuta_ui_merge (app->ui, UI_FILE);
-
-	/* Disable unavailible tutorials */
-	action = anjuta_ui_get_action(app->ui, "ActionGroupHelp", "ActionHelpTutorial");
-	g_object_set(G_OBJECT(action), "visible", FALSE, NULL);
-	action = anjuta_ui_get_action(app->ui, "ActionGroupHelp", "ActionHelpAdvancedTutorial");
-	g_object_set(G_OBJECT(action), "visible", FALSE, NULL);
-
+	
+	/* create main menu */
+	menubar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (app->ui),
+						   "/MenuMain");
+	gtk_box_pack_start (GTK_BOX (main_box),
+			    menubar,
+			    FALSE, FALSE, 0);
+	gtk_widget_show (menubar);
+	
 	/* create toolbar menus */
 	toolbar_menu =
 		gtk_ui_manager_get_widget (GTK_UI_MANAGER(app->ui),
@@ -658,7 +677,13 @@
 	view_menu = 
 		gtk_ui_manager_get_widget (GTK_UI_MANAGER(app->ui),
 								  "/MenuMain/MenuView");
-	app->view_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (view_menu));
+	app->view_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (view_menu));	
+
+	/* Disable unavailible tutorials */
+	action = anjuta_ui_get_action(app->ui, "ActionGroupHelp", "ActionHelpTutorial");
+	g_object_set(G_OBJECT(action), "visible", FALSE, NULL);
+	action = anjuta_ui_get_action(app->ui, "ActionGroupHelp", "ActionHelpAdvancedTutorial");
+	g_object_set(G_OBJECT(action), "visible", FALSE, NULL);
 	
 	/* Create about plugins menu */
 	about_menu = 
@@ -1224,6 +1249,6 @@
 	iface->get_profile_manager = anjuta_app_get_profile_manager;
 }
 
-ANJUTA_TYPE_BEGIN(AnjutaApp, anjuta_app, GNOME_TYPE_APP);
+ANJUTA_TYPE_BEGIN(AnjutaApp, anjuta_app, GTK_TYPE_WINDOW);
 ANJUTA_TYPE_ADD_INTERFACE(anjuta_shell, ANJUTA_TYPE_SHELL);
 ANJUTA_TYPE_END;
Index: anjuta-app.h
===================================================================
--- anjuta-app.h	(revision 3551)
+++ anjuta-app.h	(working copy)
@@ -22,7 +22,6 @@
 #define _ANJUTA_APP_H_
 
 #include <gmodule.h>
-#include <glade/glade.h>
 #include <gdl/gdl-dock-layout.h>
 #include <libanjuta/anjuta-status.h>
 #include <libanjuta/anjuta-ui.h>
@@ -43,7 +42,7 @@
 
 struct _AnjutaApp
 {
-	GnomeApp parent;
+	GtkWindow parent;
 	GtkWidget *toolbars_menu;
 	GtkWidget *view_menu;
 	GtkWidget *dock;
@@ -63,7 +62,7 @@
 
 struct _AnjutaAppClass
 {
-	GnomeAppClass klass;
+	GtkWindowClass klass;
 };
 
 GType      anjuta_app_get_type (void);
