diff options
author | jstebbins <[email protected]> | 2010-04-09 18:17:51 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-04-09 18:17:51 +0000 |
commit | 31916b1e9e513a4791587fb133cb076d61559715 (patch) | |
tree | 1f31a34f7ba2df5f4e726240cecff0e8f77607d0 /gtk/src/presets.h | |
parent | 50fe6dd131c74884207ed10e660de6351024ef56 (diff) |
LinGui: allow multiple instances of the gui to run
Each instance has a queue named "queue.<pid>". On startup, the gui
opens and locks with lockf a file "ghb.pid.<pid>". Then it searches
for any other ghb.pid.<pid> files that exist that are not locked. If
it finds one, then some instance of ghb exited and may have left behind
a queue. Try to reload it. If there are no items in the queue, continue
looking for unlocked ghb.pid.<pid> files.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3212 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/presets.h')
-rw-r--r-- | gtk/src/presets.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/src/presets.h b/gtk/src/presets.h index a4da4ed74..89f778092 100644 --- a/gtk/src/presets.h +++ b/gtk/src/presets.h @@ -27,7 +27,9 @@ void ghb_prefs_save(GValue *settings); void ghb_pref_save(GValue *settings, const gchar *key); void ghb_save_queue(GValue *queue); GValue* ghb_load_queue(); -void ghb_remove_queue_file(void);; +GValue* ghb_load_old_queue(int pid); +void ghb_remove_queue_file(void); +void ghb_remove_old_queue_file(int pid); gchar* ghb_get_user_config_dir(gchar *subdir); void ghb_settings_to_ui(signal_user_data_t *ud, GValue *dict); void ghb_clear_presets_selection(signal_user_data_t *ud); @@ -42,5 +44,8 @@ void ghb_prefs_store(void); void ghb_pref_set(GValue *settings, const gchar *key); gboolean ghb_lock_file(const gchar *name); void ghb_refresh_preset(signal_user_data_t *ud); +int ghb_find_pid_file(); +void ghb_unlink_pid_file(int pid); +void ghb_write_pid_file(); #endif // _GHB_PRESETS_H_ |