Commit 7e08264e authored by John Sullivan's avatar John Sullivan
Browse files

Added nautilus_app_exiting call, home of right-before-quitting code.

parent 632b2399
2000-01-06 John Sullivan <sullivan@eazel.com>
* src/ntl-app.h: src/ntl-app.c: (nautilus_app_exiting):
New function for doing app-wide cleanup. Moved call to
nautilus_prefs_save in here.
* src/ntl-app.c: (nautilus_app_destroy_window): Former
home of call to nautilus_prefs_save.
* src/ntl-main.c: (main): After event loop concludes,
call nautilus_app_exiting.
2000-01-06 Elliot Lee <sopwith@redhat.com>
* libnautilus/gnome-icon-container.c: Relayout when size changes.
......
......@@ -28,6 +28,19 @@ nautilus_make_object(GnomeGenericFactory *gfact, const char *goad_id, gpointer c
return NULL;
}
/**
* nautilus_app_exiting:
*
* Called after the main event loop has finished, just before the
* program ends. Don't call from anywhere else.
**/
void
nautilus_app_exiting()
{
/* Do those things that gotta be done just once before quitting */
nautilus_prefs_save();
}
void
nautilus_app_init(const char *initial_url)
{
......@@ -53,7 +66,6 @@ nautilus_app_destroy_window(GtkObject *obj)
if(window_count <= 0)
{
gtk_main_quit();
nautilus_prefs_save();
}
}
......
#ifndef NTL_APP_H
#define NTL_APP_H 1
void nautilus_app_exiting(void);
void nautilus_app_init(const char *initial_url);
NautilusWindow *nautilus_app_create_window(void);
......
......@@ -70,5 +70,8 @@ int main(int argc, char *argv[])
bonobo_main();
}
/* One last chance for cleanup before program finishes. */
nautilus_app_exiting();
return 0;
}
......@@ -28,6 +28,19 @@ nautilus_make_object(GnomeGenericFactory *gfact, const char *goad_id, gpointer c
return NULL;
}
/**
* nautilus_app_exiting:
*
* Called after the main event loop has finished, just before the
* program ends. Don't call from anywhere else.
**/
void
nautilus_app_exiting()
{
/* Do those things that gotta be done just once before quitting */
nautilus_prefs_save();
}
void
nautilus_app_init(const char *initial_url)
{
......@@ -53,7 +66,6 @@ nautilus_app_destroy_window(GtkObject *obj)
if(window_count <= 0)
{
gtk_main_quit();
nautilus_prefs_save();
}
}
......
#ifndef NTL_APP_H
#define NTL_APP_H 1
void nautilus_app_exiting(void);
void nautilus_app_init(const char *initial_url);
NautilusWindow *nautilus_app_create_window(void);
......
......@@ -70,5 +70,8 @@ int main(int argc, char *argv[])
bonobo_main();
}
/* One last chance for cleanup before program finishes. */
nautilus_app_exiting();
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment