summaryrefslogtreecommitdiff
path: root/src/session.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2001-09-16 00:30:45 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-09-16 00:30:45 +0000
commit39df21227d00fa4c2d37b413a5432c6a36b61d98 (patch)
tree010a3c220b7c184889aacf973fe8d8aa265d2150 /src/session.c
parent2830c9d74862700fdecd19675e8e5d4432afac38 (diff)
downloadmetacity-39df21227d00fa4c2d37b413a5432c6a36b61d98.tar.gz
add support for a mini icon in the titlebar (update_icon): re-enable
2001-09-15 Havoc Pennington <hp@pobox.com> * src/window.c: add support for a mini icon in the titlebar (update_icon): re-enable support for _NET_WM_ICON * src/session.c (save_state): add an ferror check when writing session file
Diffstat (limited to 'src/session.c')
-rw-r--r--src/session.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/session.c b/src/session.c
index 00290e69..de65a513 100644
--- a/src/session.c
+++ b/src/session.c
@@ -97,8 +97,8 @@ new_ice_connection (IceConn connection, IcePointer client_data, Bool opening,
*/
GIOChannel *channel;
- fcntl (IceConnectionNumber(connection),F_SETFD,
- fcntl(IceConnectionNumber(connection),F_GETFD,0) | FD_CLOEXEC);
+ fcntl (IceConnectionNumber (connection), F_SETFD,
+ fcntl (IceConnectionNumber (connection), F_GETFD, 0) | FD_CLOEXEC);
channel = g_io_channel_unix_new (IceConnectionNumber (connection));
@@ -119,15 +119,15 @@ new_ice_connection (IceConn connection, IcePointer client_data, Bool opening,
}
}
-static IceIOErrorHandler gnome_ice_installed_handler;
+static IceIOErrorHandler ice_installed_handler;
/* We call any handler installed before (or after) gnome_ice_init but
avoid calling the default libICE handler which does an exit() */
static void
ice_io_error_handler (IceConn connection)
{
- if (gnome_ice_installed_handler)
- (*gnome_ice_installed_handler) (connection);
+ if (ice_installed_handler)
+ (*ice_installed_handler) (connection);
}
static void
@@ -139,11 +139,11 @@ ice_init (void)
{
IceIOErrorHandler default_handler;
- gnome_ice_installed_handler = IceSetIOErrorHandler (NULL);
+ ice_installed_handler = IceSetIOErrorHandler (NULL);
default_handler = IceSetIOErrorHandler (ice_io_error_handler);
- if (gnome_ice_installed_handler == default_handler)
- gnome_ice_installed_handler = NULL;
+ if (ice_installed_handler == default_handler)
+ ice_installed_handler = NULL;
IceAddConnectionWatch (new_ice_connection, NULL);
@@ -879,11 +879,17 @@ save_state (void)
out:
if (outfile)
{
- if (fclose (outfile) != 0)
+ /* FIXME need a dialog for this */
+ if (ferror (outfile))
{
meta_warning (_("Error writing session file '%s': %s\n"),
session_file, g_strerror (errno));
}
+ if (fclose (outfile))
+ {
+ meta_warning (_("Error closing session file '%s': %s\n"),
+ session_file, g_strerror (errno));
+ }
}
g_free (metacity_dir);