diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-12-28 05:00:53 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-12-28 05:00:53 +0000 |
commit | f4ab0f022c847485d347d1ce8cd2ffcde3497f56 (patch) | |
tree | a09345c7580cdeb102f97a6510a01e3b46132081 | |
parent | f0ded112875ffa7337d442bd05abdd97170d8dc1 (diff) |
added configure option '--disable-updatecheck' which disables the update check feature.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2407 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | src/compose.c | 1 | ||||
-rw-r--r-- | src/main.c | 3 | ||||
-rw-r--r-- | src/mainwindow.c | 6 | ||||
-rw-r--r-- | src/prefs_common_dialog.c | 16 | ||||
-rw-r--r-- | src/update_check.c | 5 | ||||
-rw-r--r-- | src/update_check.h | 6 |
8 files changed, 49 insertions, 5 deletions
@@ -1,3 +1,12 @@ +2009-12-28 + + * src/update_check.[ch] + src/main.c + src/prefs_common_dialog.c + src/mainwindow.c: added configure option '--disable-updatecheck' + which disables the update check feature. + * src/compose.c: removed redundant code. + 2009-12-24 * src/colorlabel.[ch] diff --git a/configure.in b/configure.in index 5aa28dbc..3cfadb93 100644 --- a/configure.in +++ b/configure.in @@ -385,6 +385,14 @@ else AC_MSG_RESULT(no) fi +dnl for update check feature +AC_ARG_ENABLE(updatecheck, + [ --disable-updatecheck Disable update check feature], + [ac_cv_enable_updatecheck=$enableval], [ac_cv_enable_updatecheck=yes]) +if test x"$ac_cv_enable_updatecheck" = xyes ; then + AC_DEFINE(USE_UPDATE_CHECK, 1, Define if you want update check feature.) +fi + dnl Check for d_type member in struct dirent AC_MSG_CHECKING([whether struct dirent has d_type member]) AC_CACHE_VAL(ac_cv_dirent_d_type,[ diff --git a/src/compose.c b/src/compose.c index 059bd490..41ab17a9 100644 --- a/src/compose.c +++ b/src/compose.c @@ -1701,7 +1701,6 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo, gboolean to_all = FALSE, to_ml = FALSE, ignore_replyto = FALSE; gchar *from_str = NULL, *to_str = NULL, *cc_str = NULL, *replyto_str = NULL; - GSList *list; gboolean address_only = prefs_common.reply_address_only; g_return_if_fail(compose->account != NULL); @@ -352,8 +352,11 @@ int main(int argc, char *argv[]) g_signal_emit_by_name(syl_app, "init-done"); remote_command_exec(); + +#if USE_UPDATE_CHECK if (prefs_common.auto_update_check) update_check(FALSE); +#endif gtk_main(); #if USE_THREADS diff --git a/src/mainwindow.c b/src/mainwindow.c index f83ffcfa..dd5eedb9 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -527,9 +527,11 @@ static void faq_open_cb (MainWindow *mainwin, static void help_cmdline_cb (MainWindow *mainwin, guint action, GtkWidget *widget); +#if USE_UPDATE_CHECK static void update_check_cb (MainWindow *mainwin, guint action, GtkWidget *widget); +#endif static void scan_tree_func (Folder *folder, FolderItem *item, @@ -888,8 +890,10 @@ static GtkItemFactoryEntry mainwin_entries[] = {N_("/_Help/_FAQ/_French"), NULL, faq_open_cb, MANUAL_LANG_FR, NULL}, {N_("/_Help/_FAQ/_Italian"), NULL, faq_open_cb, MANUAL_LANG_IT, NULL}, {N_("/_Help/_Command line options"), NULL, help_cmdline_cb, 0, NULL}, +#if USE_UPDATE_CHECK {N_("/_Help/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Help/_Update check..."), NULL, update_check_cb, 0, NULL}, +#endif {N_("/_Help/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Help/_About"), NULL, about_show, 0, NULL} }; @@ -4046,11 +4050,13 @@ static void help_cmdline_cb(MainWindow *mainwin, guint action, help_command_line_show(); } +#if USE_UPDATE_CHECK static void update_check_cb(MainWindow *mainwin, guint action, GtkWidget *widget) { update_check(TRUE); } +#endif static void scan_tree_func(Folder *folder, FolderItem *item, gpointer data) { diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c index 74e0735b..507a3fe3 100644 --- a/src/prefs_common_dialog.c +++ b/src/prefs_common_dialog.c @@ -236,11 +236,13 @@ static struct Extcmd { GtkWidget *button_extsend; } extcmd; +#if USE_UPDATE_CHECK static struct UpdateCheck { GtkWidget *checkbtn_autoupdate; GtkWidget *checkbtn_useproxy; GtkWidget *entry_proxyhost; } update_check; +#endif static struct Advanced { GtkWidget *checkbtn_strict_cache_check; @@ -557,12 +559,14 @@ static PrefsUIData ui_data[] = { prefs_set_data_from_entry, prefs_set_entry}, /* Update check */ +#if USE_UPDATE_CHECK {"auto_update_check", &update_check.checkbtn_autoupdate, prefs_set_data_from_toggle, prefs_set_toggle}, {"use_http_proxy", &update_check.checkbtn_useproxy, prefs_set_data_from_toggle, prefs_set_toggle}, {"http_proxy_host", &update_check.entry_proxyhost, prefs_set_data_from_entry, prefs_set_entry}, +#endif /* Advanced */ {"strict_cache_check", &advanced.checkbtn_strict_cache_check, @@ -591,7 +595,9 @@ static void prefs_privacy_create (void); static void prefs_details_create (void); static GtkWidget *prefs_other_create (void); static GtkWidget *prefs_extcmd_create (void); +#if USE_UPDATE_CHECK static GtkWidget *prefs_update_create (void); +#endif static GtkWidget *prefs_advanced_create (void); static void prefs_common_set_encoding_optmenu (GtkOptionMenu *optmenu, @@ -740,10 +746,6 @@ static void prefs_common_create(void) #endif prefs_details_create(); SET_NOTEBOOK_LABEL(dialog.notebook, _("Details"), page++); - //prefs_other_create(); - //SET_NOTEBOOK_LABEL(dialog.notebook, _("Other"), page++); - //prefs_advanced_create(); - //SET_NOTEBOOK_LABEL(dialog.notebook, _("Advanced"), page++); gtk_widget_show_all(dialog.window); } @@ -2220,7 +2222,9 @@ static void prefs_details_create(void) GtkWidget *other_wid; GtkWidget *extcmd_wid; +#if USE_UPDATE_CHECK GtkWidget *update_wid; +#endif GtkWidget *advanced_wid; vbox1 = gtk_vbox_new (FALSE, VSPACING); @@ -2321,9 +2325,11 @@ static void prefs_details_create(void) extcmd_wid = prefs_extcmd_create(); gtk_box_pack_start(GTK_BOX(vbox_tab), extcmd_wid, FALSE, FALSE, 0); +#if USE_UPDATE_CHECK APPEND_SUB_NOTEBOOK(notebook, vbox_tab, _("Update")); update_wid = prefs_update_create(); gtk_box_pack_start(GTK_BOX(vbox_tab), update_wid, FALSE, FALSE, 0); +#endif APPEND_SUB_NOTEBOOK(notebook, vbox_tab, _("Advanced")); advanced_wid = prefs_advanced_create(); @@ -2638,6 +2644,7 @@ static GtkWidget *prefs_extcmd_create(void) return vbox1; } +#if USE_UPDATE_CHECK static GtkWidget *prefs_update_create(void) { GtkWidget *vbox1; @@ -2684,6 +2691,7 @@ static GtkWidget *prefs_update_create(void) return vbox1; } +#endif /* USE_UPDATE_CHECK */ static GtkWidget *prefs_advanced_create(void) { diff --git a/src/update_check.c b/src/update_check.c index af9fdfe7..3214c502 100644 --- a/src/update_check.c +++ b/src/update_check.c @@ -21,10 +21,13 @@ # include "config.h" #endif +#ifdef USE_UPDATE_CHECK + #include "defs.h" #include <glib.h> #include <glib/gi18n.h> + #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> @@ -279,3 +282,5 @@ void update_check(gboolean show_dialog_always) g_child_watch_add(pid, update_check_cb, (gpointer)show_dialog_always); } + +#endif /* USE_UPDATE_CHECK */ diff --git a/src/update_check.h b/src/update_check.h index 532a407a..6ca4ae5b 100644 --- a/src/update_check.h +++ b/src/update_check.h @@ -24,6 +24,12 @@ # include "config.h" #endif +#ifdef USE_UPDATE_CHECK + +#include <glib.h> + void update_check(gboolean show_dialog_always); +#endif /* USE_UPDATE_CHECK */ + #endif /* __PLUGIN_MANAGER_H__ */ |