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

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



commit 2887bae388b663de2f6f3d1ccec6b5c8e0295d9b
Author: Robert Ransom <rransom.8774@xxxxxxxxx>
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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits