tasque r149 - in trunk: . src/Backends/Rtm
- From: sharm svn gnome org
- To: svn-commits-list gnome org
- Subject: tasque r149 - in trunk: . src/Backends/Rtm
- Date: Tue, 21 Oct 2008 04:34:53 +0000 (UTC)
Author: sharm
Date: Tue Oct 21 04:34:53 2008
New Revision: 149
URL: http://svn.gnome.org/viewvc/tasque?rev=149&view=rev
Log:
* tasque/src/Backends/Rtm/RtmPreferencesWidget.cs: Don't crash if
default browser isn't set, and mark some old strings for translation.
Fixes bug #552944, patch courtesy of Loganathan Subramaniam.
Modified:
trunk/ChangeLog
trunk/src/Backends/Rtm/RtmPreferencesWidget.cs
Modified: trunk/src/Backends/Rtm/RtmPreferencesWidget.cs
==============================================================================
--- trunk/src/Backends/Rtm/RtmPreferencesWidget.cs (original)
+++ trunk/src/Backends/Rtm/RtmPreferencesWidget.cs Tue Oct 21 04:34:53 2008
@@ -3,6 +3,7 @@
using System;
using Gtk;
+using Mono.Unix;
namespace Tasque.Backends.RtmBackend
{
@@ -56,7 +57,7 @@
statusLabel.UseMarkup = true;
statusLabel.UseUnderline = false;
- authButton = new LinkButton("Click Here to Connect");
+ authButton = new LinkButton (Catalog.GetString ("Click Here to Connect"));
authButton.Clicked += OnAuthButtonClicked;
@@ -66,7 +67,7 @@
if (userName != null && userName.Trim () != string.Empty)
statusLabel.Text += " as\n" + userName.Trim ();
} else {
- statusLabel.Text = "\n\nYou are not connected";
+ statusLabel.Text = Catalog.GetString ("\n\nYou are not connected");
authButton.Show();
}
mainVBox.PackStart(statusLabel, false, false, 0);
@@ -96,9 +97,14 @@
if (!isAuthorized && !authRequested) {
string url = rtmBackend.GetAuthUrl();
Logger.Debug("Launching browser to authorize with Remember the Milk");
- Application.Instance.NativeApplication.OpenUrl (url);
- authRequested = true;
- authButton.Label = "Click Here After Authorizing Tasque";
+ try {
+ Application.Instance.NativeApplication.OpenUrl (url);
+ authRequested = true;
+ authButton.Label = Catalog.GetString ("Click Here After Authorizing");
+ } catch (Exception ex) {
+ Logger.Error ("Exception opening URL: {0}",ex.Message);
+ authButton.Label = Catalog.GetString ("Set the default browser and try again");
+ }
} else if (!isAuthorized && authRequested) {
authButton.Label = "Processing...";
try {
@@ -114,9 +120,9 @@
}
}
if (isAuthorized) {
- authButton.Label = "Thank You";
+ authButton.Label = Catalog.GetString ("Thank You");
authButton.Sensitive = false;
- statusLabel.Text = "\n\nYou are currently connected";
+ statusLabel.Text = Catalog.GetString ("\n\nYou are currently connected");
string userName =
Application.Preferences.Get(Preferences.UserNameKey);
if (userName != null && userName.Trim() != string.Empty)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]