diff libgui/src/main-window.h @ 17940:b3e4ee8f4d6d

respect option for opting out of web connections for community news * main-window.h, main-window.cc (main_window::main_window): Check settings for news/allow_web_connection. Don't load and display community news at startup if the community news web connection is disabled. (news_reader::connect_to_web): New data member. (news_reader_process): Display different messages for network unavailable and disabled web connections. Don't connect to web if connect_to_web is false. (main_window::load_and_display_community_news): Check settings for news/allow_web_connection and pass value to news_reader constructor. * welcome-wizard.h, welcome-wizard.cc (welcome_wizard::allow_web_connect_state): New data member. (welcome_wizard::handle_web_connect_option): New slot. (setup_community_news::setup_community_news): Connect checkbox signal to welcome_wizard::handle_web_connect_option. (welcome_wizard::accept): New slot. Initialize resources here.
author John W. Eaton <jwe@octave.org>
date Sat, 16 Nov 2013 12:05:26 -0500
parents 16cf38c39915
children 989ff97a7e8c
line wrap: on
line diff
--- a/libgui/src/main-window.h	Sat Nov 16 02:52:30 2013 -0500
+++ b/libgui/src/main-window.h	Sat Nov 16 12:05:26 2013 -0500
@@ -348,8 +348,9 @@
 public:
 
   news_reader (const QString& xbase_url, const QString& xpage,
-               int xserial = -1)
-    : QObject (), base_url (xbase_url), page (xpage), serial (xserial)
+               int xserial = -1, bool xconnect_to_web = false)
+    : QObject (), base_url (xbase_url), page (xpage), serial (xserial),
+      connect_to_web (xconnect_to_web)
   { }
 
 public slots:
@@ -367,6 +368,7 @@
   QString base_url;
   QString page;
   int serial;
+  bool connect_to_web;
 };
 
 #endif // MAINWINDOW_H