Adium

Ticket #316 (closed enhancement: fixed)

Opened 5 years ago

Last modified 10 months ago

Add "Current iTunes Track" to Contact List Status Menu entry

Reported by: macg Owned by: kgilla10@scu.edu.au
Milestone: Component: Adium Core
Version: 0.82 Severity: normal
Keywords: Cc: evan.s@…
Patch Status:

Description

Add a default/standard entry for "Current iTunes Track" to both the Available and Away sections of the Status pull-down menu for the Contacts list. When selected, it will show the Current iTunes Track, like iChat does (but without the LAME ASS iTMS arrows to generate even more money for Apple.) :)

Attachments

.2 (0 bytes) - added by anonymous 5 years ago.
test (15 bytes) - added by evan.s@… 5 years ago.
Test file
iTunesPluginPatch.diff (22.2 KB) - added by Kiel Gillard 5 years ago.
iTunesPlugin patch .diff file
CurrentTunes.scpt (3.8 KB) - added by Kiel Gillard 5 years ago.
AppleScript to obtain currently playing iTunes track data.
iTunes.png (2.8 KB) - added by Kiel Gillard 5 years ago.
PNG file of iTunes application icon for use in upcoming iTunes toolbar item.
iTunesPluginPatch_v2_8-5-05.diff (15.5 KB) - added by evands 5 years ago.
Updated diff
KGiTunesPlugin-2005-8-13.diff (37.6 KB) - added by Kiel Gillard 5 years ago.
A totally wicked update to the ESiTunesPlugin!
KGiTunesPlugin-2005-8-13.2.diff (37.6 KB) - added by Kiel Gillard 5 years ago.
Teeny tiny bug fix. Please ignore the first one.
KGiTunesPluginPatch2005-08-19.diff (38.7 KB) - added by Kiel Gillard 5 years ago.
I'm pretty sure this is the final patch!

Change History

Changed 5 years ago by Synapse

  • owner changed from evands to nobody
  • severity changed from normal to enhancement

It's quite simple to add your own custom status and save it. Personally, I just add the iTunes stuff to my standard available messages. Eg. Studying | Listening to %_track by %_artist from %_album .

AFAIK, it's just a matter of editing the default saved statuses plist, but it's not really worth doing. If a user wants to do it, they can.

Changed 5 years ago by macg

  • owner changed from nobody to evands
  • priority changed from normal to high

Evan asked me to submit this and assign it to him. Sorry that I didn't specify that... please leave the assignment and status alone. (and thanks for your feedback, that's how I have been doing it, but it would be nice to have it pre-done for novices)

Changed 5 years ago by evands

  • priority changed from high to low

I do disagree with the high priority :P

Changed 5 years ago by anonymous

  • attachment .2 added

Changed 5 years ago by evands

  • owner changed from evands to kgilla10@…

Changed 5 years ago by evands

  • cc evan.s@… added

Changed 5 years ago by Kiel Gillard (kgilla10@…

Added "iTunesPluginPatch.diff" to svn 22/07/2005. Just iTunes Status item implementation so far. iTunes Toolbar item coming soon.

Attached the iTunesPluginPatch.diff.

Enjoy! Now I can't wait for the MSNP11 implementation in gaim so I can use this with MSN Messenger.

Changed 5 years ago by Kiel Gillard (kgilla10@…

Ok, maybe I won't attach the .diff file. I thought the ContributingCode ticket said to do so...

Changed 5 years ago by evan.s@…

  • attachment test added

Test file

Changed 5 years ago by evan.s@…

Attaching works just fine -- go for it :)

Changed 5 years ago by Kiel Gillard

iTunesPlugin patch .diff file

Changed 5 years ago by evands

What is

Index: Plugins/Link Management/SHAutoValidatingTextView.m
===================================================================
--- Plugins/Link Management/SHAutoValidatingTextView.m	(revision 12574)
+++ Plugins/Link Management/SHAutoValidatingTextView.m	(working copy)
@@ -62,7 +62,7 @@
 }
 - (URI_VERIFICATION_STATUS)validationStatus
 {
-    return(validStatus);
+    return nil;//(validStatus);
 }
 
 
@@ -77,7 +77,7 @@
 
         URLIsValid = ([laxScanner isStringValidURL:linkURL] &&
 					  ([NSURL URLWithString:linkURL] != nil));
-        validStatus = [laxScanner validationStatus];
+        //validStatus = [laxScanner validationStatus];
 
 		[laxScanner release];
     }
Index: Plugins/Link Management/SHAutoValidatingTextView.h
===================================================================
--- Plugins/Link Management/SHAutoValidatingTextView.h	(revision 12574)
+++ Plugins/Link Management/SHAutoValidatingTextView.h	(working copy)
@@ -22,7 +22,7 @@
     BOOL                         URLIsValid;
     NSString                    *urlString;
     unsigned                     scanOffset;
-    URI_VERIFICATION_STATUS      validStatus;
+    URI_VERIFICATION_STATUS      *validStatus;
 }

doing in this patch?

Changed 5 years ago by evands

Additionally, this patch adds the use of two files, CurrentTunes.scpt and iTunes.png. These should be attached to the ticket.

Changed 5 years ago by evands

Oops, didn't intend the ridiculous formatting of the previous comment -- was just intending to bold the file names.

Changed 5 years ago by Kiel Gillard

The commented code was there because I was using a svn build that, when I went to compile it, threw and error for some reason. Is this easy to ignore or would you like me to refresh the patch?

I will attach the two additional files to the ticket.

Changed 5 years ago by Kiel Gillard

AppleScript to obtain currently playing iTunes track data.

Changed 5 years ago by Kiel Gillard

PNG file of iTunes application icon for use in upcoming iTunes toolbar item.

Changed 5 years ago by evands

Easy to ignore, was just making sure it had nothing to do with the actual patch.

Changed 5 years ago by evands

Updated diff

Changed 5 years ago by evands

iTunesPluginPatch_v2_8-5-05.diff is a diff off current svn with changes from me. I fixed issues with the hidden preference for the iTunes status format string (it was going to break if the locale changed) and cleaned up a few other minor things. Here's what else needs to be done before this can be committed:

  • The iTunesToolbarItem method isn't implemented, but it's called in installPlugin.
  • 3 warnings due to truth value assignment without appropriate parenthesis should be fixed.
  • Testing once Adium can run with the patch applied (currently crashes on launch due to the first item listed)

[13033]: I've fixed the issue you mentioned in your email with the status being listed in the Edit Statuses list.

Changed 5 years ago by evands

4th thing that needs to be done is that the patch needs to conform to CodingStyle.

Changed 5 years ago by Kiel Gillard

I will attach a new .diff file for 13 August 2005. I'd like to know if some people could test it for me please.

What's changed: 1) /music changed to %_music to solve ticket #1157. 2) iTunes toolbar item to insert values of the currently playing track into Adium's message entry view. 3) Edit > Insert Current Track menu of all the different iTunes triggers. 4) A contextual menu of different iTunes triggers is available as well. 5) Generates URLs to the iTMS if no URL is present. <--- This was a pain! 6) Fixed bugs and improved conformance to coding style.

I know that there is some code in there which could be redundant, for example, checks to see if the firstResponder is of class [NSTextView class], which may or may not be appropriate at the moment. I'd like to have someone's opinion on this please! :-)

What's left to be done: 1) "Search selection in Music Store..." toolbar item feature - I'm specifically seeing this used within the WebMessageView. I don't know how many times people over the internet have said to me "have you heard this song before?". 2) Removal of redundant code, for example the [firstResponder isKindOfClass:[NSTextView class]] checks. 3) I bumped into a bug reported in ticket #954. This needs a swift kick in the butt, but I think this should be left to one of the bigger guns in the Adium project to fix. 4) I've changed /music to %_music. I'm all for changing the trigger to something easier to type, for example: "**music" or whatever.

Please apply the patch and let me know what you think!

Changed 5 years ago by Kiel Gillard

A totally wicked update to the ESiTunesPlugin!

Changed 5 years ago by Kiel Gillard

Teeny tiny bug fix. Please ignore the first one.

Changed 5 years ago by Kiel Gillard

I'm pretty sure this is the final patch!

Changed 5 years ago by Kiel Gillard

Notes on what has changed (patch 2005-08-19): 1) /currentITunesTrack is now a localisable 'token', %_iTunes. 2) Removed an unnecessary check to see if the firstResponder of a keyWindow was of class [NSTextView class]. 3) Implemented the Search Music Store with Selection feature in the toolbar item. 4) When a string is inserted, it it inserted with the same typingAttributes as the textView it's being inserted into. 5) Fixed a memory leak when creating the iTunes data dictionary from the AppleScript.

What needs to be done: ticket #954 needs to be exterminated (I've been watching Doctor Who!).

Changed 5 years ago by evands

  • status changed from new to closed
  • resolution set to fixed

(In [13159]) Patch by Kiel Gillard, with some changes by me, to extensively improve the iTunes integration plugin:

  • Adds "Current iTunes Track" available status to the status menu
    • Adds "Insert iTunes Token" submenu to the Edit menu and the contextual menu for inserting the various iTunes tokens such as %_track and %_artist
  • Adds an iTunes toolbar button (available via Customize Toolbar) with items for inserting static information related to the current iTunes song as well as inserting a link to the iTunes Music Store from a selection

Good work, Kiel. Closes #316

Changed 4 years ago by Ben G.

Sorry if this is a newbie question, but did this change ever actually make it into a released build of Adium?

I can't find mention of ticket 316 in the Adium version history, and 0.88 (the latest release) definitely doesn't have the described functionality. The last time iTunes was mentioned in the version history was back in June 2004, in version 0.60.

I looked in change 13159, and didn't see anything like this in the diff.

Changed 4 years ago by catfish_man

  • field_haspatch set to 0

It's certainly in the 1.0 source. I don't have 0.8x built right now to check.

Changed 10 months ago by zacw

  • component changed from Core Adium to Adium Core
Note: See TracTickets for help on using tickets.