Changeset 2969

Show
Ignore:
Timestamp:
08/15/08 11:42:17 (3 months ago)
Author:
borkdomenik
Message:

Two new features:
* Display the number of HiddenServices? actually running on the MainWindow?(thanks to phobos for this idea!!)
* Added some Tooltipps for the new features.

Location:
vidalia/branches/hidden-services/src/vidalia
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • vidalia/branches/hidden-services/src/vidalia/config/configdialog.cpp

    r2553 r2969  
    5252  ui.setupUi(this); 
    5353 
     54  /* A reference to the parnet widget */ 
     55  //_parent = (MainWIndow)parent; 
    5456  /* Override the QDialogButtonBox button text so we can use our own 
    5557   * translations. */ 
     
    223225    appliedChanges = true; 
    224226  } 
    225   if (appliedChanges) 
     227  if (appliedChanges) { 
    226228    saveConf(); 
     229  } 
     230  emit saved(); 
    227231  close(); 
    228232} 
  • vidalia/branches/hidden-services/src/vidalia/config/configdialog.h

    r2465 r2969  
    2121#include <QFileDialog> 
    2222#include <vidaliawindow.h> 
     23//#include <mainwindow.h> 
    2324 
    2425#include "generalpage.h" 
     
    7172  void help(); 
    7273 
     74public: 
     75 
     76signals: 
     77  /** Emitted when the user closes the ConfigDialog in order to update the  
     78   * number of Hidden Services that are running on the MainWindow */ 
     79  void saved(); 
     80 
    7381private: 
    7482  /** Loads the current configuration settings */ 
     
    7886  /** Adds a new action to the toolbar. */ 
    7987  void addAction(QAction *action, const char *slot = 0); 
     88  /** A reference to the parent widget*/ 
     89  //MainWindow* _parent; 
    8090 
    8191  /** Qt Designer generated object */ 
  • vidalia/branches/hidden-services/src/vidalia/config/servicepage.ui

    r2959 r2969  
    107107            </size> 
    108108           </property> 
     109           <property name="toolTip" > 
     110            <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     111p, li { white-space: pre-wrap; } 
     112&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     113&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A listing of all configured Services.&lt;/p>&lt;/body>&lt;/html></string> 
     114           </property> 
    109115           <property name="selectionMode" > 
    110116            <enum>QAbstractItemView::SingleSelection</enum> 
     
    298304          <item row="0" column="0" > 
    299305           <widget class="QCheckBox" name="checkBox_basic" > 
     306            <property name="toolTip" > 
     307             <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     308p, li { white-space: pre-wrap; } 
     309&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     310&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the basic authorization mode is more scalable but less secure.&lt;/p>&lt;/body>&lt;/html></string> 
     311            </property> 
    300312            <property name="text" > 
    301313             <string>basic configuration</string> 
     
    305317          <item row="0" column="1" > 
    306318           <widget class="QCheckBox" name="checkBox_stealth" > 
     319            <property name="toolTip" > 
     320             <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     321p, li { white-space: pre-wrap; } 
     322&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     323&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the stealth authorization mode is more secure but less scalable.&lt;/p>&lt;/body>&lt;/html></string> 
     324            </property> 
    307325            <property name="text" > 
    308326             <string>stealth configuration</string> 
     
    325343                <height>16777215</height> 
    326344               </size> 
     345              </property> 
     346              <property name="toolTip" > 
     347               <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     348p, li { white-space: pre-wrap; } 
     349&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     350&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A listing of all ClientAuthorizationData configured with Vidalia.&lt;/p>&lt;/body>&lt;/html></string> 
    327351              </property> 
    328352              <property name="selectionMode" > 
     
    449473         </item> 
    450474         <item row="1" column="0" > 
    451           <widget class="QLineEdit" name="authLineAccess" /> 
     475          <widget class="QLineEdit" name="authLineAccess" > 
     476           <property name="toolTip" > 
     477            <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     478p, li { white-space: pre-wrap; } 
     479&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     480&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">only entries in the format: &amp;lt;onion-address&amp;gt; &amp;lt;descriptor-cookie&amp;gt; allowed.&lt;/p>&lt;/body>&lt;/html></string> 
     481           </property> 
     482          </widget> 
    452483         </item> 
    453484         <item row="1" column="1" > 
    454           <widget class="QLineEdit" name="commentLineAccess" /> 
     485          <widget class="QLineEdit" name="commentLineAccess" > 
     486           <property name="toolTip" > 
     487            <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     488p, li { white-space: pre-wrap; } 
     489&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     490&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Give an optional comment or identification for each entry.&lt;/p>&lt;/body>&lt;/html></string> 
     491           </property> 
     492          </widget> 
    455493         </item> 
    456494        </layout> 
     
    466504            </sizepolicy> 
    467505           </property> 
     506           <property name="toolTip" > 
     507            <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     508p, li { white-space: pre-wrap; } 
     509&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     510&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A listing of all ServiceAuthorizationData stored with Vidalia.&lt;/p>&lt;/body>&lt;/html></string> 
     511           </property> 
    468512           <property name="selectionMode" > 
    469513            <enum>QAbstractItemView::SingleSelection</enum> 
     
    487531          <widget class="QToolButton" name="addServiceAuthBtn" > 
    488532           <property name="toolTip" > 
    489             <string>Add new service with authorization data</string> 
     533            <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> 
     534p, li { white-space: pre-wrap; } 
     535&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 
     536&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Add new service with authorization data&lt;/p>&lt;/body>&lt;/html></string> 
    490537           </property> 
    491538           <property name="text" > 
  • vidalia/branches/hidden-services/src/vidalia/mainwindow.cpp

    r2362 r2969  
    787787    } 
    788788  } 
     789  ui.lblTorStatus->setText(ui.lblTorStatus->text().append("\n""0 Hidden Services running.")); 
    789790} 
    790791 
     
    10221023  updateTorStatus(CircuitEstablished); 
    10231024  startBrowser(); 
     1025  updateHidServStatus(); 
    10241026} 
    10251027 
     
    10961098{ 
    10971099  _configDialog->showWindow(page); 
     1100  connect(_configDialog, SIGNAL(saved()), this, SLOT(updateHidServStatus())); 
    10981101} 
    10991102 
     
    11691172} 
    11701173 
    1171  
     1174/** Called to display the number of Hidden Services actually running */ 
     1175void 
     1176MainWindow::updateHidServStatus() 
     1177{ 
     1178  QString statustext;  
     1179  QString conf = _torControl->getHiddenServiceConf("hiddenserviceoptions"); 
     1180  QStringList strList = conf.split("250 HiddenServiceDir"); 
     1181  int amount = strList.size()-1; 
     1182  QString lblText = ui.lblTorStatus->text(); 
     1183  if(lblText.contains("\n")) { 
     1184    QStringList lblList = lblText.split("\n"); 
     1185    statustext = lblList.first(); 
     1186  } else { 
     1187    statustext = ui.lblTorStatus->text(); 
     1188  } 
     1189  ui.lblTorStatus->setText(statustext.append("\n"+ 
     1190   QString::number(amount)+" Hidden Service(s) running.")); 
     1191 
     1192 
  • vidalia/branches/hidden-services/src/vidalia/mainwindow.h

    r2362 r2969  
    104104  /** Called when the proxy server fails to start */ 
    105105  void onProxyFailed(QString errmsg); 
     106  /** Called to display the number of Hidden Services actually running */ 
     107  void updateHidServStatus(); 
    106108   
    107109private: