diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-02-19 22:21:17 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-02-19 22:21:17 +0000 |
commit | e48236a43635f9f0e695a25199bf3ab959774590 (patch) | |
tree | c6438499bad89c7f47eda54dc4e5c9bd2bcadb89 /epan/prefs.c | |
parent | 9736ff7cb5f2ba971202a3472707aa96380d16de (diff) |
Add automatic software update checks for Win32 using WinSparkle. Add
preferences (currently hidden) to disable updates, set the update
frequency, and set the update "channel" (stable vs development). Add a
"Help" menu item to manually check for updates.
svn path=/trunk/; revision=47748
Diffstat (limited to 'epan/prefs.c')
-rw-r--r-- | epan/prefs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/epan/prefs.c b/epan/prefs.c index 8e0c3feaa4..d8a56109d0 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -151,6 +151,11 @@ static enum_val_t gui_layout_content[] = { {NULL, NULL, -1} }; +static enum_val_t gui_update_channel[] = { + {"DEVELOPMENT", "DEVELOPMENT", UPDATE_CHANNEL_DEVELOPMENT}, + {"STABLE", "STABLE", UPDATE_CHANNEL_STABLE}, + {NULL, NULL, -1} + }; /* * List of all modules with preference settings. */ @@ -2067,6 +2072,16 @@ prefs_register_modules(void) prefs_register_string_preference(gui_module, "webbrowser", "The path to the webbrowser", "The path to the webbrowser (Ex: mozilla)", (const char**)(&prefs.gui_webbrowser)); + prefs_register_bool_preference(gui_module, "update.enabled", + "Check for updates", + "Check for updates (Windows only)", + &prefs.gui_update_enabled); + + prefs_register_enum_preference(gui_module, "update.channel", + "Update channel", + "The type of update to fetch", + (gint*)(void*)(&prefs.gui_update_channel), gui_version_placement_type, FALSE); + prefs_register_string_preference(gui_module, "window_title", "Custom window title", "Custom window title. (Appended to existing titles.)", (const char**)(&prefs.gui_window_title)); @@ -2641,6 +2656,9 @@ pre_init_prefs(void) prefs.gui_ask_unsaved = TRUE; prefs.gui_find_wrap = TRUE; prefs.gui_use_pref_save = FALSE; + prefs.gui_update_enabled = TRUE; + prefs.gui_update_channel = UPDATE_CHANNEL_STABLE; + prefs.gui_update_interval = 60*60*24; /* Seconds */ /* This can be g_freed, so it must be g_mallocated. */ prefs.gui_webbrowser = g_strdup(HTML_VIEWER " %s"); /* This can be g_freed, so it must be g_mallocated. */ |