tor-commits
Threads by month
- ----- 2025 -----
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 1 participants
- 213385 discussions
commit 62c76582c3816e58f1108ffd095ca8aae92105fb
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sun Jun 12 13:18:36 2011 -0700
Binding handlers for the log submenu
---
src/cli/controller.py | 19 ++++-
src/cli/graphing/graphPanel.py | 11 +---
src/cli/logPanel.py | 160 +++++++++++++++++++++++++++-------------
src/cli/menu/actions.py | 56 +++++++++++----
src/cli/menu/menu.py | 4 +-
5 files changed, 168 insertions(+), 82 deletions(-)
diff --git a/src/cli/controller.py b/src/cli/controller.py
index cf17da3..6158ade 100644
--- a/src/cli/controller.py
+++ b/src/cli/controller.py
@@ -288,12 +288,27 @@ class Controller:
return allPanels
- def requestRedraw(self):
+ def requestRedraw(self, immediate = False):
"""
Requests that all content is redrawn when the interface is next rendered.
+
+ Arguments:
+ immediate - redraws now if true, otherwise waits for when next normally
+ drawn
"""
- self._forceRedraw = True
+ if immediate:
+ displayPanels = self.getDisplayPanels()
+
+ occupiedContent = 0
+ for panelImpl in displayPanels:
+ panelImpl.setTop(occupiedContent)
+ occupiedContent += panelImpl.getHeight()
+
+ for panelImpl in displayPanels:
+ panelImpl.redraw(True)
+ else:
+ self._forceRedraw = True
def isRedrawRequested(self, clearFlag = False):
"""
diff --git a/src/cli/graphing/graphPanel.py b/src/cli/graphing/graphPanel.py
index 69b9121..8c3adf7 100644
--- a/src/cli/graphing/graphPanel.py
+++ b/src/cli/graphing/graphPanel.py
@@ -307,16 +307,7 @@ class GraphPanel(panel.Panel):
panel.CURSES_LOCK.acquire()
try:
while True:
- # redraws the resized panels
- displayPanels = control.getDisplayPanels()
-
- occupiedContent = 0
- for panelImpl in displayPanels:
- panelImpl.setTop(occupiedContent)
- occupiedContent += panelImpl.getHeight()
-
- for panelImpl in displayPanels:
- panelImpl.redraw(True)
+ control.requestRedraw(True)
msg = "press the down/up to resize the graph, and enter when done"
control.setMsg(msg, curses.A_BOLD, True)
diff --git a/src/cli/logPanel.py b/src/cli/logPanel.py
index 6d54ab4..ef372ab 100644
--- a/src/cli/logPanel.py
+++ b/src/cli/logPanel.py
@@ -13,6 +13,7 @@ import threading
from TorCtl import TorCtl
import popups
+import cli.controller
from version import VERSION
from util import conf, log, panel, sysTools, torTools, uiTools
@@ -668,6 +669,17 @@ class LogPanel(panel.Panel, threading.Thread):
log.log(self._config["log.logPanel.logFileWriteFailed"], "Unable to write to log file: %s" % sysTools.getFileErrorMsg(exc))
self.logFile = None
+ def setDuplicateVisability(self, isVisible):
+ """
+ Sets if duplicate log entries are collaped or expanded.
+
+ Arguments:
+ isVisible - if true all log entries are shown, otherwise they're
+ deduplicated
+ """
+
+ self.showDuplicates = isVisible
+
def registerEvent(self, event):
"""
Notes event and redraws log. If paused it's held in a temporary buffer.
@@ -728,6 +740,13 @@ class LogPanel(panel.Panel, threading.Thread):
self.redraw(True)
self.valsLock.release()
+ def getFilter(self):
+ """
+ Provides our currently selected regex filter.
+ """
+
+ return self.filterOptions[0] if self.regexFilter else None
+
def setFilter(self, logFilter):
"""
Filters log entries according to the given regular expression.
@@ -744,6 +763,90 @@ class LogPanel(panel.Panel, threading.Thread):
self.redraw(True)
self.valsLock.release()
+ def makeFilterSelection(self, selectedOption):
+ """
+ Makes the given filter selection, applying it to the log and reorganizing
+ our filter selection.
+
+ Arguments:
+ selectedOption - regex filter we've already added, None if no filter
+ should be applied
+ """
+
+ if selectedOption:
+ try:
+ self.setFilter(re.compile(selectedOption))
+
+ # move selection to top
+ self.filterOptions.remove(selectedOption)
+ self.filterOptions.insert(0, selectedOption)
+ except re.error, exc:
+ # shouldn't happen since we've already checked validity
+ msg = "Invalid regular expression ('%s': %s) - removing from listing" % (selectedOption, exc)
+ log.log(log.WARN, msg)
+ self.filterOptions.remove(selectedOption)
+ else: self.setFilter(None)
+
+ def showFilterPrompt(self):
+ """
+ Prompts the user to add a new regex filter.
+ """
+
+ cli.controller.getController().requestRedraw(True)
+ regexInput = popups.inputPrompt("Regular expression: ")
+
+ if regexInput:
+ try:
+ self.setFilter(re.compile(regexInput))
+ if regexInput in self.filterOptions: self.filterOptions.remove(regexInput)
+ self.filterOptions.insert(0, regexInput)
+ except re.error, exc:
+ popups.showMsg("Unable to compile expression: %s" % exc, 2)
+
+ def showEventSelectionPrompt(self):
+ """
+ Prompts the user to select the events being listened for.
+ """
+
+ # allow user to enter new types of events to log - unchanged if left blank
+ cli.controller.getController().requestRedraw(True)
+ popup, width, height = popups.init(11, 80)
+
+ if popup:
+ try:
+ # displays the available flags
+ popup.win.box()
+ popup.addstr(0, 0, "Event Types:", curses.A_STANDOUT)
+ eventLines = EVENT_LISTING.split("\n")
+
+ for i in range(len(eventLines)):
+ popup.addstr(i + 1, 1, eventLines[i][6:])
+
+ popup.win.refresh()
+
+ userInput = popups.inputPrompt("Events to log: ")
+ if userInput:
+ userInput = userInput.replace(' ', '') # strips spaces
+ try: self.setLoggedEvents(expandEvents(userInput))
+ except ValueError, exc:
+ popups.showMsg("Invalid flags: %s" % str(exc), 2)
+ finally: popups.finalize()
+
+ def showSnapshotPrompt(self):
+ """
+ Lets user enter a path to take a snapshot, canceling if left blank.
+ """
+
+ cli.controller.getController().requestRedraw(True)
+ pathInput = popups.inputPrompt("Path to save log snapshot: ")
+
+ if pathInput:
+ try:
+ self.saveSnapshot(pathInput)
+ popups.showMsg("Saved: %s" % pathInput, 2)
+ except IOError, exc:
+ popups.showMsg("Unable to save snapshot: %s" % sysTools.getFileErrorMsg(exc), 2)
+
def clear(self):
"""
Clears the contents of the event log.
@@ -817,66 +920,17 @@ class LogPanel(panel.Panel, threading.Thread):
self.setFilter(None)
elif selection == len(options) - 1:
# selected 'New...' option - prompt user to input regular expression
- regexInput = popups.inputPrompt("Regular expression: ")
-
- if regexInput:
- try:
- self.setFilter(re.compile(regexInput))
- if regexInput in self.filterOptions: self.filterOptions.remove(regexInput)
- self.filterOptions.insert(0, regexInput)
- except re.error, exc:
- popups.showMsg("Unable to compile expression: %s" % exc, 2)
+ self.showFilterPrompt()
elif selection != -1:
- selectedOption = self.filterOptions[selection - 1]
-
- try:
- self.setFilter(re.compile(selectedOption))
-
- # move selection to top
- self.filterOptions.remove(selectedOption)
- self.filterOptions.insert(0, selectedOption)
- except re.error, exc:
- # shouldn't happen since we've already checked validity
- msg = "Invalid regular expression ('%s': %s) - removing from listing" % (selectedOption, exc)
- log.log(log.WARN, msg)
- self.filterOptions.remove(selectedOption)
+ self.makeFilterSelection(self.filterOptions[selection - 1])
finally:
panel.CURSES_LOCK.release()
if len(self.filterOptions) > MAX_REGEX_FILTERS: del self.filterOptions[MAX_REGEX_FILTERS:]
elif key == ord('e') or key == ord('E'):
- # allow user to enter new types of events to log - unchanged if left blank
- popup, width, height = popups.init(11, 80)
-
- if popup:
- try:
- # displays the available flags
- popup.win.box()
- popup.addstr(0, 0, "Event Types:", curses.A_STANDOUT)
- eventLines = EVENT_LISTING.split("\n")
-
- for i in range(len(eventLines)):
- popup.addstr(i + 1, 1, eventLines[i][6:])
-
- popup.win.refresh()
-
- userInput = popups.inputPrompt("Events to log: ")
- if userInput:
- userInput = userInput.replace(' ', '') # strips spaces
- try: self.setLoggedEvents(expandEvents(userInput))
- except ValueError, exc:
- popups.showMsg("Invalid flags: %s" % str(exc), 2)
- finally: popups.finalize()
+ self.showEventSelectionPrompt()
elif key == ord('a') or key == ord('A'):
- # lets user enter a path to take a snapshot, canceling if left blank
- pathInput = popups.inputPrompt("Path to save log snapshot: ")
-
- if pathInput:
- try:
- self.saveSnapshot(pathInput)
- popups.showMsg("Saved: %s" % pathInput, 2)
- except IOError, exc:
- popups.showMsg("Unable to save snapshot: %s" % sysTools.getFileErrorMsg(exc), 2)
+ self.showSnapshotPrompt()
else: isKeystrokeConsumed = False
return isKeystrokeConsumed
diff --git a/src/cli/menu/actions.py b/src/cli/menu/actions.py
index 9d69cb4..c8b8da3 100644
--- a/src/cli/menu/actions.py
+++ b/src/cli/menu/actions.py
@@ -24,18 +24,8 @@ def makeMenu():
for pagePanel in control.getDisplayPanels(includeSticky = False):
if pagePanel.getName() == "graph":
baseMenu.add(makeGraphMenu(pagePanel))
-
- logsMenu = cli.menu.item.Submenu("Logs")
- logsMenu.add(cli.menu.item.MenuItem("Events", None))
- logsMenu.add(cli.menu.item.MenuItem("Clear", None))
- logsMenu.add(cli.menu.item.MenuItem("Save", None))
- logsMenu.add(cli.menu.item.MenuItem("Filter", None))
-
- duplicatesSubmenu = cli.menu.item.Submenu("Duplicates")
- duplicatesSubmenu.add(cli.menu.item.MenuItem("Hidden", None))
- duplicatesSubmenu.add(cli.menu.item.MenuItem("Visible", None))
- logsMenu.add(duplicatesSubmenu)
- baseMenu.add(logsMenu)
+ elif pagePanel.getName() == "log":
+ baseMenu.add(makeLogMenu(pagePanel))
connectionsMenu = cli.menu.item.Submenu("Connections")
connectionsMenu.add(cli.menu.item.MenuItem("Identity", None))
@@ -117,7 +107,7 @@ def makeGraphMenu(graphPanel):
[X] <Stat 1>
[ ] <Stat 2>
[ ] <Stat 2>
- Resize
+ Resize...
Interval (Submenu)
Bounds (Submenu)
@@ -138,7 +128,7 @@ def makeGraphMenu(graphPanel):
graphMenu.add(cli.menu.item.SelectionMenuItem(label, statGroup, statKey))
# resizing option
- graphMenu.add(cli.menu.item.MenuItem("Resize", graphPanel.resizeGraph))
+ graphMenu.add(cli.menu.item.MenuItem("Resize...", graphPanel.resizeGraph))
# interval submenu
intervalMenu = cli.menu.item.Submenu("Interval")
@@ -162,3 +152,41 @@ def makeGraphMenu(graphPanel):
return graphMenu
+def makeLogMenu(logPanel):
+ """
+ Submenu for the log panel, consisting of...
+ Events...
+ Snapshot...
+ Clear
+ Show / Hide Duplicates
+ Filter (Submenu)
+
+ Arguments:
+ logPanel - instance of the log panel
+ """
+
+ logMenu = cli.menu.item.Submenu("Log")
+
+ logMenu.add(cli.menu.item.MenuItem("Events...", logPanel.showEventSelectionPrompt))
+ logMenu.add(cli.menu.item.MenuItem("Snapshot...", logPanel.showSnapshotPrompt))
+ logMenu.add(cli.menu.item.MenuItem("Clear", logPanel.clear))
+
+ if logPanel.showDuplicates: label, arg = "Hide", False
+ else: label, arg = "Show", True
+ logMenu.add(cli.menu.item.MenuItem("%s Duplicates" % label, functools.partial(logPanel.setDuplicateVisability, arg)))
+
+ # filter submenu
+ filterMenu = cli.menu.item.Submenu("Filter")
+ filterGroup = cli.menu.item.SelectionGroup(logPanel.makeFilterSelection, logPanel.getFilter())
+
+ filterMenu.add(cli.menu.item.SelectionMenuItem("None", filterGroup, None))
+
+ for option in logPanel.filterOptions:
+ filterMenu.add(cli.menu.item.SelectionMenuItem(option, filterGroup, option))
+
+ filterMenu.add(cli.menu.item.MenuItem("New...", logPanel.showFilterPrompt))
+ logMenu.add(filterMenu)
+
+ return logMenu
+
+
diff --git a/src/cli/menu/menu.py b/src/cli/menu/menu.py
index e0728e8..b411a9c 100644
--- a/src/cli/menu/menu.py
+++ b/src/cli/menu/menu.py
@@ -110,9 +110,7 @@ def showMenu():
cursor.handleKey(key)
# redraws the rest of the interface if we're rendering on it again
- if not cursor.isDone():
- for panelImpl in control.getDisplayPanels():
- panelImpl.redraw(True)
+ if not cursor.isDone(): control.requestRedraw(True)
finally:
control.setMsg()
cli.popups.finalize()
1
0

12 Jun '11
commit 6ae0b6e6aa1481718443f3e367a91d15a5bdaa6f
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sun Jun 12 13:48:13 2011 -0700
Binding handlers for the connections submenu
---
src/cli/connections/connPanel.py | 30 +++++++++++++++++-----
src/cli/menu/actions.py | 50 ++++++++++++++++++++++++++++++++-----
src/util/connections.py | 19 ++++++++++++++
3 files changed, 85 insertions(+), 14 deletions(-)
diff --git a/src/cli/connections/connPanel.py b/src/cli/connections/connPanel.py
index 8b86c65..9490ddc 100644
--- a/src/cli/connections/connPanel.py
+++ b/src/cli/connections/connPanel.py
@@ -6,6 +6,7 @@ import time
import curses
import threading
+import cli.controller
import cli.descriptorPopup
import cli.popups
@@ -124,6 +125,13 @@ class ConnectionPanel(panel.Panel, threading.Thread):
self._entryLines += entry.getLines()
self.valsLock.release()
+ def getListingType(self):
+ """
+ Provides the priority content we list connections by.
+ """
+
+ return self._listingType
+
def setListingType(self, listingType):
"""
Sets the priority information presented by the panel.
@@ -143,6 +151,20 @@ class ConnectionPanel(panel.Panel, threading.Thread):
self.valsLock.release()
+ def showSortDialog(self):
+ """
+ Provides the sort dialog for our connections.
+ """
+
+ # set ordering for connection options
+ cli.controller.getController().requestRedraw(True)
+ titleLabel = "Connection Ordering:"
+ options = entries.SortAttr.values()
+ oldSelection = self._sortOrdering
+ optionColors = dict([(attr, entries.SORT_COLORS[attr]) for attr in options])
+ results = cli.popups.showSortDialog(titleLabel, options, oldSelection, optionColors)
+ if results: self.setSortOrder(results)
+
def handleKey(self, key):
self.valsLock.acquire()
@@ -156,13 +178,7 @@ class ConnectionPanel(panel.Panel, threading.Thread):
self._showDetails = not self._showDetails
self.redraw(True)
elif key == ord('s') or key == ord('S'):
- # set ordering for connection options
- titleLabel = "Connection Ordering:"
- options = entries.SortAttr.values()
- oldSelection = self._sortOrdering
- optionColors = dict([(attr, entries.SORT_COLORS[attr]) for attr in options])
- results = cli.popups.showSortDialog(titleLabel, options, oldSelection, optionColors)
- if results: self.setSortOrder(results)
+ self.showSortDialog()
elif key == ord('u') or key == ord('U'):
# provides a menu to pick the connection resolver
title = "Resolver Util:"
diff --git a/src/cli/menu/actions.py b/src/cli/menu/actions.py
index c8b8da3..2827742 100644
--- a/src/cli/menu/actions.py
+++ b/src/cli/menu/actions.py
@@ -8,7 +8,7 @@ import cli.controller
import cli.menu.item
import cli.graphing.graphPanel
-from util import torTools, uiTools
+from util import connections, torTools, uiTools
def makeMenu():
"""
@@ -26,12 +26,8 @@ def makeMenu():
baseMenu.add(makeGraphMenu(pagePanel))
elif pagePanel.getName() == "log":
baseMenu.add(makeLogMenu(pagePanel))
-
- connectionsMenu = cli.menu.item.Submenu("Connections")
- connectionsMenu.add(cli.menu.item.MenuItem("Identity", None))
- connectionsMenu.add(cli.menu.item.MenuItem("Resolver", None))
- connectionsMenu.add(cli.menu.item.MenuItem("Sort Order", None))
- baseMenu.add(connectionsMenu)
+ elif pagePanel.getName() == "connections":
+ baseMenu.add(makeConnectionsMenu(pagePanel))
configurationMenu = cli.menu.item.Submenu("Configuration")
@@ -188,5 +184,45 @@ def makeLogMenu(logPanel):
logMenu.add(filterMenu)
return logMenu
+
+def makeConnectionsMenu(connPanel):
+ """
+ Submenu for the connections panel, consisting of...
+ [X] IP Address
+ [ ] Fingerprint
+ [ ] Nickname
+ Sorting...
+ Resolver (Submenu)
+
+ Arguments:
+ connPanel - instance of the connections panel
+ """
+
+ connectionsMenu = cli.menu.item.Submenu("Connections")
+
+ # listing options
+ listingGroup = cli.menu.item.SelectionGroup(connPanel.setListingType, connPanel.getListingType())
+
+ listingOptions = cli.connections.entries.ListingType.values()
+ listingOptions.remove(cli.connections.entries.ListingType.HOSTNAME)
+
+ for option in listingOptions:
+ connectionsMenu.add(cli.menu.item.SelectionMenuItem(option, listingGroup, option))
+
+ # sorting option
+ connectionsMenu.add(cli.menu.item.MenuItem("Sorting...", connPanel.showSortDialog))
+
+ # resolver submenu
+ connResolver = connections.getResolver("tor")
+ resolverMenu = cli.menu.item.Submenu("Resolver")
+ resolverGroup = cli.menu.item.SelectionGroup(connResolver.setOverwriteResolver, connResolver.getOverwriteResolver())
+
+ resolverMenu.add(cli.menu.item.SelectionMenuItem("auto", resolverGroup, None))
+
+ for option in connections.Resolver.values():
+ resolverMenu.add(cli.menu.item.SelectionMenuItem(option, resolverGroup, option))
+
+ connectionsMenu.add(resolverMenu)
+ return connectionsMenu
diff --git a/src/util/connections.py b/src/util/connections.py
index 47aa8af..97de3ea 100644
--- a/src/util/connections.py
+++ b/src/util/connections.py
@@ -444,6 +444,25 @@ class ConnectionResolver(threading.Thread):
# avoid having stray spikes up the rate.
self._rateThresholdBroken = 0
+ def getOverwriteResolver(self):
+ """
+ Provides the resolver connection resolution is forced to use. This returns
+ None if it's dynamically determined.
+ """
+
+ return self.overwriteResolver
+
+ def setOverwriteResolver(self, overwriteResolver):
+ """
+ Sets the resolver used for connection resolution, if None then this is
+ automatically determined based on what is available.
+
+ Arguments:
+ overwriteResolver - connection resolver to be used
+ """
+
+ self.overwriteResolver = overwriteResolver
+
def run(self):
while not self._halt:
minWait = self.resolveRate if self.resolveRate else self.defaultRate
1
0

12 Jun '11
commit 93875272baf20437578a4b3e18e4b39a8a9efb9e
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sun Jun 12 14:08:31 2011 -0700
Binding handlers for the configuration submenu
---
src/cli/configPanel.py | 232 ++++++++++++++++++++++++++---------------------
src/cli/menu/actions.py | 34 +++++--
2 files changed, 153 insertions(+), 113 deletions(-)
diff --git a/src/cli/configPanel.py b/src/cli/configPanel.py
index c2e290d..4647286 100644
--- a/src/cli/configPanel.py
+++ b/src/cli/configPanel.py
@@ -6,7 +6,7 @@ and the resulting configuration files saved.
import curses
import threading
-import controller
+import cli.controller
import popups
from util import conf, enum, panel, sysTools, torConfig, torTools, uiTools
@@ -242,6 +242,17 @@ class ConfigPanel(panel.Panel):
return self.scroller.getCursorSelection(self._getConfigOptions())
+ def setFiltering(self, isFiltered):
+ """
+ Sets if configuration options are filtered or not.
+
+ Arguments:
+ isFiltered - if true then only relatively important options will be
+ shown, otherwise everything is shown
+ """
+
+ self.showAll = not isFiltered
+
def setSortOrder(self, ordering = None):
"""
Sets the configuration attributes we're sorting by and resorts the
@@ -258,6 +269,24 @@ class ConfigPanel(panel.Panel):
self.confImportantContents.sort(key=lambda i: (i.getAll(self.sortOrdering)))
self.valsLock.release()
+ def showSortDialog(self):
+ """
+ Provides the sort dialog for our configuration options.
+ """
+
+ # set ordering for config options
+ cli.controller.getController().requestRedraw(True)
+ titleLabel = "Config Option Ordering:"
+ options = [FIELD_ATTR[field][0] for field in Field.values()]
+ oldSelection = [FIELD_ATTR[field][0] for field in self.sortOrdering]
+ optionColors = dict([FIELD_ATTR[field] for field in Field.values()])
+ results = popups.showSortDialog(titleLabel, options, oldSelection, optionColors)
+
+ if results:
+ # converts labels back to enums
+ resultEnums = [getFieldFromLabel(label) for label in results]
+ self.setSortOrder(resultEnums)
+
def handleKey(self, key):
self.valsLock.acquire()
isKeystrokeConsumed = True
@@ -313,118 +342,117 @@ class ConfigPanel(panel.Panel):
self.showAll = not self.showAll
self.redraw(True)
elif key == ord('s') or key == ord('S'):
- # set ordering for config options
- titleLabel = "Config Option Ordering:"
- options = [FIELD_ATTR[field][0] for field in Field.values()]
- oldSelection = [FIELD_ATTR[field][0] for field in self.sortOrdering]
- optionColors = dict([FIELD_ATTR[field] for field in Field.values()])
- results = popups.showSortDialog(titleLabel, options, oldSelection, optionColors)
-
- if results:
- # converts labels back to enums
- resultEnums = [getFieldFromLabel(label) for label in results]
- self.setSortOrder(resultEnums)
+ self.showSortDialog()
elif key == ord('w') or key == ord('W'):
- # display a popup for saving the current configuration
- configLines = torConfig.getCustomOptions(True)
- popup, width, height = popups.init(len(configLines) + 2)
- if not popup: return
+ self.showWriteDialog()
+ else: isKeystrokeConsumed = False
+
+ self.valsLock.release()
+ return isKeystrokeConsumed
+
+ def showWriteDialog(self):
+ """
+ Provies an interface to confirm if the configuration is saved and, if so,
+ where.
+ """
+
+ # display a popup for saving the current configuration
+ cli.controller.getController().requestRedraw(True)
+ configLines = torConfig.getCustomOptions(True)
+ popup, width, height = popups.init(len(configLines) + 2)
+ if not popup: return
+
+ try:
+ # displayed options (truncating the labels if there's limited room)
+ if width >= 30: selectionOptions = ("Save", "Save As...", "Cancel")
+ else: selectionOptions = ("Save", "Save As", "X")
- try:
- # displayed options (truncating the labels if there's limited room)
- if width >= 30: selectionOptions = ("Save", "Save As...", "Cancel")
- else: selectionOptions = ("Save", "Save As", "X")
+ # checks if we can show options beside the last line of visible content
+ isOptionLineSeparate = False
+ lastIndex = min(height - 2, len(configLines) - 1)
+
+ # if we don't have room to display the selection options and room to
+ # grow then display the selection options on its own line
+ if width < (30 + len(configLines[lastIndex])):
+ popup.setHeight(height + 1)
+ popup.redraw(True) # recreates the window instance
+ newHeight, _ = popup.getPreferredSize()
- # checks if we can show options beside the last line of visible content
- isOptionLineSeparate = False
- lastIndex = min(height - 2, len(configLines) - 1)
+ if newHeight > height:
+ height = newHeight
+ isOptionLineSeparate = True
+
+ key, selection = 0, 2
+ while not uiTools.isSelectionKey(key):
+ # if the popup has been resized then recreate it (needed for the
+ # proper border height)
+ newHeight, newWidth = popup.getPreferredSize()
+ if (height, width) != (newHeight, newWidth):
+ height, width = newHeight, newWidth
+ popup.redraw(True)
- # if we don't have room to display the selection options and room to
- # grow then display the selection options on its own line
- if width < (30 + len(configLines[lastIndex])):
- popup.setHeight(height + 1)
- popup.redraw(True) # recreates the window instance
- newHeight, _ = popup.getPreferredSize()
-
- if newHeight > height:
- height = newHeight
- isOptionLineSeparate = True
+ # if there isn't room to display the popup then cancel it
+ if height <= 2:
+ selection = 2
+ break
- key, selection = 0, 2
- while not uiTools.isSelectionKey(key):
- # if the popup has been resized then recreate it (needed for the
- # proper border height)
- newHeight, newWidth = popup.getPreferredSize()
- if (height, width) != (newHeight, newWidth):
- height, width = newHeight, newWidth
- popup.redraw(True)
-
- # if there isn't room to display the popup then cancel it
- if height <= 2:
- selection = 2
- break
-
- popup.win.erase()
- popup.win.box()
- popup.addstr(0, 0, "Configuration being saved:", curses.A_STANDOUT)
+ popup.win.erase()
+ popup.win.box()
+ popup.addstr(0, 0, "Configuration being saved:", curses.A_STANDOUT)
+
+ visibleConfigLines = height - 3 if isOptionLineSeparate else height - 2
+ for i in range(visibleConfigLines):
+ line = uiTools.cropStr(configLines[i], width - 2)
- visibleConfigLines = height - 3 if isOptionLineSeparate else height - 2
- for i in range(visibleConfigLines):
- line = uiTools.cropStr(configLines[i], width - 2)
-
- if " " in line:
- option, arg = line.split(" ", 1)
- popup.addstr(i + 1, 1, option, curses.A_BOLD | uiTools.getColor("green"))
- popup.addstr(i + 1, len(option) + 2, arg, curses.A_BOLD | uiTools.getColor("cyan"))
- else:
- popup.addstr(i + 1, 1, line, curses.A_BOLD | uiTools.getColor("green"))
+ if " " in line:
+ option, arg = line.split(" ", 1)
+ popup.addstr(i + 1, 1, option, curses.A_BOLD | uiTools.getColor("green"))
+ popup.addstr(i + 1, len(option) + 2, arg, curses.A_BOLD | uiTools.getColor("cyan"))
+ else:
+ popup.addstr(i + 1, 1, line, curses.A_BOLD | uiTools.getColor("green"))
+
+ # draws selection options (drawn right to left)
+ drawX = width - 1
+ for i in range(len(selectionOptions) - 1, -1, -1):
+ optionLabel = selectionOptions[i]
+ drawX -= (len(optionLabel) + 2)
- # draws selection options (drawn right to left)
- drawX = width - 1
- for i in range(len(selectionOptions) - 1, -1, -1):
- optionLabel = selectionOptions[i]
- drawX -= (len(optionLabel) + 2)
-
- # if we've run out of room then drop the option (this will only
- # occure on tiny displays)
- if drawX < 1: break
-
- selectionFormat = curses.A_STANDOUT if i == selection else curses.A_NORMAL
- popup.addstr(height - 2, drawX, "[")
- popup.addstr(height - 2, drawX + 1, optionLabel, selectionFormat | curses.A_BOLD)
- popup.addstr(height - 2, drawX + len(optionLabel) + 1, "]")
-
- drawX -= 1 # space gap between the options
+ # if we've run out of room then drop the option (this will only
+ # occure on tiny displays)
+ if drawX < 1: break
- popup.win.refresh()
+ selectionFormat = curses.A_STANDOUT if i == selection else curses.A_NORMAL
+ popup.addstr(height - 2, drawX, "[")
+ popup.addstr(height - 2, drawX + 1, optionLabel, selectionFormat | curses.A_BOLD)
+ popup.addstr(height - 2, drawX + len(optionLabel) + 1, "]")
- key = controller.getController().getScreen().getch()
- if key == curses.KEY_LEFT: selection = max(0, selection - 1)
- elif key == curses.KEY_RIGHT: selection = min(len(selectionOptions) - 1, selection + 1)
+ drawX -= 1 # space gap between the options
- if selection in (0, 1):
- loadedTorrc, promptCanceled = torConfig.getTorrc(), False
- try: configLocation = loadedTorrc.getConfigLocation()
- except IOError: configLocation = ""
-
- if selection == 1:
- # prompts user for a configuration location
- configLocation = popups.inputPrompt("Save to (esc to cancel): ", configLocation)
- if not configLocation: promptCanceled = True
+ popup.win.refresh()
+
+ key = cli.controller.getController().getScreen().getch()
+ if key == curses.KEY_LEFT: selection = max(0, selection - 1)
+ elif key == curses.KEY_RIGHT: selection = min(len(selectionOptions) - 1, selection + 1)
+
+ if selection in (0, 1):
+ loadedTorrc, promptCanceled = torConfig.getTorrc(), False
+ try: configLocation = loadedTorrc.getConfigLocation()
+ except IOError: configLocation = ""
+
+ if selection == 1:
+ # prompts user for a configuration location
+ configLocation = popups.inputPrompt("Save to (esc to cancel): ", configLocation)
+ if not configLocation: promptCanceled = True
+
+ if not promptCanceled:
+ try:
+ torConfig.saveConf(configLocation, configLines)
+ msg = "Saved configuration to %s" % configLocation
+ except IOError, exc:
+ msg = "Unable to save configuration (%s)" % sysTools.getFileErrorMsg(exc)
- if not promptCanceled:
- try:
- torConfig.saveConf(configLocation, configLines)
- msg = "Saved configuration to %s" % configLocation
- except IOError, exc:
- msg = "Unable to save configuration (%s)" % sysTools.getFileErrorMsg(exc)
-
- popups.showMsg(msg, 2)
- finally: popups.finalize()
- else: isKeystrokeConsumed = False
-
- self.valsLock.release()
- return isKeystrokeConsumed
+ popups.showMsg(msg, 2)
+ finally: popups.finalize()
def getHelp(self):
options = []
diff --git a/src/cli/menu/actions.py b/src/cli/menu/actions.py
index 2827742..2072ead 100644
--- a/src/cli/menu/actions.py
+++ b/src/cli/menu/actions.py
@@ -28,17 +28,8 @@ def makeMenu():
baseMenu.add(makeLogMenu(pagePanel))
elif pagePanel.getName() == "connections":
baseMenu.add(makeConnectionsMenu(pagePanel))
-
- configurationMenu = cli.menu.item.Submenu("Configuration")
-
- commentsSubmenu = cli.menu.item.Submenu("Comments")
- commentsSubmenu.add(cli.menu.item.MenuItem("Hidden", None))
- commentsSubmenu.add(cli.menu.item.MenuItem("Visible", None))
- configurationMenu.add(commentsSubmenu)
-
- configurationMenu.add(cli.menu.item.MenuItem("Reload", None))
- configurationMenu.add(cli.menu.item.MenuItem("Reset Tor", None))
- baseMenu.add(configurationMenu)
+ elif pagePanel.getName() == "configuration":
+ baseMenu.add(makeConfigurationMenu(pagePanel))
return baseMenu
@@ -226,3 +217,24 @@ def makeConnectionsMenu(connPanel):
return connectionsMenu
+def makeConfigurationMenu(configPanel):
+ """
+ Submenu for the configuration panel, consisting of...
+ Save Config...
+ Sorting...
+ Filter / Unfilter Options
+
+ Arguments:
+ configPanel - instance of the configuration panel
+ """
+
+ configMenu = cli.menu.item.Submenu("Configuration")
+ configMenu.add(cli.menu.item.MenuItem("Save Config...", configPanel.showWriteDialog))
+ configMenu.add(cli.menu.item.MenuItem("Sorting...", configPanel.showSortDialog))
+
+ if configPanel.showAll: label, arg = "Filter", True
+ else: label, arg = "Unfilter", False
+ configMenu.add(cli.menu.item.MenuItem("%s Options" % label, functools.partial(configPanel.setFiltering, arg)))
+
+ return configMenu
+
1
0

12 Jun '11
commit ee578dbb494ca89512556cc50efcc78dc60f910c
Author: Jason Klein <trac.torproject.org(a)my.jrklein.com>
Date: Wed Apr 20 16:55:29 2011 -0500
Vidalia: Improved Parameter Handling (#2965)
Vidalia ignores parameters and values that are separated by an equal sign.
(ie: Vidalia --datadir=data --logfile=log)
Attached patch updates parseArguments() to support keys and values separated by equal sign.
Vidalia does not reject parameters that should include a value.
(ie: Vidalia --datadir --logfile)
Attached patch calls argNeedsValue() from validateArguments() to determine if value is required. Vidalia notifies user if required parameter value is missing.
NOTE: validateArguments() was static, so could not call argNeedsValue(). No longer static. If function needs to be static, could pass an instance of Vidalia as a function parameter instead.
---
src/vidalia/Vidalia.cpp | 16 ++++++++++++++++
src/vidalia/Vidalia.h | 2 +-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/vidalia/Vidalia.cpp b/src/vidalia/Vidalia.cpp
index c763fac..53b41c9 100644
--- a/src/vidalia/Vidalia.cpp
+++ b/src/vidalia/Vidalia.cpp
@@ -252,6 +252,12 @@ Vidalia::parseArguments(QStringList args)
if (arg.startsWith("-")) {
arg = arg.mid((arg.startsWith("--") ? 2 : 1));
}
+ /* Argument names do not include equal sign. Assume value follows. */
+ if (arg.indexOf("=") > -1) {
+ value = arg.right(arg.length() - (arg.indexOf("=")+1));
+ arg = arg.left(arg.indexOf("="));
+ }
+ else
/* Check if it takes a value and there is one on the command-line */
if (i < args.size()-1 && argNeedsValue(arg)) {
value = args.at(++i);
@@ -265,6 +271,16 @@ Vidalia::parseArguments(QStringList args)
bool
Vidalia::validateArguments(QString &errmsg)
{
+ /* Check for missing parameter values */
+ QMapIterator<QString, QString> _i(_args);
+ QString tmp;
+ while(_i.hasNext()) {
+ _i.next();
+ if(argNeedsValue(_i.key()) && (_i.value() == "")) {
+ errmsg = tr("Value required for parameter :") + _i.key();
+ return false;
+ }
+ }
/* Check for a language that Vidalia recognizes. */
if (_args.contains(ARG_LANGUAGE) &&
!LanguageSupport::isValidLanguageCode(_args.value(ARG_LANGUAGE))) {
diff --git a/src/vidalia/Vidalia.h b/src/vidalia/Vidalia.h
index 421ae68..b7d09f4 100644
--- a/src/vidalia/Vidalia.h
+++ b/src/vidalia/Vidalia.h
@@ -54,7 +54,7 @@ public:
~Vidalia();
/** Validates that all arguments were well-formed. */
- static bool validateArguments(QString &errmsg);
+ bool validateArguments(QString &errmsg);
/** Displays usage information for command-line args. */
static void showUsageMessageBox();
/** Returns true if the user wants to see usage information. */
1
0

12 Jun '11
commit 3548c24b095e458251692ae2b053504898a025c2
Author: Tomas Touceda <chiiph(a)gentoo.org>
Date: Sat May 21 13:06:35 2011 -0300
Modifies when to change the torrc setting
If Vidalia is running Tor or it isn't connected yet, do it. Otherwise,
users that start Tor manually won't be able to change this setting.
---
src/vidalia/config/AdvancedPage.cpp | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/vidalia/config/AdvancedPage.cpp b/src/vidalia/config/AdvancedPage.cpp
index 1fda8ad..a879ecc 100644
--- a/src/vidalia/config/AdvancedPage.cpp
+++ b/src/vidalia/config/AdvancedPage.cpp
@@ -165,16 +165,18 @@ AdvancedPage::save(QString &errmsg)
/* Only remember the torrc and datadir values if Vidalia started Tor, or
* if the user changed the displayed values. */
- if (Vidalia::torControl()->isVidaliaRunningTor() or
- not Vidalia::torControl()->isRunning()) {
+ if (Vidalia::torControl()->isVidaliaRunningTor() or
+ !Vidalia::torControl()->isConnected()) {
QString torrc = ui.lineTorConfig->text();
if (torrc != _settings->getTorrc()) {
_settings->setTorrc(torrc);
- QMessageBox::StandardButtons res = QMessageBox::question(this, tr("Warning"),
- tr("You changed torrc path, would you like to restart Tor?"),
- QMessageBox::Yes | QMessageBox::No);
- if(res == QMessageBox::Yes)
- emit restartTor();
+ if(Vidalia::torControl()->isConnected()) {
+ QMessageBox::StandardButtons res = QMessageBox::question(this, tr("Warning"),
+ tr("You changed torrc path, would you like to restart Tor?"),
+ QMessageBox::Yes | QMessageBox::No);
+ if(res == QMessageBox::Yes)
+ emit restartTor();
+ }
}
QString dataDir = ui.lineTorDataDirectory->text();
1
0

12 Jun '11
commit 58790784cfa1bf8facb5a28e6d5bb8b7bf74c229
Author: Tomas Touceda <chiiph(a)gentoo.org>
Date: Sat May 21 13:39:15 2011 -0300
Improve DirPort and MirrorDirectory behavior
To be clearer about those values when setting up a bridge, they are empied.
Otherwise it may let the user believe that the values are fixed, not
ignored as they are.
---
src/vidalia/config/ServerPage.cpp | 21 ++++++++++++++++++++-
src/vidalia/config/ServerPage.h | 6 ++++++
2 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/src/vidalia/config/ServerPage.cpp b/src/vidalia/config/ServerPage.cpp
index f15268f..32dc152 100644
--- a/src/vidalia/config/ServerPage.cpp
+++ b/src/vidalia/config/ServerPage.cpp
@@ -121,6 +121,9 @@ ServerPage::ServerPage(QWidget *parent)
ui.chkEnableUpnp->setVisible(false);
ui.btnTestUpnp->setVisible(false);
#endif
+
+ _tmpDirPort = "9030";
+ _tmpMirror = true;
}
/** Destructor */
@@ -235,12 +238,28 @@ ServerPage::serverModeChanged(bool enabled)
ui.lblBridgeUsage->setVisible(bridgeEnabled
&& Vidalia::torControl()->isConnected());
- ui.lineDirPort->setEnabled(!bridgeEnabled);
+ if(bridgeEnabled) {
+ if(ui.lineDirPort->text().length() != 0) {
+ _tmpDirPort = ui.lineDirPort->text();
+ _tmpMirror = ui.chkMirrorDirectory->isChecked();
+ }
+ ui.lineDirPort->clear();
+ ui.chkMirrorDirectory->setChecked(false);
+ } else {
+ ui.lineDirPort->setText(_tmpDirPort);
+ ui.chkMirrorDirectory->setChecked(_tmpMirror);
+ }
+
ui.chkMirrorDirectory->setEnabled(!bridgeEnabled);
/* Disable the Exit Policies tab when bridge or non-exit relay mode is
* selected */
ui.tabsMenu->setTabEnabled(2, !bridgeEnabled and !ui.rdoNonExitMode->isChecked());
+
+ if(ui.chkMirrorDirectory->isChecked()) {
+ ui.lblDirPort->setEnabled(!bridgeEnabled);
+ ui.lineDirPort->setEnabled(!bridgeEnabled);
+ }
}
/** Returns true if the user has changed their server settings since the
diff --git a/src/vidalia/config/ServerPage.h b/src/vidalia/config/ServerPage.h
index 03e4938..54549a2 100644
--- a/src/vidalia/config/ServerPage.h
+++ b/src/vidalia/config/ServerPage.h
@@ -120,6 +120,12 @@ private:
/** Qt Designer generated object */
Ui::ServerPage ui;
+
+ /** Used to store the dirport value and if the user wants to mirror the
+ * directory so that they can be emptied when selecting being a bridge and
+ * re-added when selecting relay */
+ QString _tmpDirPort;
+ bool _tmpMirror;
};
#endif
1
0

[vidalia/alpha] uncomment the -no-remote command line in order to make it possible to launch multiple Firefox after TBB is launched. fixes bug #2254
by chiiph@torproject.org 12 Jun '11
by chiiph@torproject.org 12 Jun '11
12 Jun '11
commit ab62e618f705513649f6702fc7281515098dd9e5
Author: Erinn Clark <erinn(a)torproject.org>
Date: Thu Jun 9 03:37:54 2011 -0300
uncomment the -no-remote command line in order to make it possible to launch multiple Firefox after TBB is launched. fixes bug #2254
---
src/vidalia/MainWindow.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index c2cb8e8..70e8044 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -1945,7 +1945,7 @@ MainWindow::launchBrowserFromDirectory()
/* Build the command line arguments */
QStringList commandLine;
// Is this better or worse than MOZ_NO_REMOTE?
- //commandLine << "-no-remote";
+ commandLine << "-no-remote";
commandLine << "-profile";
commandLine << profileDir;
1
0

12 Jun '11
commit 615efa38e5a57f02ce7bbdebdc58c2c90aae0031
Author: Tomás Touceda <chiiph(a)torproject.org>
Date: Tue May 31 19:18:17 2011 -0300
Fix some layouts and add en/disable lblDirPort
---
src/vidalia/config/AdvancedPage.ui | 110 +++++++++++++++------------------
src/vidalia/config/ServerPage.cpp | 1 +
src/vidalia/config/ServerPage.ui | 89 +++++++++++---------------
src/vidalia/config/TorrcDialog.ui | 120 +++++++++++++++++++++++-------------
4 files changed, 167 insertions(+), 153 deletions(-)
diff --git a/src/vidalia/config/AdvancedPage.ui b/src/vidalia/config/AdvancedPage.ui
index 2d06162..ed17c1d 100644
--- a/src/vidalia/config/AdvancedPage.ui
+++ b/src/vidalia/config/AdvancedPage.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>573</width>
+ <width>578</width>
<height>543</height>
</rect>
</property>
@@ -14,14 +14,14 @@
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QVBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>9</number>
- </property>
<item>
<widget class="QGroupBox" name="grpControlPort">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
@@ -29,19 +29,13 @@
<string>Tor Control</string>
</property>
<layout class="QVBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>9</number>
- </property>
<item>
<layout class="QGridLayout">
- <property name="margin">
+ <property name="horizontalSpacing">
<number>0</number>
</property>
- <property name="spacing">
- <number>2</number>
+ <property name="verticalSpacing">
+ <number>5</number>
</property>
<item row="5" column="0">
<widget class="QLabel" name="lblAuth">
@@ -68,9 +62,6 @@
<property name="spacing">
<number>2</number>
</property>
- <property name="margin">
- <number>0</number>
- </property>
<item>
<widget class="QComboBox" name="cmbAuthMethod">
<property name="minimumSize">
@@ -118,7 +109,7 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint">
+ <property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
@@ -130,12 +121,6 @@
</item>
<item row="2" column="2">
<layout class="QHBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
<item>
<widget class="QLineEdit" name="lineControlAddress">
<property name="maximumSize">
@@ -186,28 +171,24 @@
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
- <height>20</height>
+ <height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
- <item row="2" column="3">
- <layout class="QHBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- </layout>
- </item>
<item row="0" column="2">
<widget class="QRadioButton" name="rdoControlPort">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Use TCP connection (ControlPort)</string>
</property>
@@ -238,6 +219,12 @@
</item>
<item row="3" column="2">
<widget class="QRadioButton" name="rdoControlSocket">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Use Unix domain socket (ControlSocket)</string>
</property>
@@ -260,6 +247,12 @@
</item>
<item>
<widget class="QGroupBox" name="grpTorConfigFile">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
@@ -267,9 +260,6 @@
<string>Tor Configuration File</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
- <property name="margin">
- <number>9</number>
- </property>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
@@ -316,13 +306,6 @@
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QPushButton" name="btnEditTorConfig">
- <property name="text">
- <string>Edit current torrc</string>
- </property>
- </widget>
- </item>
<item row="2" column="1" colspan="2">
<widget class="QLabel" name="lblNotice">
<property name="text">
@@ -338,14 +321,21 @@
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="sizeHint" stdset="0">
<size>
<width>100</width>
- <height>20</height>
+ <height>0</height>
</size>
</property>
</spacer>
</item>
+ <item row="2" column="0">
+ <widget class="QPushButton" name="btnEditTorConfig">
+ <property name="text">
+ <string>Edit current torrc</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
@@ -353,6 +343,12 @@
</item>
<item>
<widget class="QGroupBox" name="grpTorDataDirectory">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
@@ -360,12 +356,6 @@
<string>Data Directory</string>
</property>
<layout class="QHBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>9</number>
- </property>
<item>
<widget class="QLineEdit" name="lineTorDataDirectory">
<property name="enabled">
@@ -408,14 +398,14 @@
</widget>
</item>
<item>
- <spacer>
+ <spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint">
+ <property name="sizeHint" stdset="0">
<size>
- <width>489</width>
- <height>141</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
</spacer>
diff --git a/src/vidalia/config/ServerPage.cpp b/src/vidalia/config/ServerPage.cpp
index f15268f..e026435 100644
--- a/src/vidalia/config/ServerPage.cpp
+++ b/src/vidalia/config/ServerPage.cpp
@@ -236,6 +236,7 @@ ServerPage::serverModeChanged(bool enabled)
&& Vidalia::torControl()->isConnected());
ui.lineDirPort->setEnabled(!bridgeEnabled);
+ ui.lblDirPort->setEnabled(!bridgeEnabled);
ui.chkMirrorDirectory->setEnabled(!bridgeEnabled);
/* Disable the Exit Policies tab when bridge or non-exit relay mode is
diff --git a/src/vidalia/config/ServerPage.ui b/src/vidalia/config/ServerPage.ui
index c922710..01a7840 100644
--- a/src/vidalia/config/ServerPage.ui
+++ b/src/vidalia/config/ServerPage.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>546</width>
- <height>463</height>
+ <width>639</width>
+ <height>538</height>
</rect>
</property>
<property name="contextMenuPolicy">
@@ -15,54 +15,41 @@
</property>
<layout class="QVBoxLayout">
<item>
- <widget class="QRadioButton" name="rdoClientMode">
- <property name="text">
- <string>Run as a client only</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="rdoNonExitMode">
- <property name="text">
- <string>Relay traffic inside the Tor network (non-exit relay)</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="rdoServerMode">
- <property name="text">
- <string>Relay traffic for the Tor network (exit relay)</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="0">
+ <widget class="QRadioButton" name="rdoClientMode">
+ <property name="text">
+ <string>Run as a client only</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QRadioButton" name="rdoServerMode">
+ <property name="text">
+ <string>Relay traffic for the Tor network (exit relay)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
<widget class="QRadioButton" name="rdoBridgeMode">
<property name="text">
<string>Help censored users reach the Tor network</string>
</property>
</widget>
</item>
- <item>
+ <item row="4" column="1">
<widget class="QLabel" name="lblWhatsThis">
<property name="text">
<string><a href="#bridgeHelp">What's this?</a></string>
</property>
</widget>
</item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
+ <item row="2" column="0" colspan="2">
+ <widget class="QRadioButton" name="rdoNonExitMode">
+ <property name="text">
+ <string>Relay traffic inside the Tor network (non-exit relay)</string>
</property>
- </spacer>
+ </widget>
</item>
</layout>
</item>
@@ -134,7 +121,7 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -195,7 +182,7 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -294,7 +281,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>321</width>
<height>20</height>
@@ -307,7 +294,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -320,7 +307,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>41</width>
<height>20</height>
@@ -508,7 +495,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -535,7 +522,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -661,7 +648,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>71</width>
<height>20</height>
@@ -693,7 +680,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -835,7 +822,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>42</height>
@@ -850,7 +837,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -907,7 +894,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -998,7 +985,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -1023,7 +1010,7 @@ problem with your relay. You might also include your PGP or GPG fingerprint.</st
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>420</width>
<height>16</height>
diff --git a/src/vidalia/config/TorrcDialog.ui b/src/vidalia/config/TorrcDialog.ui
index 42971b4..46ac151 100644
--- a/src/vidalia/config/TorrcDialog.ui
+++ b/src/vidalia/config/TorrcDialog.ui
@@ -10,6 +10,12 @@
<height>582</height>
</rect>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="windowTitle">
<string>Editing torrc</string>
</property>
@@ -17,46 +23,76 @@
<iconset resource="../res/vidalia.qrc">
<normaloff>:/images/16x16/system-run.png</normaloff>:/images/16x16/system-run.png</iconset>
</property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QTextEdit" name="teditTorrc"/>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QRadioButton" name="rdoAll">
- <property name="text">
- <string>Apply all</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="rdoSelection">
- <property name="text">
- <string>Apply selection only</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>12</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="teditTorrc">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="hLayout">
<item>
- <widget class="QCheckBox" name="chkSave">
+ <widget class="QRadioButton" name="rdoAll">
<property name="text">
- <string>Save settings. If unchecked it will only apply settings to the current Tor instance.</string>
+ <string>Apply all</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
+ <item>
+ <widget class="QRadioButton" name="rdoSelection">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Apply selection only</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
- <item row="1" column="0">
+ <item>
+ <widget class="QCheckBox" name="chkSave">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Save settings. If unchecked it will only apply settings to the current Tor instance.</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -167,8 +203,8 @@
<slot>undo()</slot>
<hints>
<hint type="sourcelabel">
- <x>35</x>
- <y>17</y>
+ <x>-1</x>
+ <y>-1</y>
</hint>
<hint type="destinationlabel">
<x>300</x>
@@ -183,8 +219,8 @@
<slot>redo()</slot>
<hints>
<hint type="sourcelabel">
- <x>97</x>
- <y>17</y>
+ <x>-1</x>
+ <y>-1</y>
</hint>
<hint type="destinationlabel">
<x>300</x>
@@ -199,8 +235,8 @@
<slot>selectAll()</slot>
<hints>
<hint type="sourcelabel">
- <x>171</x>
- <y>17</y>
+ <x>-1</x>
+ <y>-1</y>
</hint>
<hint type="destinationlabel">
<x>300</x>
@@ -215,8 +251,8 @@
<slot>copy()</slot>
<hints>
<hint type="sourcelabel">
- <x>85</x>
- <y>17</y>
+ <x>-1</x>
+ <y>-1</y>
</hint>
<hint type="destinationlabel">
<x>300</x>
@@ -231,8 +267,8 @@
<slot>paste()</slot>
<hints>
<hint type="sourcelabel">
- <x>149</x>
- <y>17</y>
+ <x>-1</x>
+ <y>-1</y>
</hint>
<hint type="destinationlabel">
<x>300</x>
@@ -247,8 +283,8 @@
<slot>cut()</slot>
<hints>
<hint type="sourcelabel">
- <x>29</x>
- <y>17</y>
+ <x>-1</x>
+ <y>-1</y>
</hint>
<hint type="destinationlabel">
<x>300</x>
1
0
commit 948a49292bce6a58de9bf807bf69ec4a4ed73204
Merge: ee578db 615efa3
Author: Tomas Touceda <chiiph(a)torproject.org>
Date: Sat Jun 11 12:34:19 2011 -0300
Merge branch 'macfixups' into alpha
src/vidalia/config/AdvancedPage.ui | 110 +++++++++++++++------------------
src/vidalia/config/ServerPage.cpp | 3 +
src/vidalia/config/ServerPage.ui | 89 +++++++++++---------------
src/vidalia/config/TorrcDialog.ui | 120 +++++++++++++++++++++++-------------
4 files changed, 169 insertions(+), 153 deletions(-)
diff --cc src/vidalia/config/ServerPage.cpp
index 32dc152,e026435..67e79ee
--- a/src/vidalia/config/ServerPage.cpp
+++ b/src/vidalia/config/ServerPage.cpp
@@@ -238,18 -235,8 +238,21 @@@ ServerPage::serverModeChanged(bool enab
ui.lblBridgeUsage->setVisible(bridgeEnabled
&& Vidalia::torControl()->isConnected());
+ if(bridgeEnabled) {
+ if(ui.lineDirPort->text().length() != 0) {
+ _tmpDirPort = ui.lineDirPort->text();
+ _tmpMirror = ui.chkMirrorDirectory->isChecked();
+ }
+ ui.lineDirPort->clear();
+ ui.chkMirrorDirectory->setChecked(false);
+ } else {
+ ui.lineDirPort->setText(_tmpDirPort);
+ ui.chkMirrorDirectory->setChecked(_tmpMirror);
+ }
+
+ ui.lineDirPort->setEnabled(!bridgeEnabled);
+ ui.lblDirPort->setEnabled(!bridgeEnabled);
++
ui.chkMirrorDirectory->setEnabled(!bridgeEnabled);
/* Disable the Exit Policies tab when bridge or non-exit relay mode is
1
0

12 Jun '11
commit 7ac29e5a57feb990c90834b81994aef6b8f36198
Author: Tomas Touceda <chiiph(a)torproject.org>
Date: Sat Jun 11 13:49:44 2011 -0300
Fix layout to adapt to any label length
---
src/vidalia/bwgraph/BandwidthGraph.ui | 748 ++++++++++++++-------------------
1 files changed, 311 insertions(+), 437 deletions(-)
diff --git a/src/vidalia/bwgraph/BandwidthGraph.ui b/src/vidalia/bwgraph/BandwidthGraph.ui
index 76a5a31..f05e7b9 100644
--- a/src/vidalia/bwgraph/BandwidthGraph.ui
+++ b/src/vidalia/bwgraph/BandwidthGraph.ui
@@ -6,66 +6,325 @@
<rect>
<x>0</x>
<y>0</y>
- <width>588</width>
- <height>437</height>
+ <width>593</width>
+ <height>487</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true"/>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="GraphFrame" name="frmGraph">
- <property name="minimumSize">
- <size>
- <width>120</width>
- <height>80</height>
- </size>
- </property>
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
- </property>
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="frameShape">
- <enum>QFrame::Box</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
+ <property name="bottomMargin">
+ <number>12</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="GraphFrame" name="frmGraph">
+ <property name="minimumSize">
+ <size>
+ <width>120</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ </font>
+ </property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::NoContextMenu</enum>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ </widget>
</item>
- <item>
- <layout class="QHBoxLayout">
- <property name="spacing">
- <number>6</number>
+ <item row="0" column="1">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="0">
+ <widget class="QFrame" name="frmSettings">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
</property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <property name="horizontalSpacing">
+ <number>10</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>0</number>
+ </property>
+ <property name="margin">
+ <number>5</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="chkReceiveRate">
+ <property name="contextMenuPolicy">
+ <enum>Qt::NoContextMenu</enum>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>Receive Rate</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="chkSendRate">
+ <property name="contextMenuPolicy">
+ <enum>Qt::NoContextMenu</enum>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>Send Rate</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="chkAlwaysOnTop">
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>Always on Top</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="3">
+ <widget class="QLabel" name="lblGraphStyle">
+ <property name="text">
+ <string>Style</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QComboBox" name="cmbGraphStyle">
+ <item>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../res/vidalia.qrc">
+ <normaloff>:/images/16x16/graph-line.png</normaloff>:/images/16x16/graph-line.png</iconset>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../res/vidalia.qrc">
+ <normaloff>:/images/16x16/graph-area.png</normaloff>:/images/16x16/graph-area.png</iconset>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="6">
+ <widget class="QPushButton" name="btnCancelSettings">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="6">
+ <widget class="QPushButton" name="btnSaveSettings">
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="5">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="1" rowspan="2" colspan="4">
+ <widget class="QFrame" name="frmOpacity">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <layout class="QGridLayout" name="gridLayout3">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>-1</number>
+ </property>
+ <item row="0" column="0" colspan="4">
+ <widget class="QSlider" name="sldrOpacity">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::NoContextMenu</enum>
+ </property>
+ <property name="toolTip">
+ <string>Changes the transparency of the Bandwidth Graph</string>
+ </property>
+ <property name="minimum">
+ <number>30</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ <property name="sliderPosition">
+ <number>100</number>
+ </property>
+ <property name="tracking">
+ <bool>false</bool>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="invertedAppearance">
+ <bool>false</bool>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::NoTicks</enum>
+ </property>
+ <property name="tickInterval">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="lblPercentOpacity">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ </font>
+ </property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::NoContextMenu</enum>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>100</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="label">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ </font>
+ </property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::NoContextMenu</enum>
+ </property>
+ <property name="text">
+ <string>% Opaque</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <layout class="QHBoxLayout">
<item>
<widget class="QPushButton" name="btnToggleSettings">
<property name="text">
@@ -98,391 +357,6 @@
</item>
</layout>
</item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QFrame" name="frmSettings">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>355</width>
- <height>85</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>82</height>
- </size>
- </property>
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" name="_2">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>9</number>
- </property>
- <item>
- <layout class="QVBoxLayout" name="_3">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>3</number>
- </property>
- <item>
- <widget class="QCheckBox" name="chkReceiveRate">
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="toolTip">
- <string/>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="text">
- <string>Receive Rate</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="chkSendRate">
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="toolTip">
- <string/>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="text">
- <string>Send Rate</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="chkAlwaysOnTop">
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="text">
- <string>Always on Top</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="_4">
- <property name="spacing">
- <number>1</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="_5">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="lblGraphStyle">
- <property name="text">
- <string>Style</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="cmbGraphStyle">
- <item>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../res/vidalia.qrc">
- <normaloff>:/images/16x16/graph-line.png</normaloff>:/images/16x16/graph-line.png</iconset>
- </property>
- </item>
- <item>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../res/vidalia.qrc">
- <normaloff>:/images/16x16/graph-area.png</normaloff>:/images/16x16/graph-area.png</iconset>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QFrame" name="frmOpacity">
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <layout class="QVBoxLayout" name="_6">
- <property name="spacing">
- <number>3</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <widget class="QSlider" name="sldrOpacity">
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="toolTip">
- <string>Changes the transparency of the Bandwidth Graph</string>
- </property>
- <property name="minimum">
- <number>30</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="value">
- <number>100</number>
- </property>
- <property name="sliderPosition">
- <number>100</number>
- </property>
- <property name="tracking">
- <bool>false</bool>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="invertedAppearance">
- <bool>false</bool>
- </property>
- <property name="tickPosition">
- <enum>QSlider::NoTicks</enum>
- </property>
- <property name="tickInterval">
- <number>10</number>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="_7">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>21</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="lblPercentOpacity">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
- </property>
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="text">
- <string>100</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
- </property>
- <property name="contextMenuPolicy">
- <enum>Qt::NoContextMenu</enum>
- </property>
- <property name="text">
- <string>% Opaque</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>21</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>21</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>21</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QVBoxLayout" name="_8">
- <property name="spacing">
- <number>1</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <widget class="QPushButton" name="btnSaveSettings">
- <property name="text">
- <string>Save</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnCancelSettings">
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
</layout>
</widget>
<customwidgets>
1
0