Changeset 2969
- Timestamp:
- 08/15/08 11:42:17 (3 months ago)
- Location:
- vidalia/branches/hidden-services/src/vidalia
- Files:
-
- 5 modified
-
config/configdialog.cpp (modified) (2 diffs)
-
config/configdialog.h (modified) (3 diffs)
-
config/servicepage.ui (modified) (7 diffs)
-
mainwindow.cpp (modified) (4 diffs)
-
mainwindow.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
vidalia/branches/hidden-services/src/vidalia/config/configdialog.cpp
r2553 r2969 52 52 ui.setupUi(this); 53 53 54 /* A reference to the parnet widget */ 55 //_parent = (MainWIndow)parent; 54 56 /* Override the QDialogButtonBox button text so we can use our own 55 57 * translations. */ … … 223 225 appliedChanges = true; 224 226 } 225 if (appliedChanges) 227 if (appliedChanges) { 226 228 saveConf(); 229 } 230 emit saved(); 227 231 close(); 228 232 } -
vidalia/branches/hidden-services/src/vidalia/config/configdialog.h
r2465 r2969 21 21 #include <QFileDialog> 22 22 #include <vidaliawindow.h> 23 //#include <mainwindow.h> 23 24 24 25 #include "generalpage.h" … … 71 72 void help(); 72 73 74 public: 75 76 signals: 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 73 81 private: 74 82 /** Loads the current configuration settings */ … … 78 86 /** Adds a new action to the toolbar. */ 79 87 void addAction(QAction *action, const char *slot = 0); 88 /** A reference to the parent widget*/ 89 //MainWindow* _parent; 80 90 81 91 /** Qt Designer generated object */ -
vidalia/branches/hidden-services/src/vidalia/config/servicepage.ui
r2959 r2969 107 107 </size> 108 108 </property> 109 <property name="toolTip" > 110 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 111 p, li { white-space: pre-wrap; } 112 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 113 <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.</p></body></html></string> 114 </property> 109 115 <property name="selectionMode" > 110 116 <enum>QAbstractItemView::SingleSelection</enum> … … 298 304 <item row="0" column="0" > 299 305 <widget class="QCheckBox" name="checkBox_basic" > 306 <property name="toolTip" > 307 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 308 p, li { white-space: pre-wrap; } 309 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 310 <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.</p></body></html></string> 311 </property> 300 312 <property name="text" > 301 313 <string>basic configuration</string> … … 305 317 <item row="0" column="1" > 306 318 <widget class="QCheckBox" name="checkBox_stealth" > 319 <property name="toolTip" > 320 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 321 p, li { white-space: pre-wrap; } 322 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 323 <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.</p></body></html></string> 324 </property> 307 325 <property name="text" > 308 326 <string>stealth configuration</string> … … 325 343 <height>16777215</height> 326 344 </size> 345 </property> 346 <property name="toolTip" > 347 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 348 p, li { white-space: pre-wrap; } 349 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 350 <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.</p></body></html></string> 327 351 </property> 328 352 <property name="selectionMode" > … … 449 473 </item> 450 474 <item row="1" column="0" > 451 <widget class="QLineEdit" name="authLineAccess" /> 475 <widget class="QLineEdit" name="authLineAccess" > 476 <property name="toolTip" > 477 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 478 p, li { white-space: pre-wrap; } 479 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 480 <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: &lt;onion-address&gt; &lt;descriptor-cookie&gt; allowed.</p></body></html></string> 481 </property> 482 </widget> 452 483 </item> 453 484 <item row="1" column="1" > 454 <widget class="QLineEdit" name="commentLineAccess" /> 485 <widget class="QLineEdit" name="commentLineAccess" > 486 <property name="toolTip" > 487 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 488 p, li { white-space: pre-wrap; } 489 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 490 <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.</p></body></html></string> 491 </property> 492 </widget> 455 493 </item> 456 494 </layout> … … 466 504 </sizepolicy> 467 505 </property> 506 <property name="toolTip" > 507 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 508 p, li { white-space: pre-wrap; } 509 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 510 <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.</p></body></html></string> 511 </property> 468 512 <property name="selectionMode" > 469 513 <enum>QAbstractItemView::SingleSelection</enum> … … 487 531 <widget class="QToolButton" name="addServiceAuthBtn" > 488 532 <property name="toolTip" > 489 <string>Add new service with authorization data</string> 533 <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> 534 p, li { white-space: pre-wrap; } 535 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> 536 <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</p></body></html></string> 490 537 </property> 491 538 <property name="text" > -
vidalia/branches/hidden-services/src/vidalia/mainwindow.cpp
r2362 r2969 787 787 } 788 788 } 789 ui.lblTorStatus->setText(ui.lblTorStatus->text().append("\n""0 Hidden Services running.")); 789 790 } 790 791 … … 1022 1023 updateTorStatus(CircuitEstablished); 1023 1024 startBrowser(); 1025 updateHidServStatus(); 1024 1026 } 1025 1027 … … 1096 1098 { 1097 1099 _configDialog->showWindow(page); 1100 connect(_configDialog, SIGNAL(saved()), this, SLOT(updateHidServStatus())); 1098 1101 } 1099 1102 … … 1169 1172 } 1170 1173 1171 1174 /** Called to display the number of Hidden Services actually running */ 1175 void 1176 MainWindow::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 104 104 /** Called when the proxy server fails to start */ 105 105 void onProxyFailed(QString errmsg); 106 /** Called to display the number of Hidden Services actually running */ 107 void updateHidServStatus(); 106 108 107 109 private:
