diff options
author | Havoc Pennington <hp@pobox.com> | 1998-06-23 02:06:36 +0800 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 1998-06-23 02:06:36 +0800 |
commit | 7b7c48bea1cddf61e7dd1cfcc7696a309888c72c (patch) | |
tree | ea8150bbd95dca0b0a61437e2635b957e7fdf15c | |
parent | 467d8285846b5dc3e3a69e4d80ade286a0d27c13 (diff) | |
download | gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.tar.gz gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.tar.zst gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.zip |
Use gnome_geometry_string to get the geometry string.
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.
svn path=/trunk/; revision=267
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/gui/main.c | 13 | ||||
-rw-r--r-- | calendar/main.c | 13 |
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; |