[tor-commits] [torbrowser/master] [Linux] Add UI improvements to complain suggested by velope

erinn at torproject.org erinn at torproject.org
Sun Oct 23 23:18:28 UTC 2011


commit 2887bae388b663de2f6f3d1ccec6b5c8e0295d9b
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Thu Aug 25 23:09:20 2011 -0400

    [Linux] Add UI improvements to complain suggested by velope
    (cherry picked from commit a8243193ec3930329fa6e3928a2b2a8a42eafff1)
---
 src/RelativeLink/RelativeLink.sh |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/RelativeLink/RelativeLink.sh b/src/RelativeLink/RelativeLink.sh
index 462ca98..2894ed7 100755
--- a/src/RelativeLink/RelativeLink.sh
+++ b/src/RelativeLink/RelativeLink.sh
@@ -7,6 +7,8 @@
 #
 # Copyright 2011 The Tor Project.  See LICENSE for licensing information.
 
+complain_dialog_title="Tor Browser Bundle"
+
 # First, make sure DISPLAY is set.  If it isn't, we're hosed; scream
 # at stderr and die.
 if [ "x$DISPLAY" = "x" ]; then
@@ -63,13 +65,19 @@ complain () {
 	# it returns non-zero.)
 
 	# First, try zenity.
-	zenity --error --text="$1"
+	zenity --error --title="$complain_dialog_title" --text="$1"
 	if [ "$?" -ne 127 ]; then
 		return
 	fi
 
 	# Try xmessage.
-	xmessage "$1"
+	xmessage -title "$complain_dialog_title" \
+		-center \
+		-buttons OK \
+		-default OK \
+		-geometry 300 \
+		-xrm '*message.scrollVertical: Never' \
+		"$1"
 	if [ "$?" -ne 127 ]; then
 		return
 	fi
@@ -79,7 +87,12 @@ complain () {
 	# be the least likely program to have available, but it might
 	# be used by one of the 'lightweight' Gtk-based desktop
 	# environments.
-	gxmessage "$1"
+	gxmessage -title "$complain_dialog_title" \
+		-center \
+		-buttons GTK_STOCK_OK \
+		-default OK \
+		-geometry 300 \
+		"$1"
 	if [ "$?" -ne 127 ]; then
 		return
 	fi





More information about the tor-commits mailing list