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 /calendar/gui | |
parent | 467d8285846b5dc3e3a69e4d80ade286a0d27c13 (diff) | |
download | gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.tar gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.tar.gz gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.tar.bz2 gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.tar.lz gsoc2013-evolution-7b7c48bea1cddf61e7dd1cfcc7696a309888c72c.tar.xz 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
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/main.c | 13 |
1 files changed, 4 insertions, 9 deletions
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; |