Patch to anjuta2
- From: Gustavo Giráldez <gustavo giraldez gmx net>
- To: JP Rosevear <jpr ximian com>
- Cc: Gnome Devtools list <gnome-devtools gnome org>
- Subject: Patch to anjuta2
- Date: 18 Jan 2003 18:48:39 -0300
Hi JP,
I committed the attached patch to anjuta2 to adapt it to the last
changes I made to GdlDock.
Thanks,
Gustavo
? stamp-h1
? plugins/browser/Makefile.in
? plugins/browser/GtkSCB/Makefile.in
? plugins/calculator/Makefile.in
? plugins/files/Makefile.in
? plugins/functions/Makefile.in
? plugins/prjfiles/Makefile.in
? plugins/project-manager/GNOME_Development_Plugin_project-manager.server.in
? plugins/project-manager/anjuta2.project-manager.patch
? plugins/remove/Makefile.in
? plugins/sample/GNOME_Development_Plugin_sample.server.in
? plugins/selection/Makefile.in
? plugins/shell-output/GNOME_Development_Plugin_shelloutput.server.in
? plugins/symbol-browser/GNOME_Development_Plugin_symbol-browser.server.in
? plugins/terminal/anjuta-terminal.server
? plugins/terminal/terminal-tool.c.diff
? plugins/text/GNOME_Development_Plugin_text.server.in
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/anjuta2/ChangeLog,v
retrieving revision 1.244
diff -u -r1.244 ChangeLog
--- ChangeLog 12 Jan 2003 20:51:59 -0000 1.244
+++ ChangeLog 18 Jan 2003 21:15:15 -0000
@@ -1,3 +1,12 @@
+2003-01-18 Gustavo Giráldez <gustavo giraldez gmx net>
+
+ * src/window.c (ensure_layout_manager): New function. Create
+ layout manager and connect to "dirty" property notification on
+ demand instead of anjuta_window_instance_init, since now the
+ layout is updated also for programatic changes in the dock, not
+ just user actions. Otherwise, the layout is saved prematurely and
+ hence overwrites the saved layout.
+
2003-01-12 Jeroen Zwartepoorte <jeroen xs4all nl>
* plugins/project-manager/project-tool.c: (init_project_view): Fix missing
Index: src/window.c
===================================================================
RCS file: /cvs/gnome/anjuta2/src/window.c,v
retrieving revision 1.67
diff -u -r1.67 window.c
--- src/window.c 4 Dec 2002 01:00:47 -0000 1.67
+++ src/window.c 18 Jan 2003 21:15:26 -0000
@@ -363,8 +363,7 @@
{
BonoboUIContainer *ui_container;
GtkTargetEntry dragtypes[] = {{"text/uri-list", 0, 0}};
- gchar *filename;
-
+
ui_container = bonobo_window_get_ui_container (BONOBO_WINDOW (window));
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
@@ -390,22 +389,6 @@
gdl_dock_placeholder_new ("ph_right", GDL_DOCK_OBJECT (window->dock),
GDL_DOCK_RIGHT, FALSE);
- /* layout manager */
- window->layout_manager = gdl_dock_layout_new (GDL_DOCK (window->dock));
- /* load xml layout definitions */
- /* FIXME: in case of multiple windows, the default layout is the one of
- the last saved window */
- filename = gnome_util_prepend_user_home (".anjuta2/layout.xml");
- if (!gdl_dock_layout_load_from_file (window->layout_manager, filename)) {
- g_free (filename);
- filename = g_build_filename (DATADIR "/anjuta2",
- "layout.xml", NULL);
- gdl_dock_layout_load_from_file (window->layout_manager, filename);
- }
- g_free (filename);
- g_signal_connect (window->layout_manager, "notify::dirty",
- (GCallback) layout_dirty_notify, window);
-
/* window state tracking */
g_signal_connect (window, "window-state-event",
G_CALLBACK (anjuta_window_state_cb), NULL);
@@ -602,6 +585,30 @@
}
#endif
+static void
+ensure_layout_manager (AnjutaWindow *window)
+{
+ gchar *filename;
+
+ if (!window->layout_manager) {
+ /* layout manager */
+ window->layout_manager = gdl_dock_layout_new (GDL_DOCK (window->dock));
+
+ /* load xml layout definitions */
+ filename = gnome_util_prepend_user_home (".anjuta2/layout.xml");
+ if (!gdl_dock_layout_load_from_file (window->layout_manager, filename)) {
+ g_free (filename);
+ filename = g_build_filename (DATADIR "/anjuta2",
+ "layout.xml", NULL);
+ gdl_dock_layout_load_from_file (window->layout_manager, filename);
+ }
+ g_free (filename);
+
+ g_signal_connect (window->layout_manager, "notify::dirty",
+ (GCallback) layout_dirty_notify, window);
+ }
+}
+
static gboolean
anjuta_window_save_layout_to_file (AnjutaWindow *window)
{
@@ -618,6 +625,8 @@
}
g_free (dir);
+ ensure_layout_manager (window);
+
filename = gnome_util_prepend_user_home (".anjuta2/layout.xml");
if (!gdl_dock_layout_save_to_file (window->layout_manager, filename))
anjuta_dialog_error ("Could not save layout.");
@@ -630,6 +639,8 @@
{
g_return_if_fail (window != NULL);
+ ensure_layout_manager (window);
+
gdl_dock_layout_save_layout (window->layout_manager, name);
anjuta_window_save_layout_to_file (window);
@@ -640,6 +651,8 @@
{
g_return_if_fail (window != NULL);
+ ensure_layout_manager (window);
+
gdl_dock_layout_load_layout (window->layout_manager, name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]