From 0d9d237fed95adc8190d3eecd84cec68253bfa82 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Tue, 13 Nov 2012 14:38:25 +0100 Subject: [PATCH 1/9] fixed #56 --- WebKit/scripts/controller/Oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebKit/scripts/controller/Oauth.js b/WebKit/scripts/controller/Oauth.js index 560afe1..a94e71f 100644 --- a/WebKit/scripts/controller/Oauth.js +++ b/WebKit/scripts/controller/Oauth.js @@ -52,7 +52,7 @@ function(HostApp, Paths, Hmac) { var those = this; Paths.findProfileURL(entity, function(profile_url) { - if (profile_url && (profile_url.startsWith("http://") || profile_url.startsWith("https:(("))) { + if (profile_url && (profile_url.startsWith("http://") || profile_url.startsWith("https://"))) { those.register(profile_url); } else { HostApp.authentificationDidNotSucceed("Could not find profile for: " + entity); From 9ba8370df2f9873ea88cc681bff40f58b3cb2a71 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Tue, 13 Nov 2012 14:39:21 +0100 Subject: [PATCH 2/9] fixed #7 --- Mac/Controller.m | 3 ++ Mac/English.lproj/MainMenu.xib | 71 +++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/Mac/Controller.m b/Mac/Controller.m index 2e1e29a..d2712e9 100644 --- a/Mac/Controller.m +++ b/Mac/Controller.m @@ -22,6 +22,9 @@ - (void)awakeFromNib { + [timelineViewWindow setExcludedFromWindowsMenu:YES]; + [mentionsViewWindow setExcludedFromWindowsMenu:YES]; + [self initHotKeys]; [GrowlApplicationBridge setGrowlDelegate:self]; diff --git a/Mac/English.lproj/MainMenu.xib b/Mac/English.lproj/MainMenu.xib index c3143c0..7dfebf9 100644 --- a/Mac/English.lproj/MainMenu.xib +++ b/Mac/English.lproj/MainMenu.xib @@ -745,6 +745,34 @@ + + + YES + YES + + + 2147483647 + + + + + + Timeline + 1 + 1048576 + 2147483647 + + + + + + Mentions + 2 + 1048576 + 2147483647 + + + YES @@ -1130,7 +1158,6 @@ {{391, 46}, {75, 32}} - _NS:9 YES @@ -1643,6 +1670,14 @@ 547 + + + makeKeyAndOrderFront: + + + + 656 + checkForUpdates: @@ -1667,6 +1702,14 @@ 569 + + + makeKeyAndOrderFront: + + + + 655 + makeKeyAndOrderFront: @@ -2449,6 +2492,9 @@ + + + @@ -2472,6 +2518,21 @@ + + 653 + + + + + 654 + + + + + 657 + + + @@ -2589,6 +2650,9 @@ 647.IBPluginDependency 648.IBPluginDependency 649.IBPluginDependency + 653.IBPluginDependency + 654.IBPluginDependency + 657.IBPluginDependency 72.IBPluginDependency 73.IBPluginDependency 79.IBPluginDependency @@ -2715,6 +2779,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2729,7 +2796,7 @@ - 652 + 657 From 6487288c4b8e38b95242e4ed6445ed3b1413f537 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Tue, 13 Nov 2012 14:43:21 +0100 Subject: [PATCH 3/9] version bump 0.2.3 --- Mac/Tentia-Info.plist | 4 ++-- Mac/publish/ReleaseNotes.html | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Mac/Tentia-Info.plist b/Mac/Tentia-Info.plist index c7151cb..99575bc 100644 --- a/Mac/Tentia-Info.plist +++ b/Mac/Tentia-Info.plist @@ -42,7 +42,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.2.2 + 0.2.3 CFBundleSignature ???? CFBundleURLTypes @@ -57,7 +57,7 @@ CFBundleVersion - 0.2.2 + 0.2.3 LSApplicationCategoryType public.app-category.lifestyle LSMinimumSystemVersion diff --git a/Mac/publish/ReleaseNotes.html b/Mac/publish/ReleaseNotes.html index e4ae566..169d858 100644 --- a/Mac/publish/ReleaseNotes.html +++ b/Mac/publish/ReleaseNotes.html @@ -14,6 +14,11 @@ +

Tentia 0.2.3

+ +

Fixed problem where you couldn't login with a https entity

+

Moved Mentions and Timeline from File to Window menu item

+

Tentia 0.2.2

Resizable "New Post" window

From 98322f490b26fdcb909e8fc61d69e7f06996c410 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Tue, 13 Nov 2012 22:02:50 +0100 Subject: [PATCH 4/9] removed mentions and timeline from File menu --- Mac/English.lproj/MainMenu.xib | 72 ++++++---------------------------- 1 file changed, 11 insertions(+), 61 deletions(-) diff --git a/Mac/English.lproj/MainMenu.xib b/Mac/English.lproj/MainMenu.xib index 7dfebf9..c5c9f53 100644 --- a/Mac/English.lproj/MainMenu.xib +++ b/Mac/English.lproj/MainMenu.xib @@ -236,24 +236,6 @@
- - - Timeline - 1 - 1048576 - 2147483647 - - - - - - Mentions - 2 - 1048576 - 2147483647 - - - Close @@ -745,7 +727,7 @@ - + YES YES @@ -755,7 +737,7 @@ - + Timeline 1 @@ -764,7 +746,7 @@ - + Mentions 2 @@ -1666,15 +1648,7 @@ makeKeyAndOrderFront: - - - 547 - - - - makeKeyAndOrderFront: - - + 656 @@ -1686,14 +1660,6 @@ 543 - - - makeKeyAndOrderFront: - - - - 563 - delegate @@ -1706,7 +1672,7 @@ makeKeyAndOrderFront: - + 655 @@ -1820,8 +1786,6 @@ - - @@ -2464,16 +2428,6 @@ - - 551 - - - - - 544 - - - 644 @@ -2492,9 +2446,9 @@ - - - + + +
@@ -2520,17 +2474,17 @@ 653 - + 654 - + 657 - + @@ -2613,8 +2567,6 @@ 537.IBPluginDependency 541.IBPluginDependency 542.IBPluginDependency - 544.IBPluginDependency - 551.IBPluginDependency 559.IBPluginDependency 559.IBWindowTemplateEditedContentRect 559.NSWindowTemplate.visibleAtLaunch @@ -2737,8 +2689,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{344, 175}, {376, 581}} com.apple.InterfaceBuilder.CocoaPlugin From b482c546a45a36e3c9e6924bb1d96329f8695eb2 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Tue, 13 Nov 2012 22:03:08 +0100 Subject: [PATCH 5/9] typo --- Mac/publish/Appcast.xml | 10 +++++----- Mac/publish/ReleaseNotes.html | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Mac/publish/Appcast.xml b/Mac/publish/Appcast.xml index 725d1a1..7f70ee2 100755 --- a/Mac/publish/Appcast.xml +++ b/Mac/publish/Appcast.xml @@ -6,15 +6,15 @@ Most recent changes with links to updates. en - Version 0.2.2 + Version 0.2.3 10.5.0 http://jabs.nu/Tentia/download/ReleaseNotes.html - Mon, 12 Nov 2012 20:02:43 +0100 + Tue, 13 Nov 2012 14:47:21 +0100 + sparkle:dsaSignature="MCwCFHqhR4rOIHHK8+DAPWjw/QpIBHnkAhQNygd4tYexOp+0NXvy2759Rv/rbw==" /> diff --git a/Mac/publish/ReleaseNotes.html b/Mac/publish/ReleaseNotes.html index 169d858..9c66e22 100644 --- a/Mac/publish/ReleaseNotes.html +++ b/Mac/publish/ReleaseNotes.html @@ -19,6 +19,8 @@

Fixed problem where you couldn't login with a https entity

Moved Mentions and Timeline from File to Window menu item

+
+

Tentia 0.2.2

Resizable "New Post" window

From 7d595886011c4eec3b262189f4d0d2fcda8a49be Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Tue, 13 Nov 2012 22:03:21 +0100 Subject: [PATCH 6/9] fixed #21 --- WebKit/scripts/controller/Timeline.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/WebKit/scripts/controller/Timeline.js b/WebKit/scripts/controller/Timeline.js index 8242ccf..b681b00 100644 --- a/WebKit/scripts/controller/Timeline.js +++ b/WebKit/scripts/controller/Timeline.js @@ -74,16 +74,17 @@ function(Core, Paths, HostApp, URI) { var http_method = "GET"; var callback = function(resp) { + those.reload_blocked = false; + try { var json = JSON.parse(resp.responseText) + those.newStatus(json); + } catch (e) { //alert(resp.responseText); alert(url + " JSON parse error"); throw e; } - - those.newStatus(json); - those.reload_blocked = false; } var data = null; From 46bcb4c06b0069427a2daf033a19fb08e90546e2 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Tue, 13 Nov 2012 22:16:22 +0100 Subject: [PATCH 7/9] fixed #46 --- Mac/NewMessageWindow.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mac/NewMessageWindow.m b/Mac/NewMessageWindow.m index b7783fd..470f270 100644 --- a/Mac/NewMessageWindow.m +++ b/Mac/NewMessageWindow.m @@ -47,7 +47,11 @@ { [super windowControllerDidLoadNib:aController]; // Add any code here that needs to be executed once the windowController has loaded the document's window. + [textField becomeFirstResponder]; + // Enable Continous Spelling + NSTextView *textView = (NSTextView *)[[[self.windowControllers objectAtIndex:0] window] firstResponder];; + [textView setContinuousSpellCheckingEnabled:YES]; } - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError From af1eb210b061a0b6f25e1beb98c36dcc1022329b Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Wed, 14 Nov 2012 00:04:37 +0100 Subject: [PATCH 8/9] fixed #39 and #51 --- WebKit/scripts/helper/Core.js | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index 8c6daa4..61b2c71 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -179,9 +179,13 @@ function(jQuery, Paths, URI, HostApp, Followings) { template.in_reply.parentNode.className = "hidden"; var text = status.content.text.replace(/\n/g, "
"); + var entities = [status.entity]; + status.mentions.map(function (mention) { + entities.push(mention.entity) + }); template.message.innerHTML = this.replaceUsernamesWithLinks( - this.replaceURLWithHTMLLinks(text, status.entities, template.message) + this.replaceURLWithHTMLLinks(text, entities, template.message) ); this.findMentions(template.message, status.mentions); @@ -380,17 +384,30 @@ function(jQuery, Paths, URI, HostApp, Followings) { Core.prototype.replaceURLWithHTMLLinks = function(text, entities, message_node) { - var exp = /(([^\^]https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_()|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - return text.replace(exp, "$1"); + var callback = function(url) { + + var result; + + if (entities && entities.some(function(x) { return x == url })) { + result = url; + } else { + + var protocol = ""; + if (!url.startsWith("http://") && !url.startsWith("https://")) { + protocol = "http://"; + } + result = '' + url + ''; + } + + return result; + } + + return URI.withinString(text, callback); } Core.prototype.replaceUsernamesWithLinks = function(text, mentions) { - - return text; // FIXME! - var username = /(^|\s)(\^)(\w+)/ig; var hash = /(^|\s)(#)(\w+)/ig; - text = text.replace(username, "$1$2$3"); - return text.replace(hash, "$1$2$3"); + return text.replace(hash, "$1$2$3"); } Core.prototype.replyTo = function(entity, status_id, mentions) { From fc0f14ec8289dd70a1066acb5d3cf15d2d84ca09 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Wed, 14 Nov 2012 00:29:55 +0100 Subject: [PATCH 9/9] fixed #54 --- WebKit/css/default.css | 9 +++++++++ WebKit/scripts/helper/Core.js | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/WebKit/css/default.css b/WebKit/css/default.css index 1b08ecb..cce3efd 100644 --- a/WebKit/css/default.css +++ b/WebKit/css/default.css @@ -188,6 +188,15 @@ li:hover .name { background: #b8c1d0; } +.is_private { + color: white; + padding: 0 4px 0 2px; + background: #09F; + border-radius: 3px; + font-style: italic; + font-weight: bold; +} + li .date { position: absolute; diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index 61b2c71..1451e5f 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -67,6 +67,17 @@ function(jQuery, Paths, URI, HostApp, Followings) { var geo = document.createElement("a"); geo.style.display = "none"; head.appendChild(geo); + + head.appendChild(space.cloneNode()); + + var is_private = document.createElement("span") + is_private.className = "is_private"; + is_private.style.display = "none"; + is_private.innerHTML = "P"; + is_private.title = "Private"; + head.appendChild(is_private); + + head.appendChild(space.cloneNode()); var pin = document.createElement("img"); pin.src = "img/pin.png"; @@ -104,6 +115,7 @@ function(jQuery, Paths, URI, HostApp, Followings) { this.template = { item: item, reply_to: reply_to, + is_private: is_private, retweet: retweet, image: image, username: username, @@ -175,6 +187,9 @@ function(jQuery, Paths, URI, HostApp, Followings) { }); } + if (status && status.permissions && !status.permissions.public) { + template.is_private.style.display = ''; + } template.in_reply.parentNode.className = "hidden";