[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r1933: Add a place on the config dialog for the new firewall/bridge (in trunk: . src/gui/config src/gui/res src/gui/res/22x22)



Author: edmanm
Date: 2007-09-21 00:44:59 -0400 (Fri, 21 Sep 2007)
New Revision: 1933

Added:
   trunk/src/gui/config/firewallpage.cpp
   trunk/src/gui/config/firewallpage.h
   trunk/src/gui/config/firewallpage.ui
   trunk/src/gui/res/22x22/firewall.png
Modified:
   trunk/
   trunk/src/gui/config/config.pri
   trunk/src/gui/config/configdialog.cpp
   trunk/src/gui/config/configdialog.h
   trunk/src/gui/config/configdialog.ui
   trunk/src/gui/res/vidalia_common.qrc
Log:
 r1940@lysithea:  edmanm | 2007-09-21 00:44:36 -0400
 Add a place on the config dialog for the new firewall/bridge configuration 
 stuff. This isn't the icon we're going to really use, the UI isn't all there,
 and nothing is implemented yet.



Property changes on: trunk
___________________________________________________________________
 svk:merge ticket from /local/vidalia/trunk [r1940] on dc66be73-d13e-47ba-a267-8dc7cda68c65

Modified: trunk/src/gui/config/config.pri
===================================================================
--- trunk/src/gui/config/config.pri	2007-09-21 04:44:42 UTC (rev 1932)
+++ trunk/src/gui/config/config.pri	2007-09-21 04:44:59 UTC (rev 1933)
@@ -25,7 +25,8 @@
          $$PWD/generalpage.ui \
          $$PWD/serverpage.ui \
          $$PWD/advancedpage.ui \
-         $$PWD/appearancepage.ui
+         $$PWD/appearancepage.ui \
+         $$PWD/firewallpage.ui
 
 HEADERS += $$PWD/configdialog.h \
            $$PWD/domainvalidator.h \
@@ -37,7 +38,8 @@
            $$PWD/generalpage.h \
            $$PWD/serverpage.h \
            $$PWD/advancedpage.h \
-           $$PWD/appearancepage.h
+           $$PWD/appearancepage.h \
+           $$PWD/firewallpage.h
 
 SOURCES += $$PWD/configdialog.cpp \
            $$PWD/domainvalidator.cpp \
@@ -48,5 +50,6 @@
            $$PWD/generalpage.cpp \
            $$PWD/serverpage.cpp \
            $$PWD/advancedpage.cpp \
-           $$PWD/appearancepage.cpp
+           $$PWD/appearancepage.cpp \
+           $$PWD/firewallpage.cpp
 

Modified: trunk/src/gui/config/configdialog.cpp
===================================================================
--- trunk/src/gui/config/configdialog.cpp	2007-09-21 04:44:42 UTC (rev 1932)
+++ trunk/src/gui/config/configdialog.cpp	2007-09-21 04:44:59 UTC (rev 1933)
@@ -32,6 +32,7 @@
 
 /* Images for toolbar icons */
 #define IMAGE_GENERAL       ":/images/22x22/preferences-system.png"
+#define IMAGE_FIREWALL      ":/images/22x22/firewall.png"
 #define IMAGE_SERVER        ":/images/22x22/network-server.png"
 #define IMAGE_APPEARANCE    ":/images/22x22/preferences-desktop-locale.png"
 #define IMAGE_ADVANCED      ":/images/22x22/emblem-system.png"
@@ -39,6 +40,7 @@
 #define IMAGE_CANCEL        ":/images/22x22/emblem-unreadable.png"
 #define IMAGE_HELP          ":/images/22x22/help-browser.png"
 
+
 /** Constructor */
 ConfigDialog::ConfigDialog(QWidget* parent)
 : VidaliaWindow("ConfigDialog", parent)
@@ -53,6 +55,9 @@
   ui.stackPages->add(new GeneralPage(ui.stackPages),
                      createPageAction(QIcon(IMAGE_GENERAL), tr("General"), grp));
   
+  ui.stackPages->add(new FirewallPage(ui.stackPages),
+                     createPageAction(QIcon(IMAGE_FIREWALL), tr("Firewall"), grp));
+  
   ui.stackPages->add(new ServerPage(ui.stackPages),
                      createPageAction(QIcon(IMAGE_SERVER), tr("Server"), grp));
   

Modified: trunk/src/gui/config/configdialog.h
===================================================================
--- trunk/src/gui/config/configdialog.h	2007-09-21 04:44:42 UTC (rev 1932)
+++ trunk/src/gui/config/configdialog.h	2007-09-21 04:44:59 UTC (rev 1933)
@@ -34,12 +34,14 @@
 #include <gui/common/vidaliawindow.h>
 
 #include "generalpage.h"
+#include "firewallpage.h"
 #include "serverpage.h"
 #include "advancedpage.h"
 #include "appearancepage.h"
 
 #include "ui_configdialog.h"
 
+
 class ConfigDialog : public VidaliaWindow
 {
   Q_OBJECT
@@ -47,10 +49,11 @@
 public:
   /** Config dialog pages. */
   enum Page {
-    General    = 0,  /** General configuration page. */
-    Server     = 1,  /** Server configuration page. */
-    Appearance = 2,  /** Appearance configuration page. */
-    Advanced   = 3   /** Advanced configuration page. */
+    General = 0,  /** General configuration page. */
+    Firewall,     /** Firewall configuration page. */
+    Server,       /** Server configuration page. */
+    Appearance,   /** Appearance configuration page. */
+    Advanced      /** Advanced configuration page. */
   };
 
   /** Default Constructor */

Modified: trunk/src/gui/config/configdialog.ui
===================================================================
--- trunk/src/gui/config/configdialog.ui	2007-09-21 04:44:42 UTC (rev 1932)
+++ trunk/src/gui/config/configdialog.ui	2007-09-21 04:44:59 UTC (rev 1933)
@@ -8,7 +8,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>519</width>
+    <width>550</width>
     <height>400</height>
    </rect>
   </property>

Added: trunk/src/gui/config/firewallpage.cpp
===================================================================
--- trunk/src/gui/config/firewallpage.cpp	                        (rev 0)
+++ trunk/src/gui/config/firewallpage.cpp	2007-09-21 04:44:59 UTC (rev 1933)
@@ -0,0 +1,61 @@
+/****************************************************************
+ *  Vidalia is distributed under the following license:
+ *
+ *  Copyright (C) 2006,  Matt Edman, Justin Hipple
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version 2
+ *  of the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ *  Boston, MA  02110-1301, USA.
+ ****************************************************************/
+
+/** 
+ * \file serverpage.cpp
+ * \version $Id$
+ * \brief Tor server configuration options
+ */
+
+#include <vidalia.h>
+
+#include "firewallpage.h"
+
+
+/** Constructor */
+FirewallPage::FirewallPage(QWidget *parent)
+: ConfigPage(parent)
+{
+  /* Invoke the Qt Designer generated object setup routine */
+  ui.setupUi(this);
+  
+  /* Keep a pointer to the TorControl object used to talk to Tor */
+  _torControl = Vidalia::torControl();
+}
+
+/** Destructor */
+FirewallPage::~FirewallPage()
+{
+}
+
+/** Saves changes made to settings on the Firewall settings page. */
+bool
+FirewallPage::save(QString &errmsg)
+{
+  return true;
+}
+
+/** Loads previously saved settings */
+void
+FirewallPage::load()
+{
+}
+


Property changes on: trunk/src/gui/config/firewallpage.cpp
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/src/gui/config/firewallpage.h
===================================================================
--- trunk/src/gui/config/firewallpage.h	                        (rev 0)
+++ trunk/src/gui/config/firewallpage.h	2007-09-21 04:44:59 UTC (rev 1933)
@@ -0,0 +1,60 @@
+/****************************************************************
+ *  Vidalia is distributed under the following license:
+ *
+ *  Copyright (C) 2006,  Matt Edman, Justin Hipple
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version 2
+ *  of the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ *  Boston, MA  02110-1301, USA.
+ ****************************************************************/
+
+/** 
+ * \file firewallpage.h
+ * \version $Id$
+ * \brief Firewall configuration options
+ */
+
+#ifndef _FIREWALLPAGE_H
+#define _FIREWALLPAGE_H
+
+#include <vidalia.h>
+
+#include "configpage.h"
+#include "ui_firewallpage.h"
+
+
+class FirewallPage : public ConfigPage
+{
+  Q_OBJECT
+
+public:
+  /** Default Constructor */
+  FirewallPage(QWidget *parent = 0);
+  /** Default Destructor */
+  ~FirewallPage();
+  /** Saves the changes on this page */
+  bool save(QString &errmsg);
+  /** Loads the settings for this page */
+  void load();
+
+private:
+  /** A TorControl object used to talk to Tor */
+  TorControl* _torControl;
+
+  /** Qt Designer generated object */
+  Ui::FirewallPage ui;
+};
+
+#endif
+


Property changes on: trunk/src/gui/config/firewallpage.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/src/gui/config/firewallpage.ui
===================================================================
--- trunk/src/gui/config/firewallpage.ui	                        (rev 0)
+++ trunk/src/gui/config/firewallpage.ui	2007-09-21 04:44:59 UTC (rev 1933)
@@ -0,0 +1,77 @@
+<ui version="4.0" >
+ <class>FirewallPage</class>
+ <widget class="QWidget" name="FirewallPage" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>438</width>
+    <height>329</height>
+   </rect>
+  </property>
+  <property name="font" >
+   <font>
+    <pointsize>10</pointsize>
+   </font>
+  </property>
+  <property name="contextMenuPolicy" >
+   <enum>Qt::NoContextMenu</enum>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QCheckBox" name="chkFascistFirewall" >
+     <property name="contextMenuPolicy" >
+      <enum>Qt::NoContextMenu</enum>
+     </property>
+     <property name="toolTip" >
+      <string>Check to run as a Tor network server</string>
+     </property>
+     <property name="text" >
+      <string>My firewall only lets me connect to certain ports</string>
+     </property>
+     <property name="checked" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="chkUseProxy" >
+     <property name="text" >
+      <string>I use a proxy to access the Internet</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="chkUseBridge" >
+     <property name="text" >
+      <string>My ISP blocks connections to the Tor network</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>420</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>chkFascistFirewall</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>


Property changes on: trunk/src/gui/config/firewallpage.ui
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/src/gui/res/22x22/firewall.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/gui/res/22x22/firewall.png
___________________________________________________________________
Name: svn:mime-type
   + image/x-png

Modified: trunk/src/gui/res/vidalia_common.qrc
===================================================================
--- trunk/src/gui/res/vidalia_common.qrc	2007-09-21 04:44:42 UTC (rev 1932)
+++ trunk/src/gui/res/vidalia_common.qrc	2007-09-21 04:44:59 UTC (rev 1933)
@@ -39,6 +39,7 @@
         <file>22x22/edit-select-all.png</file>
         <file>22x22/emblem-system.png</file>
         <file>22x22/emblem-unreadable.png</file>
+        <file>22x22/firewall.png</file>
         <file>22x22/format-justify-fill.png</file>
         <file>22x22/go-down.png</file>
         <file>22x22/go-home.png</file>