aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/main.c13
-rw-r--r--calendar/main.c13
3 files changed, 13 insertions, 18 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index a8d6f80b51..0ff728893d 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jun 22 13:01:16 1998 Havoc Pennington <hp@pobox.com>
+
+ * main.c (session_save_state): Use gnome_geometry_string to get
+ the geometry string.
+
1998-06-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* eventedit.c (ee_rp_init_rule): Do not subtract 1 from
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index bdb6a0d1c3..a489a157be 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -579,14 +579,9 @@ session_save_state (GnomeClient *client, gint phase, GnomeRestartStyle save_styl
argv [0] = client_data;
for (i = 1, l = all_calendars; l; l = l->next){
GnomeCalendar *gcal = GNOME_CALENDAR (l->data);
- int x, y, w, h;
- char *buffer = g_malloc (32);
+ char *geometry;
- gdk_window_get_origin (GTK_WIDGET (gcal)->window, &x, &y);
- gdk_window_get_size (GTK_WIDGET (gcal)->window, &w, &h);
- printf ("X, Y = %d, %d\n", x, y);
- printf ("w, h = %d, %d\n", w, h);
- sprintf (buffer, "%dx%d+%d+%d", w, h, x, y);
+ geometry = gnome_geometry_string (GTK_WIDGET (gcal)->window);
if (strcmp (gcal->cal->filename, user_calendar_file) == 0)
argv [i++] = "--userfile";
@@ -595,8 +590,8 @@ session_save_state (GnomeClient *client, gint phase, GnomeRestartStyle save_styl
argv [i++] = gcal->cal->filename;
}
argv [i++] = "--geometry";
- argv [i++] = buffer;
- free_list = g_list_append (free_list, buffer);
+ argv [i++] = geometry;
+ free_list = g_list_append (free_list, geometry);
calendar_save (gcal->cal, gcal->cal->filename);
}
argv [i] = NULL;
diff --git a/calendar/main.c b/calendar/main.c
index bdb6a0d1c3..a489a157be 100644
--- a/calendar/main.c
+++ b/calendar/main.c
@@ -579,14 +579,9 @@ session_save_state (GnomeClient *client, gint phase, GnomeRestartStyle save_styl
argv [0] = client_data;
for (i = 1, l = all_calendars; l; l = l->next){
GnomeCalendar *gcal = GNOME_CALENDAR (l->data);
- int x, y, w, h;
- char *buffer = g_malloc (32);
+ char *geometry;
- gdk_window_get_origin (GTK_WIDGET (gcal)->window, &x, &y);
- gdk_window_get_size (GTK_WIDGET (gcal)->window, &w, &h);
- printf ("X, Y = %d, %d\n", x, y);
- printf ("w, h = %d, %d\n", w, h);
- sprintf (buffer, "%dx%d+%d+%d", w, h, x, y);
+ geometry = gnome_geometry_string (GTK_WIDGET (gcal)->window);
if (strcmp (gcal->cal->filename, user_calendar_file) == 0)
argv [i++] = "--userfile";
@@ -595,8 +590,8 @@ session_save_state (GnomeClient *client, gint phase, GnomeRestartStyle save_styl
argv [i++] = gcal->cal->filename;
}
argv [i++] = "--geometry";
- argv [i++] = buffer;
- free_list = g_list_append (free_list, buffer);
+ argv [i++] = geometry;
+ free_list = g_list_append (free_list, geometry);
calendar_save (gcal->cal, gcal->cal->filename);
}
argv [i] = NULL;