From: <mst...@us...> - 2010-01-31 14:43:11
|
Revision: 1505 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1505&view=rev Author: mstroeck Date: 2010-01-31 14:43:04 +0000 (Sun, 31 Jan 2010) Log Message: ----------- Update German localization. Modified Paths: -------------- trunk/2.5.0/Vienna.xcodeproj/project.pbxproj trunk/2.5.0/de.lproj/Localizable.strings Modified: trunk/2.5.0/Vienna.xcodeproj/project.pbxproj =================================================================== --- trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-01-31 14:10:59 UTC (rev 1504) +++ trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-01-31 14:43:04 UTC (rev 1505) @@ -848,6 +848,7 @@ B2108656109F8127001D4E7C /* XMLSourceWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLSourceWindow.h; sourceTree = "<group>"; }; B2108657109F8127001D4E7C /* XMLSourceWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XMLSourceWindow.m; sourceTree = "<group>"; }; B2108659109F8196001D4E7C /* XMLSource.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = XMLSource.nib; sourceTree = "<group>"; }; + B2321D0F1115CDA30044CF54 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; }; B23A794310FF50B10085C85B /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; }; B2554730106913760065E9C3 /* errorpagelogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = errorpagelogo.png; sourceTree = "<group>"; }; B25E53DB1067B54600BBF14C /* browserNextButton.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = browserNextButton.tiff; sourceTree = "<group>"; }; @@ -2223,12 +2224,13 @@ isa = PBXVariantGroup; children = ( AA6855B909FB120D00329883 /* en */, + B2321D0F1115CDA30044CF54 /* de */, + AA6853FD09FB074700329883 /* fr */, AACF240E09441ACB0019F2BA /* zh_TW */, AA71CD0D098D51340069607D /* nl */, AA68510809FAFA8300329883 /* sv */, AA68522709FB01A100329883 /* es */, AA6852E809FB037F00329883 /* it */, - AA6853FD09FB074700329883 /* fr */, AA6854D309FB0AF100329883 /* ja */, AA517D510AA4E041001E8CA1 /* pt_BR */, AACC2D440AB9DC8700D02B04 /* ko */, Modified: trunk/2.5.0/de.lproj/Localizable.strings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-02-06 14:27:41
|
Revision: 1508 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1508&view=rev Author: stevewpalmer Date: 2010-02-06 14:27:33 +0000 (Sat, 06 Feb 2010) Log Message: ----------- Fix bug where deleting a folder in unified view mode causes Vienna to fail. In the database code that removes the folder, a notification is posted before the folder deletion is committed to the database. This notification is fired to the folder tree which changes the selection to the next folder in the tree and then fires another notification which causes that folder contents to be refreshed in the article view. Only after that are the changes committed to the database. However in unified view mode, there's a database request in the middle of the refresh to mark all articles in the folder as read. The other views don't do anything like that. This results in another database transaction being started while the previous one is still in progress which is a no-no. In debug builds, Vienna throws an assert in the debugger. In retail build, it basically just fails and leaves the whole state incomplete. This is dangerous. Deleting the folder should commit before firing the notification. This fix moves the notifications outside of the transaction so the notification handlers can safely access the database if they need to do so. Modified Paths: -------------- trunk/2.5.0/CHANGES trunk/2.5.0/Database.m trunk/2.5.0/notes.html Modified: trunk/2.5.0/CHANGES =================================================================== --- trunk/2.5.0/CHANGES 2010-01-31 21:14:10 UTC (rev 1507) +++ trunk/2.5.0/CHANGES 2010-02-06 14:27:33 UTC (rev 1508) @@ -14,6 +14,7 @@ - Added Share With Facebook button. - Added Share With Evernote button. - Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system. +- Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly. 2.4.0.2401 ---------- Modified: trunk/2.5.0/Database.m =================================================================== --- trunk/2.5.0/Database.m 2010-01-31 21:14:10 UTC (rev 1507) +++ trunk/2.5.0/Database.m 2010-02-06 14:27:33 UTC (rev 1508) @@ -928,9 +928,6 @@ NSArray * arrayOfChildFolders = [self arrayOfFolders:folderId]; Folder * folder; - // Send a notification before the folder is deleted - [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_WillDeleteFolder" object:[NSNumber numberWithInt:folderId]]; - // Recurse and delete child folders for (folder in arrayOfChildFolders) [self wrappedDeleteFolder:[folder itemId]]; @@ -1001,9 +998,6 @@ [self executeSQLWithFormat:@"delete from messages where folder_id=%d", folderId]; [self executeSQLWithFormat:@"delete from folders where folder_id=%d", folderId]; - // Send a notification when the folder is deleted - [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_FolderDeleted" object:[NSNumber numberWithInt:folderId]]; - // Remove from the folders array. Do this after we send the notification // so that the notification handlers don't fail if they try to dereference the // folder. @@ -1017,15 +1011,43 @@ */ -(BOOL)deleteFolder:(int)folderId { + NSMutableArray * arrayOfFolderIds; + NSArray * arrayOfChildFolders; + NSNumber * numFolder; + Folder * folder; BOOL result; // Exit now if we're read-only if (readOnly) return NO; + // Make sure this is a valid folder + folder = [self folderFromID:folderId]; + if (folder == nil) + return NO; + + arrayOfChildFolders = [self arrayOfSubFolders:folder]; + arrayOfFolderIds = [NSMutableArray arrayWithCapacity:[arrayOfChildFolders count]]; + + // Send the pre-delete notification before we start the transaction so that the handlers can + // safely do any database access. + for (folder in arrayOfChildFolders) + { + numFolder = [NSNumber numberWithInt:[folder itemId]]; + [arrayOfFolderIds addObject:numFolder]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_WillDeleteFolder" object:numFolder]; + } + + // Now do the deletion. [self beginTransaction]; result = [self wrappedDeleteFolder:folderId]; [self commitTransaction]; + + // Send the post-delete notification after we're finished. Note that the folder actually corresponding to + // each numFolder won't exist any more and the handlers need to be aware of this. + for (numFolder in arrayOfFolderIds) + [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_FolderDeleted" object:numFolder]; + return result; } Modified: trunk/2.5.0/notes.html =================================================================== --- trunk/2.5.0/notes.html 2010-01-31 21:14:10 UTC (rev 1507) +++ trunk/2.5.0/notes.html 2010-02-06 14:27:33 UTC (rev 1508) @@ -8,6 +8,7 @@ <li>Added Share With Facebook button.</li> <li>Added Share With Evernote button.</li> <li>Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system.</li> +<li>Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly.</li> </ul> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-08 21:16:19
|
Revision: 1510 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1510&view=rev Author: mstroeck Date: 2010-02-08 21:15:59 +0000 (Mon, 08 Feb 2010) Log Message: ----------- Show the user a notification when a new plugin is installed; or when a plugin fails to load. Modified Paths: -------------- trunk/2.5.0/AppController.m trunk/2.5.0/PluginManager.m Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-07 14:52:44 UTC (rev 1509) +++ trunk/2.5.0/AppController.m 2010-02-08 21:15:59 UTC (rev 1510) @@ -677,6 +677,7 @@ NSString * path = [prefs pluginsFolder]; if ([self installFilename:filename toPath:path]) { + runOKAlertPanel(NSLocalizedString(@"Plugin installed", nil), NSLocalizedString(@"A new plugin has been installed. It is now available from the menu and you can add it to the toolbar.", nil)); NSString * fullPath = [path stringByAppendingPathComponent:[filename lastPathComponent]]; [pluginManager loadPlugin:fullPath]; } Modified: trunk/2.5.0/PluginManager.m =================================================================== --- trunk/2.5.0/PluginManager.m 2010-02-07 14:52:44 UTC (rev 1509) +++ trunk/2.5.0/PluginManager.m 2010-02-08 21:15:59 UTC (rev 1510) @@ -200,7 +200,10 @@ // Warn if we failed to install a plugin if (!didInstall) + { + runOKAlertPanel(NSLocalizedString(@"Plugin could not be installed", nil), NSLocalizedString(@"Vienna failed to install the plugin.", nil), pluginName); NSLog(@"Warning: error in MenuPath (\"%@\") in info.plist for plugin %@", menuPath, pluginName); + } } /* toolbarItems This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-15 10:04:02
|
Revision: 1511 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1511&view=rev Author: mstroeck Date: 2010-02-15 10:03:56 +0000 (Mon, 15 Feb 2010) Log Message: ----------- Add user contributed "Share with Delicious" plugin to the core distribution. Thanks to forum user czanderna. Modified Paths: -------------- trunk/2.5.0/CHANGES Added Paths: ----------- trunk/2.5.0/Plugins/ShareWithDelicious/ trunk/2.5.0/Plugins/ShareWithDelicious/deliciousButton.tiff trunk/2.5.0/Plugins/ShareWithDelicious/info.plist Modified: trunk/2.5.0/CHANGES =================================================================== --- trunk/2.5.0/CHANGES 2010-02-08 21:15:59 UTC (rev 1510) +++ trunk/2.5.0/CHANGES 2010-02-15 10:03:56 UTC (rev 1511) @@ -10,9 +10,11 @@ 2.5.0.2500 ---------- -- Add support for plugins. -- Added Share With Facebook button. -- Added Share With Evernote button. +- Added support for plugins. +- Added "Share With Facebook" button. +- Added "Share With Evernote" button. +- Added "Share With Twitter" button. +- Added user contributed "Share with Delicious" plugin to the core distribution. Thanks to forum user czanderna. - Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system. - Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly. Added: trunk/2.5.0/Plugins/ShareWithDelicious/deliciousButton.tiff =================================================================== (Binary files differ) Property changes on: trunk/2.5.0/Plugins/ShareWithDelicious/deliciousButton.tiff ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/2.5.0/Plugins/ShareWithDelicious/info.plist =================================================================== --- trunk/2.5.0/Plugins/ShareWithDelicious/info.plist (rev 0) +++ trunk/2.5.0/Plugins/ShareWithDelicious/info.plist 2010-02-15 10:03:56 UTC (rev 1511) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Name</key> + <string>ShareWithDelicious</string> + <key>Type</key> + <string>Link</string> + <key>URL</key> + <string>http://delicious.com/save?jump=close&url=$ArticleLink$&title=$ArticleTitle$&v=5&noui&jump=close&src=vienna</string> + <key>Default</key> + <true/> + <key>FriendlyName</key> + <string>Delicious</string> + <key>Tooltip</key> + <string>Share the current article on Delicious</string> + <key>ButtonImage</key> + <string>deliciousButton</string> + <key>MenuPath</key> + <string>Share With Delicious</string> +</dict> +</plist> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-15 14:04:47
|
Revision: 1512 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1512&view=rev Author: mstroeck Date: 2010-02-15 14:04:38 +0000 (Mon, 15 Feb 2010) Log Message: ----------- REMOVE: old blog editor auto-detection and roll it into our plugin-API by introducing a "BlogEditor" plugin type. This has the benefit of getting rid of code while at the same time giving the user the ability to have that functionality in the toolbar. ADD: MarsEdit plugin. TODO: I'll add a check that keeps "Share with XXX" entries out of the application menu unless the app is actually present on the system. TODO: I'll create plugins (complete with icons) for the other compatible editors that we know about. Modified Paths: -------------- trunk/2.5.0/AppController.h trunk/2.5.0/AppController.m trunk/2.5.0/Info.plist trunk/2.5.0/MainMenu.nib/designable.nib trunk/2.5.0/MainMenu.nib/keyedobjects.nib trunk/2.5.0/PluginManager.m Added Paths: ----------- trunk/2.5.0/Plugins/ShareWithMarsEdit/ trunk/2.5.0/Plugins/ShareWithMarsEdit/info.plist trunk/2.5.0/Plugins/ShareWithMarsEdit/marsEditButton.tiff Modified: trunk/2.5.0/AppController.h =================================================================== --- trunk/2.5.0/AppController.h 2010-02-15 10:03:56 UTC (rev 1511) +++ trunk/2.5.0/AppController.h 2010-02-15 14:04:38 UTC (rev 1512) @@ -68,8 +68,6 @@ IBOutlet NSMenuItem * columnsMenu; IBOutlet NSMenuItem * stylesMenu; IBOutlet NSMenuItem * filtersMenu; - IBOutlet NSMenuItem * blogWithMenu; - IBOutlet NSMenuItem * blogWithOneMenu; IBOutlet FilterView * filterView; IBOutlet NSView * cosmeticStatusBarHighlightLine; IBOutlet NSTextField * currentFilterTextField; @@ -155,7 +153,6 @@ -(IBAction)conditionalShowDownloadsWindow:(id)sender; -(IBAction)mailLinkToArticlePage:(id)sender; -(IBAction)openWebLocation:(id)sender; --(IBAction)blogWith:(id)sender; -(IBAction)changeFiltering:(id)sender; -(IBAction)getInfo:(id)sender; -(IBAction)keyboardShortcutsHelp:(id)sender; Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-15 10:03:56 UTC (rev 1511) +++ trunk/2.5.0/AppController.m 2010-02-15 14:04:38 UTC (rev 1512) @@ -79,7 +79,6 @@ -(void)showAppInStatusBar; -(void)initSortMenu; -(void)initColumnsMenu; - -(void)initBlogWithMenu; -(void)initScriptsMenu; -(void)initFiltersMenu; -(NSMenu *)getStylesMenu; @@ -445,7 +444,6 @@ // Initialize the Sort By and Columns menu [self initSortMenu]; [self initColumnsMenu]; - [self initBlogWithMenu]; [self initFiltersMenu]; // Initialize the Styles menu. @@ -1725,58 +1723,6 @@ } } -/* initBlogWithMenu - * Implements auto-discovery of supported blogging tools for use with blogWithExternalEditor. - * Creates a submenu with all known tools found on the system. The dictionary that describes all supported tools currently lives in info.plist. - */ --(void)initBlogWithMenu -{ - NSMenu * blogWithSubMenu = [[[NSMenu alloc] initWithTitle:@"BlogWith"] autorelease]; - - // Get bundle identifiers for supported editors from info.plist - NSDictionary * supportedEditors = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"SupportedEditorsBundleIdentifiers"]; - - // Add the contents of the supportedEditors dictionary keys to the menu, sorted by key name. - NSArray * sortedMenuItems = [[supportedEditors allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; - NSString * lastItem = nil; - int countOfItems = 0; - - for (id currentItem in sortedMenuItems) - { - // Only add the item if the application is present on the system. - if ( [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier: [supportedEditors valueForKey:currentItem]] ) - { - NSMenuItem * menuItem = [[NSMenuItem alloc] initWithTitle:currentItem action:@selector(blogWith:) keyEquivalent:@""]; - [menuItem setRepresentedObject:currentItem]; - [blogWithSubMenu addItem:menuItem]; - [menuItem release]; - lastItem = currentItem; - ++countOfItems; - } - } - - // If no items, remove both the single and submenu blog items. - // Otherwise if there's one item, set the title of the single item and remove the submenu. - // Otherwise remove the single item. - if (countOfItems == 0) - { - [[blogWithMenu menu] removeItem:blogWithMenu]; - [[blogWithOneMenu menu] removeItem:blogWithOneMenu]; - } - else if (countOfItems == 1) - { - NSString * blogMenuItem = [NSString stringWithFormat:NSLocalizedString(@"Blog with %@", nil), lastItem]; - [blogWithOneMenu setTitle:blogMenuItem]; - [blogWithOneMenu setRepresentedObject:lastItem]; - [[blogWithMenu menu] removeItem:blogWithMenu]; - } - else - { - [[blogWithOneMenu menu] removeItem:blogWithOneMenu]; - [blogWithMenu setSubmenu:blogWithSubMenu]; - } -} - /* showUnreadCountOnApplicationIconAndWindowTitle * Update the Vienna application icon to show the number of unread articles. */ @@ -3446,18 +3392,6 @@ #pragma mark Blogging -/* blogWith - * Calls the function which creates an Apple Event for external editor integration. - */ --(IBAction)blogWith:(id)sender -{ - if ([sender isKindOfClass:[NSMenuItem class]]) - { - NSDictionary * supportedEditors = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"SupportedEditorsBundleIdentifiers"]; - [self blogWithExternalEditor:[supportedEditors objectForKey:[sender representedObject]]]; - } -} - /* blogWithExternalEditor * Builds and sends an Apple Event with info from the currently selected articles to the application specified by the bundle identifier that is passed. * Iterates over all currently selected articles and consecutively sends Apple Events to the specified app. Modified: trunk/2.5.0/Info.plist =================================================================== --- trunk/2.5.0/Info.plist 2010-02-15 10:03:56 UTC (rev 1511) +++ trunk/2.5.0/Info.plist 2010-02-15 14:04:38 UTC (rev 1512) @@ -102,28 +102,5 @@ <string>http://vienna-rss.sourceforge.net/changelog$(VIENNA_CHANGELOG_SUFFIX).xml</string> <key>SUPublicDSAKeyFile</key> <string>vienna_public_key.pem</string> - <key>SupportedEditorsBundleIdentifiers</key> - <dict> - <key>Pukka</key> - <string>net.codesorcery.Pukka</string> - <key>Blapp</key> - <string>edu.ucsd.cs.mmccrack.blapp</string> - <key>Cocoalicious</key> - <string>com.scifihifi.Cocoalicious</string> - <key>MarsEdit 1</key> - <string>com.ranchero.MarsEdit</string> - <key>MarsEdit 2</key> - <string>com.red-sweater.marsedit</string> - <key>Xjournal</key> - <string>org.speirs.xjournal</string> - <key>ecto</key> - <string>kungfoo.tv.ecto</string> - <key>BlogThing</key> - <string>com.automagicsoftware.BlogThing</string> - <key>Kaku</key> - <string>jp.lolipop.ppmweb.Kaku</string> - <key>Blogo</key> - <string>com.drinkbrainjuice.Blogo</string> - </dict> </dict> </plist> Modified: trunk/2.5.0/MainMenu.nib/designable.nib =================================================================== --- trunk/2.5.0/MainMenu.nib/designable.nib 2010-02-15 10:03:56 UTC (rev 1511) +++ trunk/2.5.0/MainMenu.nib/designable.nib 2010-02-15 14:04:38 UTC (rev 1512) @@ -2,20 +2,20 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">10A432</string> - <string key="IBDocument.InterfaceBuilderVersion">732</string> - <string key="IBDocument.AppKitVersion">1038</string> - <string key="IBDocument.HIToolboxVersion">437.00</string> + <string key="IBDocument.SystemVersion">10C2234</string> + <string key="IBDocument.InterfaceBuilderVersion">759</string> + <string key="IBDocument.AppKitVersion">1038.25</string> + <string key="IBDocument.HIToolboxVersion">458.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">732</string> + <string key="NS.object.0">759</string> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="1288"/> - <integer value="159"/> <integer value="2"/> <integer value="1300"/> + <integer value="1288"/> + <integer value="300"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -51,7 +51,7 @@ <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> <string key="NSWindowContentMinSize">{213, 107}</string> <object class="NSView" key="NSWindowView" id="711948959"> <reference key="NSNextResponder"/> @@ -80,7 +80,7 @@ <string key="NSColorName">controlColor</string> <object class="NSColor" key="NSColor" id="129727851"> <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes> + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> </object> </object> <object class="NSColor" key="NSTextColor" id="539731423"> @@ -475,7 +475,7 @@ </object> <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string> <string key="NSMinSize">{213, 129}</string> - <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> <string key="NSFrameAutosaveName">mainWindow</string> </object> <object class="NSMenu" id="603900990"> @@ -1684,40 +1684,6 @@ <reference key="NSOnImage" ref="987756768"/> <reference key="NSMixedImage" ref="89095927"/> </object> - <object class="NSMenuItem" id="692537803"> - <reference key="NSMenu" ref="279394353"/> - <string key="NSTitle">Blog with item</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="987756768"/> - <reference key="NSMixedImage" ref="89095927"/> - </object> - <object class="NSMenuItem" id="884753194"> - <reference key="NSMenu" ref="279394353"/> - <string key="NSTitle">Blog With...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="987756768"/> - <reference key="NSMixedImage" ref="89095927"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="509339713"> - <string key="NSTitle">Blog With...</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="912733128"> - <reference key="NSMenu" ref="509339713"/> - <string key="NSTitle">Item</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="987756768"/> - <reference key="NSMixedImage" ref="89095927"/> - </object> - </object> - </object> - </object> </object> </object> </object> @@ -3586,31 +3552,7 @@ <int key="connectionID">1200</int> </object> <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">blogWithMenu</string> - <reference key="source" ref="675460743"/> - <reference key="destination" ref="884753194"/> - </object> - <int key="connectionID">1205</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">blogWithOneMenu</string> - <reference key="source" ref="675460743"/> - <reference key="destination" ref="692537803"/> - </object> - <int key="connectionID">1207</int> - </object> - <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> - <string key="label">blogWith:</string> - <reference key="source" ref="675460743"/> - <reference key="destination" ref="692537803"/> - </object> - <int key="connectionID">1208</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> <string key="label">newTab:</string> <reference key="source" ref="675460743"/> <reference key="destination" ref="786725589"/> @@ -5039,9 +4981,7 @@ <reference ref="912075563"/> <reference ref="1064155807"/> <reference ref="196797626"/> - <reference ref="884753194"/> <reference ref="352289529"/> - <reference ref="692537803"/> <reference ref="548610671"/> </object> <reference key="parent" ref="120391971"/> @@ -5087,39 +5027,11 @@ <reference key="parent" ref="279394353"/> </object> <object class="IBObjectRecord"> - <int key="objectID">1201</int> - <reference key="object" ref="884753194"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="509339713"/> - </object> - <reference key="parent" ref="279394353"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">1202</int> - <reference key="object" ref="509339713"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="912733128"/> - </object> - <reference key="parent" ref="884753194"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">1203</int> - <reference key="object" ref="912733128"/> - <reference key="parent" ref="509339713"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">1204</int> <reference key="object" ref="352289529"/> <reference key="parent" ref="279394353"/> </object> <object class="IBObjectRecord"> - <int key="objectID">1206</int> - <reference key="object" ref="692537803"/> - <reference key="parent" ref="279394353"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">1216</int> <reference key="object" ref="548610671"/> <reference key="parent" ref="279394353"/> @@ -5819,16 +5731,8 @@ <string>1195.ImportedFromIB2</string> <string>1198.IBPluginDependency</string> <string>1198.ImportedFromIB2</string> - <string>1201.IBPluginDependency</string> - <string>1201.ImportedFromIB2</string> - <string>1202.IBPluginDependency</string> - <string>1202.ImportedFromIB2</string> - <string>1203.IBPluginDependency</string> - <string>1203.ImportedFromIB2</string> <string>1204.IBPluginDependency</string> <string>1204.ImportedFromIB2</string> - <string>1206.IBPluginDependency</string> - <string>1206.ImportedFromIB2</string> <string>1214.IBPluginDependency</string> <string>1214.ImportedFromIB2</string> <string>1216.IBPluginDependency</string> @@ -6305,14 +6209,6 @@ <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES"/> <string>{{0, 634}, {100, 100}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> @@ -6450,7 +6346,7 @@ <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> - <string>{{449, 74}, {238, 103}}</string> + <string>{{440, 309}, {238, 103}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -6467,7 +6363,7 @@ <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> - <string>{{298, 134}, {151, 203}}</string> + <string>{{289, 369}, {151, 203}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -6515,10 +6411,10 @@ <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> - <string>{{176, 337}, {471, 20}}</string> + <string>{{167, 572}, {471, 20}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> - <string>{{606, 513}, {352, 223}}</string> + <string>{{444, 389}, {352, 183}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -8268,6 +8164,7 @@ </object> </object> <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> <integer value="1050" key="NS.object.0"/> @@ -8283,5 +8180,22 @@ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> <string key="IBDocument.LastKnownRelativeProjectPath">Vienna.xcodeproj</string> <int key="IBDocument.defaultPropertyAccessControl">3</int> + <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>filter-icon</string> + <string>popupMenuButton.tiff</string> + <string>pressedCloseButton</string> + <string>smallCloseButton</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>{16, 16}</string> + <string>{128, 128}</string> + <string>{12, 13}</string> + <string>{12, 13}</string> + </object> + </object> </data> </archive> Modified: trunk/2.5.0/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/2.5.0/PluginManager.m =================================================================== --- trunk/2.5.0/PluginManager.m 2010-02-15 10:03:56 UTC (rev 1511) +++ trunk/2.5.0/PluginManager.m 2010-02-15 14:04:38 UTC (rev 1512) @@ -372,6 +372,12 @@ // Just run the script [[NSApp delegate] runAppleScript:scriptFile]; } + + else if ([itemType isEqualToString:@"BlogEditor"]) + { + // This is a blog-editor plugin. Simply send the info to the application. + [[NSApp delegate] blogWithExternalEditor:[pluginItem objectForKey:@"BundleIdentifier"]]; + } } } Added: trunk/2.5.0/Plugins/ShareWithMarsEdit/info.plist =================================================================== --- trunk/2.5.0/Plugins/ShareWithMarsEdit/info.plist (rev 0) +++ trunk/2.5.0/Plugins/ShareWithMarsEdit/info.plist 2010-02-15 14:04:38 UTC (rev 1512) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Name</key> + <string>ShareWithMarsEdit</string> + <key>Type</key> + <string>BlogEditor</string> + <key>BundleIdentifier</key> + <string>com.red-sweater.marsedit</string> + <key>Default</key> + <false/> + <key>FriendlyName</key> + <string>MarsEdit</string> + <key>Tooltip</key> + <string>Share the current article via MarsEdit</string> + <key>ButtonImage</key> + <string>marsEditButton</string> + <key>MenuPath</key> + <string>Share via MarsEdit</string> +</dict> +</plist> Added: trunk/2.5.0/Plugins/ShareWithMarsEdit/marsEditButton.tiff =================================================================== (Binary files differ) Property changes on: trunk/2.5.0/Plugins/ShareWithMarsEdit/marsEditButton.tiff ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-17 14:51:44
|
Revision: 1521 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1521&view=rev Author: mstroeck Date: 2010-02-17 14:51:36 +0000 (Wed, 17 Feb 2010) Log Message: ----------- -) Add DEBUG=1 to Development build settings and wrap verifyThreadSafety into a macro so we can do different things in Dev and Deployment. At the moment, we do nothing in Deployment mode. -) Set SQLite to compile as thread safe, while I'm in the build settings. I figure it's better to be prudent here. Modified Paths: -------------- trunk/2.5.0/Database.m trunk/2.5.0/Vienna.xcodeproj/project.pbxproj Modified: trunk/2.5.0/Database.m =================================================================== --- trunk/2.5.0/Database.m 2010-02-16 17:34:12 UTC (rev 1520) +++ trunk/2.5.0/Database.m 2010-02-17 14:51:36 UTC (rev 1521) @@ -26,6 +26,13 @@ #import "ArticleRef.h" #import "SearchString.h" +// Macro that checks for thread safety only in DEBUG mode. +#ifdef DEBUG +# define VerifyThreadSafety() [self verifyThreadSafety]; +#else +# define VerifyThreadSafety() // Do nothing at the moment. +#endif + // Private scope flags #define MA_Scope_Inclusive 1 #define MA_Scope_SubFolders 2 @@ -505,7 +512,7 @@ */ -(int)executeSQL:(NSString *)sqlStatement { - [self verifyThreadSafety]; + VerifyThreadSafety(); [[sqlDatabase performQuery:sqlStatement] release]; return [sqlDatabase lastError]; } @@ -530,6 +537,7 @@ */ -(void)verifyThreadSafety { + NSLog(@"OITA THREAD!"); NSAssert([NSThread currentThread] == mainThread, @"Calling database on wrong thread!"); } @@ -540,7 +548,7 @@ */ -(void)syncLastUpdate { - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * result = [sqlDatabase performQueryWithFormat:@"update info set last_opened='%@'", [NSDate date]]; readOnly = (result == nil); [result release]; @@ -755,7 +763,7 @@ { NSString * preparedURL = [SQLDatabase prepareStringForQuery:url]; - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat: @"insert into rss_folders (folder_id, description, username, home_page, last_update_string, feed_url, bloglines_id) " "values (%d, '', '', '', '', '%@', %d)", @@ -820,7 +828,7 @@ } if (predecessorId < 0) { - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * siblings = [sqlDatabase performQueryWithFormat:@"select folder_id from folders where parent_id=%d and next_sibling=0", parentId]; predecessorId = (siblings && [siblings rowCount]) ? [[[siblings rowAtIndex:0] stringForColumn:@"folder_id"] intValue] : 0; [siblings release]; @@ -890,7 +898,7 @@ // Create the folder in the database. One thing to watch out for here that has // bit me before. When adding new fields to the folders table, remember to init // the field here even if its just to an empty value. - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat: @"insert into folders (foldername, parent_id, unread_count, last_update, type, flags, next_sibling, first_child) values('%@', %d, 0, %f, %d, %d, %d, %d)", preparedName, @@ -981,7 +989,7 @@ // Update the sort order if necessary if ([[Preferences standardPreferences] foldersTreeSortMethod] == MA_FolderSort_Manual) { - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat:@"select folder_id from folders where parent_id=%d and next_sibling=%d", [folder parentId], folderId]; if (results && [results rowCount]) { @@ -1282,7 +1290,7 @@ -(int)firstFolderId { int folderId = 0; - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQuery:@"select first_folder from info"]; if (results && [results rowCount]) { @@ -1428,7 +1436,7 @@ int adjustment = 0; // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); if (existingArticle == nil && [guidHistory containsObject:articleGuid]) { @@ -1571,7 +1579,7 @@ int monthDelta = (daysToKeep / 1000); NSTimeInterval timeDiff = [[[NSCalendarDate calendarDate] dateByAddingYears:0 months:-monthDelta days:-dayDelta hours:0 minutes:0 seconds:0] timeIntervalSince1970]; - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat:@"update messages set deleted_flag=1 where deleted_flag=0 and marked_flag=0 and read_flag=1 and date < %f", timeDiff]; [results release]; } @@ -1584,7 +1592,7 @@ -(void)purgeDeletedArticles { // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQuery:@"delete from messages where deleted_flag=1"]; if (results) @@ -1614,7 +1622,7 @@ NSString * preparedGuid = [SQLDatabase prepareStringForQuery:guid]; // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat:@"delete from messages where folder_id=%d and message_id='%@'", folderId, preparedGuid]; if (results) @@ -1646,7 +1654,7 @@ SQLResult * results; // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); results = [sqlDatabase performQuery:@"select * from smart_folders"]; if (results && [results rowCount]) @@ -1735,7 +1743,7 @@ SQLResult * results; // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); results = [sqlDatabase performQuery:@"select * from folders order by folder_id"]; if (results && [results rowCount]) @@ -1894,7 +1902,7 @@ [folder markFolderEmpty]; // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); results = [sqlDatabase performQueryWithFormat:@"select message_id, read_flag, deleted_flag, title, link, revised_flag, hasenclosure_flag, enclosure from messages where folder_id=%d", folderId]; if (results && [results rowCount]) @@ -2209,7 +2217,7 @@ } else { - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat:@"select message_id from messages where folder_id=%d and read_flag=0", folderId]; if (results && [results rowCount]) { @@ -2263,7 +2271,7 @@ } // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); // Time to run the query SQLResult * results = [sqlDatabase performQuery:queryString]; @@ -2340,7 +2348,7 @@ folder = [self folderFromID:folderId]; if (folder != nil && [folder unreadCount] > 0) { - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat:@"update messages set read_flag=1 where folder_id=%d and read_flag=0", folderId]; if (results) { @@ -2384,7 +2392,7 @@ NSString * preparedGuid = [SQLDatabase prepareStringForQuery:guid]; // Verify we're on the right thread - [self verifyThreadSafety]; + VerifyThreadSafety(); // Mark an individual article read SQLResult * results = [sqlDatabase performQueryWithFormat:@"update messages set read_flag=%d where folder_id=%d and message_id='%@'", isRead, folderId, preparedGuid]; @@ -2446,7 +2454,7 @@ */ -(BOOL)isTrashEmpty { - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQuery:@"select deleted_flag from messages where deleted_flag=1"]; if (results) { @@ -2472,7 +2480,7 @@ { NSMutableArray * articleGuids = [NSMutableArray array]; - [self verifyThreadSafety]; + VerifyThreadSafety(); SQLResult * results = [sqlDatabase performQueryWithFormat:@"select message_id from rss_guids where folder_id=%i", folderId]; if (results) { Modified: trunk/2.5.0/Vienna.xcodeproj/project.pbxproj =================================================================== --- trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-02-16 17:34:12 UTC (rev 1520) +++ trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-02-17 14:51:36 UTC (rev 1521) @@ -2558,9 +2558,10 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Vienna_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", "HAVE_USLEEP=1", - "SQLITE_THREADSAFE=0", - LOG_QUERY_TIMES, + "SQLITE_THREADSAFE=1", + "LOG_QUERY_TIMES=1", ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; @@ -2582,7 +2583,7 @@ GCC_PREFIX_HEADER = Vienna_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ( "HAVE_USLEEP=1", - "SQLITE_THREADSAFE=0", + "SQLITE_THREADSAFE=1", ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-18 13:09:14
|
Revision: 1523 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1523&view=rev Author: mstroeck Date: 2010-02-18 12:22:12 +0000 (Thu, 18 Feb 2010) Log Message: ----------- Roll back verifyThreadSafety changes. Modified Paths: -------------- trunk/2.5.0/Database.m trunk/2.5.0/Vienna.xcodeproj/project.pbxproj Modified: trunk/2.5.0/Database.m =================================================================== --- trunk/2.5.0/Database.m 2010-02-17 15:50:22 UTC (rev 1522) +++ trunk/2.5.0/Database.m 2010-02-18 12:22:12 UTC (rev 1523) @@ -26,13 +26,6 @@ #import "ArticleRef.h" #import "SearchString.h" -// Macro that checks for thread safety only in DEBUG mode. -#ifdef DEBUG -# define VerifyThreadSafety() [self verifyThreadSafety]; -#else -# define VerifyThreadSafety() // Do nothing at the moment. -#endif - // Private scope flags #define MA_Scope_Inclusive 1 #define MA_Scope_SubFolders 2 @@ -512,7 +505,7 @@ */ -(int)executeSQL:(NSString *)sqlStatement { - VerifyThreadSafety(); + [self verifyThreadSafety]; [[sqlDatabase performQuery:sqlStatement] release]; return [sqlDatabase lastError]; } @@ -547,7 +540,7 @@ */ -(void)syncLastUpdate { - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * result = [sqlDatabase performQueryWithFormat:@"update info set last_opened='%@'", [NSDate date]]; readOnly = (result == nil); [result release]; @@ -762,7 +755,7 @@ { NSString * preparedURL = [SQLDatabase prepareStringForQuery:url]; - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat: @"insert into rss_folders (folder_id, description, username, home_page, last_update_string, feed_url, bloglines_id) " "values (%d, '', '', '', '', '%@', %d)", @@ -827,7 +820,7 @@ } if (predecessorId < 0) { - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * siblings = [sqlDatabase performQueryWithFormat:@"select folder_id from folders where parent_id=%d and next_sibling=0", parentId]; predecessorId = (siblings && [siblings rowCount]) ? [[[siblings rowAtIndex:0] stringForColumn:@"folder_id"] intValue] : 0; [siblings release]; @@ -897,7 +890,7 @@ // Create the folder in the database. One thing to watch out for here that has // bit me before. When adding new fields to the folders table, remember to init // the field here even if its just to an empty value. - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat: @"insert into folders (foldername, parent_id, unread_count, last_update, type, flags, next_sibling, first_child) values('%@', %d, 0, %f, %d, %d, %d, %d)", preparedName, @@ -988,7 +981,7 @@ // Update the sort order if necessary if ([[Preferences standardPreferences] foldersTreeSortMethod] == MA_FolderSort_Manual) { - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat:@"select folder_id from folders where parent_id=%d and next_sibling=%d", [folder parentId], folderId]; if (results && [results rowCount]) { @@ -1289,7 +1282,7 @@ -(int)firstFolderId { int folderId = 0; - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQuery:@"select first_folder from info"]; if (results && [results rowCount]) { @@ -1435,7 +1428,7 @@ int adjustment = 0; // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; if (existingArticle == nil && [guidHistory containsObject:articleGuid]) { @@ -1578,7 +1571,7 @@ int monthDelta = (daysToKeep / 1000); NSTimeInterval timeDiff = [[[NSCalendarDate calendarDate] dateByAddingYears:0 months:-monthDelta days:-dayDelta hours:0 minutes:0 seconds:0] timeIntervalSince1970]; - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat:@"update messages set deleted_flag=1 where deleted_flag=0 and marked_flag=0 and read_flag=1 and date < %f", timeDiff]; [results release]; } @@ -1591,7 +1584,7 @@ -(void)purgeDeletedArticles { // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQuery:@"delete from messages where deleted_flag=1"]; if (results) @@ -1621,7 +1614,7 @@ NSString * preparedGuid = [SQLDatabase prepareStringForQuery:guid]; // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat:@"delete from messages where folder_id=%d and message_id='%@'", folderId, preparedGuid]; if (results) @@ -1653,7 +1646,7 @@ SQLResult * results; // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; results = [sqlDatabase performQuery:@"select * from smart_folders"]; if (results && [results rowCount]) @@ -1742,7 +1735,7 @@ SQLResult * results; // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; results = [sqlDatabase performQuery:@"select * from folders order by folder_id"]; if (results && [results rowCount]) @@ -1901,7 +1894,7 @@ [folder markFolderEmpty]; // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; results = [sqlDatabase performQueryWithFormat:@"select message_id, read_flag, deleted_flag, title, link, revised_flag, hasenclosure_flag, enclosure from messages where folder_id=%d", folderId]; if (results && [results rowCount]) @@ -2216,7 +2209,7 @@ } else { - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat:@"select message_id from messages where folder_id=%d and read_flag=0", folderId]; if (results && [results rowCount]) { @@ -2270,7 +2263,7 @@ } // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; // Time to run the query SQLResult * results = [sqlDatabase performQuery:queryString]; @@ -2347,7 +2340,7 @@ folder = [self folderFromID:folderId]; if (folder != nil && [folder unreadCount] > 0) { - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat:@"update messages set read_flag=1 where folder_id=%d and read_flag=0", folderId]; if (results) { @@ -2391,7 +2384,7 @@ NSString * preparedGuid = [SQLDatabase prepareStringForQuery:guid]; // Verify we're on the right thread - VerifyThreadSafety(); + [self verifyThreadSafety]; // Mark an individual article read SQLResult * results = [sqlDatabase performQueryWithFormat:@"update messages set read_flag=%d where folder_id=%d and message_id='%@'", isRead, folderId, preparedGuid]; @@ -2453,7 +2446,7 @@ */ -(BOOL)isTrashEmpty { - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQuery:@"select deleted_flag from messages where deleted_flag=1"]; if (results) { @@ -2479,7 +2472,7 @@ { NSMutableArray * articleGuids = [NSMutableArray array]; - VerifyThreadSafety(); + [self verifyThreadSafety]; SQLResult * results = [sqlDatabase performQueryWithFormat:@"select message_id from rss_guids where folder_id=%i", folderId]; if (results) { Modified: trunk/2.5.0/Vienna.xcodeproj/project.pbxproj =================================================================== --- trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-02-17 15:50:22 UTC (rev 1522) +++ trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-02-18 12:22:12 UTC (rev 1523) @@ -2560,7 +2560,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "HAVE_USLEEP=1", - "SQLITE_THREADSAFE=1", + "SQLITE_THREADSAFE=0", "LOG_QUERY_TIMES=1", ); INFOPLIST_FILE = Info.plist; @@ -2583,7 +2583,7 @@ GCC_PREFIX_HEADER = Vienna_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ( "HAVE_USLEEP=1", - "SQLITE_THREADSAFE=1", + "SQLITE_THREADSAFE=0", ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-20 17:39:08
|
Revision: 1524 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1524&view=rev Author: mstroeck Date: 2010-02-20 17:38:59 +0000 (Sat, 20 Feb 2010) Log Message: ----------- Beware, large commit. -) Add a new plugin-type: Search Engines - PLEASE TEST! _) Add two engines to the search drop-down menu: Google and Twitter. TODO: The setting of the placeholder string in the toolbar search field is completely wonky - I'll have to think my way through this tomorrow or so. Modified Paths: -------------- trunk/2.5.0/AppController.h trunk/2.5.0/AppController.m trunk/2.5.0/Constants.h trunk/2.5.0/Constants.m trunk/2.5.0/PluginManager.h trunk/2.5.0/PluginManager.m trunk/2.5.0/Preferences.h trunk/2.5.0/Preferences.m trunk/2.5.0/Vienna.xcodeproj/project.pbxproj Added Paths: ----------- trunk/2.5.0/Plugins/SearchWithGoogle/ trunk/2.5.0/Plugins/SearchWithGoogle/info.plist trunk/2.5.0/Plugins/SearchWithTwitter/ trunk/2.5.0/Plugins/SearchWithTwitter/info.plist trunk/2.5.0/SearchMethod.h trunk/2.5.0/SearchMethod.m Modified: trunk/2.5.0/AppController.h =================================================================== --- trunk/2.5.0/AppController.h 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/AppController.h 2010-02-20 17:38:59 UTC (rev 1524) @@ -205,4 +205,6 @@ -(NSLayoutManager *)layoutManager; -(void)viewAnimationCompleted:(NSView *)theView withTag:(int)viewTag; -(void)growlNotify:(id)notifyContext title:(NSString *)title description:(NSString *)description notificationName:(NSString *)notificationName; +-(void)performWebSearch:(SearchMethod *)searchMethod; +-(void)performAllArticlesSearch; @end Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/AppController.m 2010-02-20 17:38:59 UTC (rev 1524) @@ -51,6 +51,7 @@ #import "ToolbarItem.h" #import "ClickableProgressIndicator.h" #import "SearchPanel.h" +#import "SearchMethod.h" #import <Sparkle/Sparkle.h> #import <WebKit/WebKit.h> #import <Growl/GrowlDefines.h> @@ -484,7 +485,8 @@ [[filterSearchField cell] setSearchMenuTemplate:[self searchFieldMenu]]; // Set the placeholder string for the global search field - [[searchField cell] setPlaceholderString:NSLocalizedString(@"Search all articles", nil)]; + SearchMethod * currentSearchMethod = [[Preferences standardPreferences] searchMethod]; + [[searchField cell] setPlaceholderString:NSLocalizedString([currentSearchMethod friendlyName], nil)]; // Add Scripts menu if we have any scripts if (!hasOSScriptsMenu()) @@ -750,9 +752,59 @@ [cellMenu insertItem:item atIndex:2]; [item release]; + SearchMethod * searchMethod; + NSString * friendlyName; + + [cellMenu addItem: [NSMenuItem separatorItem]]; + + // Add the built-in search methods to the menu. Only one right now. + searchMethod = [SearchMethod searchAllArticlesMethod]; + friendlyName = [searchMethod friendlyName]; + item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(friendlyName, nil) action:@selector(setSearchMethod:) keyEquivalent:@""]; + [item setRepresentedObject: searchMethod]; + // Is this the currently set search method? If yes, mark it as such. + if ( [friendlyName isEqualToString:[[[Preferences standardPreferences] searchMethod] friendlyName]] ) + [item setState:NSOnState]; + [cellMenu addItem:item]; + [item release]; + + // Add all available plugged-in search methods to the menu. + NSMutableArray * searchMethods = [NSMutableArray arrayWithArray:[pluginManager searchMethods]]; + if ([searchMethods count] > 0) + { + [cellMenu addItem: [NSMenuItem separatorItem]]; + + for (searchMethod in searchMethods) + { + if (![searchMethod friendlyName]) + continue; + item = [[NSMenuItem alloc] initWithTitle:[searchMethod friendlyName] action:@selector(setSearchMethod:) keyEquivalent:@""]; + [item setRepresentedObject: searchMethod]; + // Is this the currently set search method? If yes, mark it as such. + if ( [[searchMethod friendlyName] isEqualToString: [[[Preferences standardPreferences] searchMethod] friendlyName]] ) + [item setState:NSOnState]; + [cellMenu addItem:item]; + [item release]; + } + } return [cellMenu autorelease]; } + +/* setSearchMethod + */ +-(void)setSearchMethod:(NSMenuItem *)sender +{ + [[Preferences standardPreferences] setSearchMethod: [sender representedObject]]; + + for (NSMenuItem * item in [[sender menu] itemArray]) + [item setState:NSOffState]; + + [sender setState:NSOnState]; + NSLog(@"Zuerst: %@", [[[Preferences standardPreferences] searchMethod] friendlyName]); + [[searchField cell] setPlaceholderString:[sender title]]; +} + /* standardURLs */ -(NSDictionary *)standardURLs @@ -3124,6 +3176,7 @@ -(void)updateSearchPlaceholder { NSView<BaseView> * theView = [browserView activeTabItemView]; + if ([theView isKindOfClass:[BrowserPane class]]) { [[searchField cell] setPlaceholderString:NSLocalizedString(@"Search current web page", nil)]; @@ -3132,6 +3185,7 @@ { [[searchField cell] setPlaceholderString:NSLocalizedString(@"Search all articles", nil)]; } + if ([[Preferences standardPreferences] layout] == MA_Layout_Unified) { [[filterSearchField cell] setSendsWholeSearchString:YES]; @@ -3211,7 +3265,12 @@ -(IBAction)searchUsingToolbarTextField:(id)sender { [self setSearchString:[searchField stringValue]]; - + SearchMethod * currentSearchMethod = [[Preferences standardPreferences] searchMethod]; + [self performSelector:[currentSearchMethod handler] withObject: currentSearchMethod]; +} + +-(void)performAllArticlesSearch +{ // The browser needs to be handled separately NSView<BaseView> * theView = [browserView activeTabItemView]; if ([theView isKindOfClass:[BrowserPane class]]) @@ -3223,6 +3282,11 @@ [self searchArticlesWithString:[searchField stringValue]]; } +-(void)performWebSearch:(SearchMethod *)searchMethod +{ + [self createNewTab:[searchMethod queryURLforSearchString:searchString] inBackground:NO]; +} + /* searchArticlesWithString * Do the actual article search. The database is called to set the search string * and then we make sure the search folder is selected so that the subsequent Modified: trunk/2.5.0/Constants.h =================================================================== --- trunk/2.5.0/Constants.h 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/Constants.h 2010-02-20 17:38:59 UTC (rev 1524) @@ -68,6 +68,7 @@ extern NSString * MAPref_HighestViennaVersionRun; extern NSString * MAPref_ShouldSaveFeedSource; extern NSString * MAPref_ShouldSaveFeedSourceBackup; +extern NSString * MAPref_SearchMethod; extern int MA_Default_BackTrackQueueSize; extern int MA_Default_RefreshThreads; Modified: trunk/2.5.0/Constants.m =================================================================== --- trunk/2.5.0/Constants.m 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/Constants.m 2010-02-20 17:38:59 UTC (rev 1524) @@ -67,6 +67,7 @@ NSString * MAPref_HighestViennaVersionRun = @"HighestViennaVersionRun"; NSString * MAPref_ShouldSaveFeedSource = @"ShouldSaveFeedSource"; NSString * MAPref_ShouldSaveFeedSourceBackup = @"ShouldSaveFeedSourceBackup"; +NSString * MAPref_SearchMethod = @"SearchMethod"; const int MA_Default_BackTrackQueueSize = 20; const int MA_Default_RefreshThreads = 20; Modified: trunk/2.5.0/PluginManager.h =================================================================== --- trunk/2.5.0/PluginManager.h 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/PluginManager.h 2010-02-20 17:38:59 UTC (rev 1524) @@ -20,12 +20,14 @@ #import <Cocoa/Cocoa.h> #import "ToolbarItem.h" +#import "SearchMethod.h" @interface PluginManager : NSObject { NSMutableDictionary * allPlugins; } -(void)resetPlugins; +-(NSArray *)searchMethods; -(NSArray *)toolbarItems; -(NSArray *)defaultToolbarItems; -(void)loadPlugin:(NSString *)pluginPath; Modified: trunk/2.5.0/PluginManager.m =================================================================== --- trunk/2.5.0/PluginManager.m 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/PluginManager.m 2010-02-20 17:38:59 UTC (rev 1524) @@ -26,6 +26,7 @@ #import "Message.h" #import "BrowserPane.h" #import "BitlyAPIHelper.h" +#import "SearchMethod.h" @interface PluginManager (Private) -(void)installPlugin:(NSDictionary *)onePlugin; @@ -40,7 +41,7 @@ { if ((self = [super init]) != nil) { - allPlugins = nil; + allPlugins = nil; } return self; } @@ -216,12 +217,40 @@ } } +/* searchMethods + * Returns an NSArray of plugin-info dictionaries which can be added to the search-box menu. + */ +-(NSArray *)searchMethods +{ + NSMutableArray * searchMethods = [NSMutableArray arrayWithCapacity:[allPlugins count]]; + for (NSDictionary * plugin in [allPlugins allValues]) + { + if ([[plugin valueForKey:@"Type"] isEqualToString:@"SearchEngine"]) + { + SearchMethod * method = [[SearchMethod alloc] initWithDictionary:plugin]; + [searchMethods addObject:method]; + [method release]; + } + } + return searchMethods; +} + /* toolbarItems * Returns an NSArray of names of any plugins which can be added to the toolbar. */ -(NSArray *)toolbarItems { - return [allPlugins allKeys]; + NSMutableArray * toolbarKeys = [NSMutableArray arrayWithCapacity:[allPlugins count]]; + NSString * pluginName; + NSString * pluginType; + for (pluginName in allPlugins) + { + NSDictionary * onePlugin = [allPlugins objectForKey:pluginName]; + pluginType = [onePlugin objectForKey:@"Type"]; + if (![pluginType isEqualToString:@"SearchEngine"]) + [toolbarKeys addObject:pluginName]; + } + return toolbarKeys; } /* defaultToolbarItems Added: trunk/2.5.0/Plugins/SearchWithGoogle/info.plist =================================================================== --- trunk/2.5.0/Plugins/SearchWithGoogle/info.plist (rev 0) +++ trunk/2.5.0/Plugins/SearchWithGoogle/info.plist 2010-02-20 17:38:59 UTC (rev 1524) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Name</key> + <string>SearchWithGoogle</string> + <key>Type</key> + <string>SearchEngine</string> + <key>SearchQueryString</key> + <string>http://www.google.com/search?q=$SearchTerm$</string> + <key>FriendlyName</key> + <string>Google</string> + <key>Tooltip</key> + <string>Search with Google</string> +</dict> +</plist> Added: trunk/2.5.0/Plugins/SearchWithTwitter/info.plist =================================================================== --- trunk/2.5.0/Plugins/SearchWithTwitter/info.plist (rev 0) +++ trunk/2.5.0/Plugins/SearchWithTwitter/info.plist 2010-02-20 17:38:59 UTC (rev 1524) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Name</key> + <string>SearchWithTwitter</string> + <key>Type</key> + <string>SearchEngine</string> + <key>SearchQueryString</key> + <string>http://search.twitter.com/search?q=$SearchTerm$</string> + <key>FriendlyName</key> + <string>Twitter</string> + <key>Tooltip</key> + <string>Search with Twitter</string> +</dict> +</plist> Modified: trunk/2.5.0/Preferences.h =================================================================== --- trunk/2.5.0/Preferences.h 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/Preferences.h 2010-02-20 17:38:59 UTC (rev 1524) @@ -20,6 +20,8 @@ #import <Cocoa/Cocoa.h> +@ class SearchMethod; + @interface Preferences : NSObject { id userPrefs; NSString * profilePath; @@ -55,6 +57,7 @@ NSFont * folderFont; NSFont * articleFont; NSArray * articleSortDescriptors; + SearchMethod * searchMethod; } // Accessor functions @@ -195,4 +198,8 @@ -(BOOL)shouldSaveFeedSource; -(void)setShouldSaveFeedSource:(BOOL)shouldSave; +// Current search method +-(SearchMethod *)searchMethod; +-(void)setSearchMethod:(SearchMethod *)newMethod; + @end \ No newline at end of file Modified: trunk/2.5.0/Preferences.m =================================================================== --- trunk/2.5.0/Preferences.m 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/Preferences.m 2010-02-20 17:38:59 UTC (rev 1524) @@ -21,6 +21,7 @@ #import "Preferences.h" #import "Constants.h" #import "Message.h" +#import "SearchMethod.h" #import <Sparkle/Sparkle.h> // Initial paths @@ -174,7 +175,9 @@ articleFont = [[NSUnarchiver unarchiveObjectWithData:[userPrefs objectForKey:MAPref_ArticleListFont]] retain]; downloadFolder = [[userPrefs valueForKey:MAPref_DownloadsFolder] retain]; shouldSaveFeedSource = [self boolForKey:MAPref_ShouldSaveFeedSource]; - + searchMethod = [[NSKeyedUnarchiver unarchiveObjectWithData:[userPrefs objectForKey:MAPref_SearchMethod]] retain]; + NSLog(@"Schau: %@", [searchMethod friendlyName]); + if (shouldSaveFeedSource) { [self createFeedSourcesFolderIfNecessary]; @@ -214,6 +217,7 @@ [articleSortDescriptors release]; [profilePath release]; [feedSourcesFolder release]; + [searchMethod release]; [super dealloc]; } @@ -269,6 +273,7 @@ [defaultValues setObject:[NSNumber numberWithInt:0] forKey:MAPref_LastViennaVersionRun]; [defaultValues setObject:boolYes forKey:MAPref_ShouldSaveFeedSource]; [defaultValues setObject:boolNo forKey:MAPref_ShouldSaveFeedSourceBackup]; + [defaultValues setObject:[NSKeyedArchiver archivedDataWithRootObject:[SearchMethod searchAllArticlesMethod]] forKey:MAPref_SearchMethod]; return defaultValues; } @@ -579,6 +584,27 @@ } } +/* setSearchMethod + * Updates the current search method that the user has chosen from the search field menu. + */ +-(void)setSearchMethod:(SearchMethod *)newMethod +{ + [searchMethod release]; + [newMethod retain]; + searchMethod = newMethod; + [self setObject:[NSKeyedArchiver archivedDataWithRootObject:newMethod] forKey:MAPref_SearchMethod]; +} + +/* searchMethod + * Updates the current search method that the user has chosen from the search field menu. + */ +-(SearchMethod *)searchMethod +{ + return searchMethod; +} + + + /* refreshFrequency * Return the frequency with which we refresh all subscriptions */ Added: trunk/2.5.0/SearchMethod.h =================================================================== --- trunk/2.5.0/SearchMethod.h (rev 0) +++ trunk/2.5.0/SearchMethod.h 2010-02-20 17:38:59 UTC (rev 1524) @@ -0,0 +1,38 @@ +// +// SearchMethod.m +// Vienna +// +// Created by Michael on 19/02/10. +// Copyright 2010 Michael G. Stroeck. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +@interface SearchMethod : NSObject <NSCoding> { + NSString * friendlyName; + NSString * searchQueryString; + SEL handler; +} + ++(SearchMethod *)searchAllArticlesMethod; + +-(id)initWithDictionary:(NSDictionary *)dict; // Designated initializer. +- (NSURL *)queryURLforSearchString:(NSString *)searchString; +-(NSString *)searchQueryString; +-(void)setSearchQueryString:(NSString *)newQueryString; +-(NSString *)friendlyName; +-(void)setFriendlyName:(NSString *)newName; +-(void)setHandler:(SEL)theHandler; +-(SEL)handler; + +@end \ No newline at end of file Added: trunk/2.5.0/SearchMethod.m =================================================================== --- trunk/2.5.0/SearchMethod.m (rev 0) +++ trunk/2.5.0/SearchMethod.m 2010-02-20 17:38:59 UTC (rev 1524) @@ -0,0 +1,129 @@ +// +// SearchMethod.m +// Vienna +// +// Created by Michael on 19/02/10. +// Copyright 2010 Michael G. Stroeck. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + + +#import "SearchMethod.h" +#import "HelperFunctions.h" +#import "AppController.h" + +@implementation SearchMethod + +-(id)init +{ + if ((self = [super init]) != nil) + { + friendlyName = nil; + searchQueryString = nil; + handler = nil; + } + return self; +} + +-(id)initWithDictionary:(NSDictionary *)dict +{ + if ((self = [super init]) != nil) + { + friendlyName = [dict valueForKey:@"FriendlyName"]; + searchQueryString = [dict valueForKey:@"SearchQueryString"]; + /* This class is designed to be capable of doing different things with searches + * according to the plugin definition. At the moment, however, we only ever + * do a normal web-search when we initialize from a plugn dict.*/ + handler = @selector(performWebSearch:); + } + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder; // We need to conform to NSCoder so we can store SearchMethods in the Defaults database. +{ + [coder encodeObject:friendlyName forKey:@"friendlyName"]; + [coder encodeObject:searchQueryString forKey:@"searchQueryString"]; + [coder encodeValueOfObjCType:@encode(SEL) at:&handler]; +} + +- (id)initWithCoder:(NSCoder *)coder; +{ + if ((self = [super init]) != nil) + { + [self setFriendlyName:[coder decodeObjectForKey:@"friendlyName"]]; + [self setSearchQueryString:[coder decodeObjectForKey:@"searchQueryString"]]; + [coder decodeValueOfObjCType:@encode(SEL) at:&handler]; + } + return self; +} + +- (NSURL *)queryURLforSearchString:(NSString *)searchString; +{ + NSURL * queryURL; + NSString * temp = [[self searchQueryString] stringByReplacingOccurrencesOfString:@"$SearchTerm$" withString:searchString]; + queryURL = cleanedUpAndEscapedUrlFromString(temp); + return queryURL; +} + ++(SearchMethod *)searchAllArticlesMethod +{ + SearchMethod * method = [[SearchMethod alloc] init]; + [method setFriendlyName:@"Search all articles"]; + [method setHandler:@selector(performAllArticlesSearch)]; + + return method; +} + +// Getters and setters. + +-(void)setFriendlyName:(NSString *) newName +{ + [friendlyName release]; + friendlyName = [newName retain]; +} + +-(NSString *)friendlyName +{ + return friendlyName; +} + +-(NSString *)searchQueryString +{ + return searchQueryString; +} + +-(void)setSearchQueryString:(NSString *) newQueryString +{ + [searchQueryString release]; + searchQueryString = [newQueryString retain]; +} + +-(void)setHandler:(SEL) theHandler +{ + handler = theHandler; +} + +-(SEL)handler +{ + return handler; +} + +-(void)dealloc +{ + [friendlyName release]; + [searchQueryString release]; + [super dealloc]; +} + +@end Modified: trunk/2.5.0/Vienna.xcodeproj/project.pbxproj =================================================================== --- trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-02-18 12:22:12 UTC (rev 1523) +++ trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-02-20 17:38:59 UTC (rev 1524) @@ -231,6 +231,7 @@ AAFDB7AF0C0B1516000D1643 /* smartFolder.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AAFDB7AE0C0B1516000D1643 /* smartFolder.tiff */; }; B2108658109F8127001D4E7C /* XMLSourceWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = B2108657109F8127001D4E7C /* XMLSourceWindow.m */; }; B210865A109F8196001D4E7C /* XMLSource.nib in Resources */ = {isa = PBXBuildFile; fileRef = B2108659109F8196001D4E7C /* XMLSource.nib */; }; + B2224795112F0667008579B0 /* SearchMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = B2224772112F041E008579B0 /* SearchMethod.m */; }; B23A794410FF50B10085C85B /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B23A794310FF50B10085C85B /* Sparkle.framework */; }; B23A794D10FF50BE0085C85B /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = B23A794310FF50B10085C85B /* Sparkle.framework */; }; B2554731106913760065E9C3 /* errorpagelogo.png in Resources */ = {isa = PBXBuildFile; fileRef = B2554730106913760065E9C3 /* errorpagelogo.png */; }; @@ -848,6 +849,8 @@ B2108656109F8127001D4E7C /* XMLSourceWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLSourceWindow.h; sourceTree = "<group>"; }; B2108657109F8127001D4E7C /* XMLSourceWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XMLSourceWindow.m; sourceTree = "<group>"; }; B2108659109F8196001D4E7C /* XMLSource.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = XMLSource.nib; sourceTree = "<group>"; }; + B2224771112F041E008579B0 /* SearchMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchMethod.h; sourceTree = "<group>"; }; + B2224772112F041E008579B0 /* SearchMethod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchMethod.m; sourceTree = "<group>"; }; B2321D0F1115CDA30044CF54 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; }; B23A794310FF50B10085C85B /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; }; B2554730106913760065E9C3 /* errorpagelogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = errorpagelogo.png; sourceTree = "<group>"; }; @@ -967,6 +970,8 @@ 2A37F4ABFDCFA73011CA2CEA /* Classes */ = { isa = PBXGroup; children = ( + B2224771112F041E008579B0 /* SearchMethod.h */, + B2224772112F041E008579B0 /* SearchMethod.m */, B2E09F2B111192B7003B530A /* DSClickableURLTextField.h */, B2E09F2C111192B7003B530A /* DSClickableURLTextField.m */, AA0FB5E00869110300D9CB90 /* ActivityLog.h */, @@ -2077,6 +2082,7 @@ B283D5A410986CE600A5CD72 /* RichXMLParser.m in Sources */, B283D5A510986CE600A5CD72 /* XMLTag.m in Sources */, 8D15AC320486D014006FF6A4 /* main.m in Sources */, + B2224795112F0667008579B0 /* SearchMethod.m in Sources */, AA26F4850604911B00FE7994 /* SQLDatabase.m in Sources */, AA26F4870604911B00FE7994 /* SQLResult.m in Sources */, AA26F4880604911B00FE7994 /* SQLRow.m in Sources */, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-21 00:41:03
|
Revision: 1525 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1525&view=rev Author: mstroeck Date: 2010-02-21 00:40:56 +0000 (Sun, 21 Feb 2010) Log Message: ----------- Minor tweaks, and add missing autorelease in searchAllArticlesMethod. Modified Paths: -------------- trunk/2.5.0/AppController.m trunk/2.5.0/SearchMethod.h trunk/2.5.0/SearchMethod.m Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-20 17:38:59 UTC (rev 1524) +++ trunk/2.5.0/AppController.m 2010-02-21 00:40:56 UTC (rev 1525) @@ -801,7 +801,7 @@ [item setState:NSOffState]; [sender setState:NSOnState]; - NSLog(@"Zuerst: %@", [[[Preferences standardPreferences] searchMethod] friendlyName]); + NSLog(@"new method: %@", [[[Preferences standardPreferences] searchMethod] friendlyName]); [[searchField cell] setPlaceholderString:[sender title]]; } Modified: trunk/2.5.0/SearchMethod.h =================================================================== --- trunk/2.5.0/SearchMethod.h 2010-02-20 17:38:59 UTC (rev 1524) +++ trunk/2.5.0/SearchMethod.h 2010-02-21 00:40:56 UTC (rev 1525) @@ -27,7 +27,7 @@ +(SearchMethod *)searchAllArticlesMethod; -(id)initWithDictionary:(NSDictionary *)dict; // Designated initializer. -- (NSURL *)queryURLforSearchString:(NSString *)searchString; +-(NSURL *)queryURLforSearchString:(NSString *)searchString; -(NSString *)searchQueryString; -(void)setSearchQueryString:(NSString *)newQueryString; -(NSString *)friendlyName; Modified: trunk/2.5.0/SearchMethod.m =================================================================== --- trunk/2.5.0/SearchMethod.m 2010-02-20 17:38:59 UTC (rev 1524) +++ trunk/2.5.0/SearchMethod.m 2010-02-21 00:40:56 UTC (rev 1525) @@ -82,7 +82,7 @@ [method setFriendlyName:@"Search all articles"]; [method setHandler:@selector(performAllArticlesSearch)]; - return method; + return [method autorelease]; } // Getters and setters. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-21 14:35:56
|
Revision: 1526 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1526&view=rev Author: mstroeck Date: 2010-02-21 14:35:50 +0000 (Sun, 21 Feb 2010) Log Message: ----------- Put CFStringRef percentEscape(NSString *string) into HelperFunctions (was in AppController) because I'll need it somewhere else as well. Modified Paths: -------------- trunk/2.5.0/AppController.m trunk/2.5.0/HelperFunctions.h trunk/2.5.0/HelperFunctions.m Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-21 00:40:56 UTC (rev 1525) +++ trunk/2.5.0/AppController.m 2010-02-21 14:35:50 UTC (rev 1526) @@ -3354,20 +3354,6 @@ } -/* percentEscape - * Escape invalid and reserved URL characters to make string suitable for embedding in mailto: URLs. - */ -static CFStringRef percentEscape(NSString *string) -{ - return CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, - - // RFC2368 says all URL reserved characters must be encoded - // these are all the reserved characters from RFC3986 - CFSTR("/:?#[]@!$&'()*+,;="), - - kCFStringEncodingUTF8); -} - /* mailLinkToArticlePage * Prompts the default email application to send a link to the currently selected article(s). * Builds a string that contains a well-formed link according to the "mailto:"-scheme (RFC2368). Modified: trunk/2.5.0/HelperFunctions.h =================================================================== --- trunk/2.5.0/HelperFunctions.h 2010-02-21 00:40:56 UTC (rev 1525) +++ trunk/2.5.0/HelperFunctions.h 2010-02-21 14:35:50 UTC (rev 1526) @@ -47,3 +47,4 @@ NSURL * cleanedUpAndEscapedUrlFromString(NSString * theUrl); BOOL hasOSScriptsMenu(void); OSStatus GotoHelpPage(CFStringRef pagePath, CFStringRef anchorName); +CFStringRef percentEscape(NSString *string); Modified: trunk/2.5.0/HelperFunctions.m =================================================================== --- trunk/2.5.0/HelperFunctions.m 2010-02-21 00:40:56 UTC (rev 1525) +++ trunk/2.5.0/HelperFunctions.m 2010-02-21 14:35:50 UTC (rev 1526) @@ -79,6 +79,21 @@ return nil; } +/* percentEscape + * Escape invalid and reserved URL characters to make string suitable + * for embedding in mailto: URLs and custom app-specific schemes like papers:// + */ +CFStringRef percentEscape(NSString *string) +{ + return CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, + + // RFC2368 says all URL reserved characters must be encoded + // these are all the reserved characters from RFC3986 + CFSTR("/:?#[]@!$&'()*+,;="), + + kCFStringEncodingUTF8); +} + /* cleanedUpAndEscapedUrlFromString * Uses WebKit to clean up user-entered URLs that might contain umlauts, diacritics and other * IDNA related stuff in the domain, or God knows what in filenames and arguments. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-21 20:43:47
|
Revision: 1531 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1531&view=rev Author: mstroeck Date: 2010-02-21 20:43:40 +0000 (Sun, 21 Feb 2010) Log Message: ----------- -) Add convenience functions to SearchMethod, and touch up its documentation. -) Rectify a small documentation issue in PluginManager. Modified Paths: -------------- trunk/2.5.0/PluginManager.m trunk/2.5.0/SearchMethod.h trunk/2.5.0/SearchMethod.m Modified: trunk/2.5.0/PluginManager.m =================================================================== --- trunk/2.5.0/PluginManager.m 2010-02-21 15:28:46 UTC (rev 1530) +++ trunk/2.5.0/PluginManager.m 2010-02-21 20:43:40 UTC (rev 1531) @@ -218,7 +218,7 @@ } /* searchMethods - * Returns an NSArray of plugin-info dictionaries which can be added to the search-box menu. + * Returns an NSArray of SearchMethods which can be added to the search-box menu. */ -(NSArray *)searchMethods { Modified: trunk/2.5.0/SearchMethod.h =================================================================== --- trunk/2.5.0/SearchMethod.h 2010-02-21 15:28:46 UTC (rev 1530) +++ trunk/2.5.0/SearchMethod.h 2010-02-21 20:43:40 UTC (rev 1531) @@ -25,6 +25,8 @@ } +(SearchMethod *)searchAllArticlesMethod; ++(SearchMethod *)searchCurrentWebPageMethod; ++(NSArray *)builtInSearchMethods; -(id)initWithDictionary:(NSDictionary *)dict; // Designated initializer. -(NSURL *)queryURLforSearchString:(NSString *)searchString; Modified: trunk/2.5.0/SearchMethod.m =================================================================== --- trunk/2.5.0/SearchMethod.m 2010-02-21 15:28:46 UTC (rev 1530) +++ trunk/2.5.0/SearchMethod.m 2010-02-21 20:43:40 UTC (rev 1531) @@ -50,7 +50,9 @@ return self; } -- (void)encodeWithCoder:(NSCoder *)coder; // We need to conform to NSCoder so we can store SearchMethods in the Defaults database. +# pragma mark NSCoder Conformity + +- (void)encodeWithCoder:(NSCoder *)coder; { [coder encodeObject:friendlyName forKey:@"friendlyName"]; [coder encodeObject:searchQueryString forKey:@"searchQueryString"]; @@ -68,14 +70,20 @@ return self; } -- (NSURL *)queryURLforSearchString:(NSString *)searchString; +# pragma mark Class Methods + +/* searchCurrentWebPageMethod + * Returns all built-in SearchMethods. They are defined immediately below.If you add + * a new one, add it to the array. Remember: arrayWithObjects needs a "nil" termination. + */ ++(NSArray *)builtInSearchMethods { - NSURL * queryURL; - NSString * temp = [[self searchQueryString] stringByReplacingOccurrencesOfString:@"$SearchTerm$" withString:searchString]; - queryURL = cleanedUpAndEscapedUrlFromString(temp); - return queryURL; + return [NSArray arrayWithObjects: [SearchMethod searchAllArticlesMethod], [SearchMethod searchCurrentWebPageMethod], nil]; } +/* searchCurrentWebPageMethod + * Returns the standard SearchMethod "Search all Articles". + */ +(SearchMethod *)searchAllArticlesMethod { SearchMethod * method = [[SearchMethod alloc] init]; @@ -83,10 +91,35 @@ [method setHandler:@selector(performAllArticlesSearch)]; return [method autorelease]; +} + +/* searchCurrentWebPageMethod + * Returns a SearchMethod that only works when the active view is a web pane. + */ ++(SearchMethod *)searchCurrentWebPageMethod +{ + SearchMethod * method = [[SearchMethod alloc] init]; + [method setFriendlyName:@"Search current web page"]; + [method setHandler:@selector(performWebpageSearch)]; + + return [method autorelease]; } -// Getters and setters. +# pragma mark Instance Methods +/* searchCurrentWebPageMethod + * Returns the URL that needs to be accessed to send the query. + */ +- (NSURL *)queryURLforSearchString:(NSString *)searchString; +{ + NSURL * queryURL; + NSString * temp = [[self searchQueryString] stringByReplacingOccurrencesOfString:@"$SearchTerm$" withString:searchString]; + queryURL = cleanedUpAndEscapedUrlFromString(temp); + return queryURL; +} + +#pragma mark Getters and setters + -(void)setFriendlyName:(NSString *) newName { [friendlyName release]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-21 21:01:15
|
Revision: 1532 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1532&view=rev Author: mstroeck Date: 2010-02-21 21:01:08 +0000 (Sun, 21 Feb 2010) Log Message: ----------- A small refactor of menuWithAction and adding of second similar helper function to be used later. Modified Paths: -------------- trunk/2.5.0/AppController.m trunk/2.5.0/ArticleListView.m trunk/2.5.0/FoldersTree.m trunk/2.5.0/HelperFunctions.h trunk/2.5.0/HelperFunctions.m trunk/2.5.0/PluginManager.m Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-21 20:43:40 UTC (rev 1531) +++ trunk/2.5.0/AppController.m 2010-02-21 21:01:08 UTC (rev 1532) @@ -464,13 +464,13 @@ // Set alternate in main menu for opening pages, and check for correct title of menu item // This is a hack, because Interface Builder refuses to set alternates with only the shift key as modifier. - NSMenuItem * alternateItem = menuWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); + NSMenuItem * alternateItem = menuItemWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); if (alternateItem != nil) { [alternateItem setKeyEquivalentModifierMask:NSAlternateKeyMask]; [alternateItem setAlternate:YES]; } - alternateItem = menuWithAction(@selector(viewArticlePageInAlternateBrowser:)); + alternateItem = menuItemWithAction(@selector(viewArticlePageInAlternateBrowser:)); if (alternateItem != nil) { [alternateItem setKeyEquivalentModifierMask:NSAlternateKeyMask]; @@ -3137,12 +3137,12 @@ } else alternateLocation = [self appName]; - NSMenuItem * item = menuWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); + NSMenuItem * item = menuItemWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); if (item != nil) { [item setTitle:[NSString stringWithFormat:NSLocalizedString(@"Open Subscription Home Page in %@", nil), alternateLocation]]; } - item = menuWithAction(@selector(viewArticlePageInAlternateBrowser:)); + item = menuItemWithAction(@selector(viewArticlePageInAlternateBrowser:)); if (item != nil) [item setTitle:[NSString stringWithFormat:NSLocalizedString(@"Open Article Page in %@", nil), alternateLocation]]; } Modified: trunk/2.5.0/ArticleListView.m =================================================================== --- trunk/2.5.0/ArticleListView.m 2010-02-21 20:43:40 UTC (rev 1531) +++ trunk/2.5.0/ArticleListView.m 2010-02-21 21:01:08 UTC (rev 1532) @@ -389,7 +389,7 @@ NSMenu * articleListMenu = [articleList menu]; if (articleListMenu == nil) return; - mainMenuItem = menuWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); + mainMenuItem = menuItemWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); if (mainMenuItem != nil) { index = [articleListMenu indexOfItemWithTarget:nil andAction:@selector(viewSourceHomePageInAlternateBrowser:)]; @@ -399,7 +399,7 @@ [contextualMenuItem setTitle:[mainMenuItem title]]; } } - mainMenuItem = menuWithAction(@selector(viewArticlePageInAlternateBrowser:)); + mainMenuItem = menuItemWithAction(@selector(viewArticlePageInAlternateBrowser:)); if (mainMenuItem != nil) { index = [articleListMenu indexOfItemWithTarget:nil andAction:@selector(viewArticlePageInAlternateBrowser:)]; Modified: trunk/2.5.0/FoldersTree.m =================================================================== --- trunk/2.5.0/FoldersTree.m 2010-02-21 20:43:40 UTC (rev 1531) +++ trunk/2.5.0/FoldersTree.m 2010-02-21 21:01:08 UTC (rev 1532) @@ -359,7 +359,7 @@ */ -(void)updateAlternateMenuTitle { - NSMenuItem * mainMenuItem = menuWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); + NSMenuItem * mainMenuItem = menuItemWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); if (mainMenuItem == nil) return; NSString * menuTitle = [mainMenuItem title]; Modified: trunk/2.5.0/HelperFunctions.h =================================================================== --- trunk/2.5.0/HelperFunctions.h 2010-02-21 20:43:40 UTC (rev 1531) +++ trunk/2.5.0/HelperFunctions.h 2010-02-21 21:01:08 UTC (rev 1532) @@ -40,8 +40,9 @@ BOOL isAccessible(NSString * urlString); void runOKAlertPanel(NSString * titleString, NSString * bodyText, ...); void runOKAlertSheet(NSString * titleString, NSString * bodyText, ...); -NSMenuItem * menuWithAction(SEL theSelector); +NSMenuItem * menuItemWithAction(SEL theSelector); NSMenuItem * menuWithTitleAndAction(NSString * theTitle, SEL theSelector); +NSMenuItem * menuItemOfMenuWithAction(NSMenu * menu, SEL theSelector); NSMenuItem * copyOfMenuWithAction(SEL theSelector); NSString * getDefaultBrowser(void); NSURL * cleanedUpAndEscapedUrlFromString(NSString * theUrl); Modified: trunk/2.5.0/HelperFunctions.m =================================================================== --- trunk/2.5.0/HelperFunctions.m 2010-02-21 20:43:40 UTC (rev 1531) +++ trunk/2.5.0/HelperFunctions.m 2010-02-21 21:01:08 UTC (rev 1532) @@ -63,7 +63,7 @@ * Returns the first NSMenuItem that matches the one that implements the corresponding * action in the application main menu. Returns nil if no match is found. */ -NSMenuItem * menuWithAction(SEL theSelector) +NSMenuItem * menuItemWithAction(SEL theSelector) { NSArray * arrayOfMenus = [[NSApp mainMenu] itemArray]; int count = [arrayOfMenus count]; @@ -79,6 +79,26 @@ return nil; } +/* menuWithAction + * Returns the first NSMenuItem that matches the one that implements the corresponding + * action in the application main menu. Returns nil if no match is found. + */ +NSMenuItem * menuItemOfMenuWithAction(NSMenu * menu, SEL theSelector) +{ + NSArray * arrayOfMenus = [menu itemArray]; + int count = [arrayOfMenus count]; + int index; + + for (index = 0; index < count; ++index) + { + NSMenu * subMenu = [[arrayOfMenus objectAtIndex:index] submenu]; + int itemIndex = [subMenu indexOfItemWithTarget:[NSApp delegate] andAction:theSelector]; + if (itemIndex >= 0) + return [subMenu itemAtIndex:itemIndex]; + } + return nil; +} + /* percentEscape * Escape invalid and reserved URL characters to make string suitable * for embedding in mailto: URLs and custom app-specific schemes like papers:// @@ -127,7 +147,7 @@ */ NSMenuItem * copyOfMenuWithAction(SEL theSelector) { - NSMenuItem * item = menuWithAction(theSelector); + NSMenuItem * item = menuItemWithAction(theSelector); return (item) ? [[[NSMenuItem alloc] initWithTitle:[item title] action:theSelector keyEquivalent:@""] autorelease] : nil; } Modified: trunk/2.5.0/PluginManager.m =================================================================== --- trunk/2.5.0/PluginManager.m 2010-02-21 20:43:40 UTC (rev 1531) +++ trunk/2.5.0/PluginManager.m 2010-02-21 21:01:08 UTC (rev 1532) @@ -41,7 +41,7 @@ { if ((self = [super init]) != nil) { - allPlugins = nil; + allPlugins = nil; } return self; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-23 11:52:01
|
Revision: 1533 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1533&view=rev Author: mstroeck Date: 2010-02-23 11:51:54 +0000 (Tue, 23 Feb 2010) Log Message: ----------- CLEANUP: Clarify documentation in some places; refactor some methods to make clearer (by their name) what they actually do and return. Modified Paths: -------------- trunk/2.5.0/AppController.m trunk/2.5.0/ArticleListView.m trunk/2.5.0/HelperFunctions.h trunk/2.5.0/HelperFunctions.m trunk/2.5.0/SearchMethod.m trunk/2.5.0/XMLSourceWindow.m Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-21 21:01:08 UTC (rev 1532) +++ trunk/2.5.0/AppController.m 2010-02-23 11:51:54 UTC (rev 1533) @@ -98,7 +98,7 @@ -(void)sendBlogEvent:(NSString *)externalEditorBundleIdentifier title:(NSString *)title url:(NSString *)url body:(NSString *)body author:(NSString *)author guid:(NSString *)guid; -(void)setLayout:(int)newLayout withRefresh:(BOOL)refreshFlag; -(void)updateAlternateMenuTitle; - -(void)updateSearchPlaceholder; + -(void)updateSearchPlaceholderAndSearchMethod; -(void)toggleOptionKeyButtonStates; -(FoldersTree *)foldersTree; -(void)updateCloseCommands; @@ -870,21 +870,21 @@ -(NSMenu *)folderMenu { NSMenu * folderMenu = [[[NSMenu alloc] init] autorelease]; - [folderMenu addItem:copyOfMenuWithAction(@selector(refreshSelectedSubscriptions:))]; + [folderMenu addItem:copyOfMenuItemWithAction(@selector(refreshSelectedSubscriptions:))]; [folderMenu addItem:[NSMenuItem separatorItem]]; - [folderMenu addItem:copyOfMenuWithAction(@selector(editFolder:))]; - [folderMenu addItem:copyOfMenuWithAction(@selector(deleteFolder:))]; - [folderMenu addItem:copyOfMenuWithAction(@selector(renameFolder:))]; + [folderMenu addItem:copyOfMenuItemWithAction(@selector(editFolder:))]; + [folderMenu addItem:copyOfMenuItemWithAction(@selector(deleteFolder:))]; + [folderMenu addItem:copyOfMenuItemWithAction(@selector(renameFolder:))]; [folderMenu addItem:[NSMenuItem separatorItem]]; - [folderMenu addItem:copyOfMenuWithAction(@selector(markAllRead:))]; + [folderMenu addItem:copyOfMenuItemWithAction(@selector(markAllRead:))]; [folderMenu addItem:[NSMenuItem separatorItem]]; - [folderMenu addItem:copyOfMenuWithAction(@selector(viewSourceHomePage:))]; - NSMenuItem * alternateItem = copyOfMenuWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); + [folderMenu addItem:copyOfMenuItemWithAction(@selector(viewSourceHomePage:))]; + NSMenuItem * alternateItem = copyOfMenuItemWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); [alternateItem setKeyEquivalentModifierMask:NSAlternateKeyMask]; [alternateItem setAlternate:YES]; [folderMenu addItem:alternateItem]; - [folderMenu addItem:copyOfMenuWithAction(@selector(getInfo:))]; - [folderMenu addItem:copyOfMenuWithAction(@selector(showXMLSource:))]; + [folderMenu addItem:copyOfMenuItemWithAction(@selector(getInfo:))]; + [folderMenu addItem:copyOfMenuItemWithAction(@selector(showXMLSource:))]; return folderMenu; } @@ -955,7 +955,7 @@ } [[Preferences standardPreferences] setLayout:newLayout]; - [self updateSearchPlaceholder]; + [self updateSearchPlaceholderAndSearchMethod]; [[foldersTree mainView] setNextKeyView:[[browserView primaryTabItemView] mainView]]; } @@ -969,8 +969,8 @@ { [appDockMenu release]; appDockMenu = [[NSMenu alloc] initWithTitle:@"DockMenu"]; - [appDockMenu addItem:copyOfMenuWithAction(@selector(refreshAllSubscriptions:))]; - [appDockMenu addItem:copyOfMenuWithAction(@selector(markAllSubscriptionsRead:))]; + [appDockMenu addItem:copyOfMenuItemWithAction(@selector(refreshAllSubscriptions:))]; + [appDockMenu addItem:copyOfMenuItemWithAction(@selector(markAllSubscriptionsRead:))]; return appDockMenu; } @@ -1985,15 +1985,15 @@ [appStatusItem setHighlightMode:YES]; NSMenu * statusBarMenu = [[NSMenu alloc] initWithTitle:@"StatusBarMenu"]; - [statusBarMenu addItem:menuWithTitleAndAction(NSLocalizedString(@"Open Vienna", nil), @selector(openVienna:))]; + [statusBarMenu addItem:menuItemWithTitleAndAction(NSLocalizedString(@"Open Vienna", nil), @selector(openVienna:))]; [statusBarMenu addItem:[NSMenuItem separatorItem]]; - [statusBarMenu addItem:copyOfMenuWithAction(@selector(refreshAllSubscriptions:))]; - [statusBarMenu addItem:copyOfMenuWithAction(@selector(markAllSubscriptionsRead:))]; + [statusBarMenu addItem:copyOfMenuItemWithAction(@selector(refreshAllSubscriptions:))]; + [statusBarMenu addItem:copyOfMenuItemWithAction(@selector(markAllSubscriptionsRead:))]; [statusBarMenu addItem:[NSMenuItem separatorItem]]; - [statusBarMenu addItem:copyOfMenuWithAction(@selector(showPreferencePanel:))]; - [statusBarMenu addItem:copyOfMenuWithAction(@selector(handleAbout:))]; + [statusBarMenu addItem:copyOfMenuItemWithAction(@selector(showPreferencePanel:))]; + [statusBarMenu addItem:copyOfMenuItemWithAction(@selector(handleAbout:))]; [statusBarMenu addItem:[NSMenuItem separatorItem]]; - [statusBarMenu addItem:copyOfMenuWithAction(@selector(exitVienna:))]; + [statusBarMenu addItem:copyOfMenuItemWithAction(@selector(exitVienna:))]; [appStatusItem setMenu:statusBarMenu]; [statusBarMenu release]; } @@ -2086,7 +2086,7 @@ // Call through the controller to display the new folder. [articleController displayFolder:newFolderId]; - [self updateSearchPlaceholder]; + [self updateSearchPlaceholderAndSearchMethod]; // Make sure article viewer is active [browserView setActiveTabToPrimaryTab]; @@ -2221,7 +2221,7 @@ [mainWindow makeFirstResponder:[webPane mainView]]; } [self updateStatusBarFilterButtonVisibility]; - [self updateSearchPlaceholder]; + [self updateSearchPlaceholderAndSearchMethod]; [self setStatusMessage:nil persist:NO]; } @@ -2240,7 +2240,7 @@ { int folderId = [(NSNumber *)[nc object] intValue]; if (folderId == [articleController currentFolderId]) - [self updateSearchPlaceholder]; + [self updateSearchPlaceholderAndSearchMethod]; } /* handleRefreshStatusChange @@ -3169,7 +3169,7 @@ * Update the search placeholder string in the search field depending on the view in * the active tab. */ --(void)updateSearchPlaceholder +-(void)updateSearchPlaceholderAndSearchMethod { NSView<BaseView> * theView = [browserView activeTabItemView]; Preferences * prefs = [Preferences standardPreferences]; Modified: trunk/2.5.0/ArticleListView.m =================================================================== --- trunk/2.5.0/ArticleListView.m 2010-02-21 21:01:08 UTC (rev 1532) +++ trunk/2.5.0/ArticleListView.m 2010-02-23 11:51:54 UTC (rev 1533) @@ -299,19 +299,19 @@ // Dynamically create the popup menu. This is one less thing to // explicitly localise in the NIB file. NSMenu * articleListMenu = [[NSMenu alloc] init]; - [articleListMenu addItem:copyOfMenuWithAction(@selector(markRead:))]; - [articleListMenu addItem:copyOfMenuWithAction(@selector(markFlagged:))]; - [articleListMenu addItem:copyOfMenuWithAction(@selector(deleteMessage:))]; - [articleListMenu addItem:copyOfMenuWithAction(@selector(restoreMessage:))]; - [articleListMenu addItem:copyOfMenuWithAction(@selector(downloadEnclosure:))]; + [articleListMenu addItem:copyOfMenuItemWithAction(@selector(markRead:))]; + [articleListMenu addItem:copyOfMenuItemWithAction(@selector(markFlagged:))]; + [articleListMenu addItem:copyOfMenuItemWithAction(@selector(deleteMessage:))]; + [articleListMenu addItem:copyOfMenuItemWithAction(@selector(restoreMessage:))]; + [articleListMenu addItem:copyOfMenuItemWithAction(@selector(downloadEnclosure:))]; [articleListMenu addItem:[NSMenuItem separatorItem]]; - [articleListMenu addItem:copyOfMenuWithAction(@selector(viewSourceHomePage:))]; - NSMenuItem * alternateItem = copyOfMenuWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); + [articleListMenu addItem:copyOfMenuItemWithAction(@selector(viewSourceHomePage:))]; + NSMenuItem * alternateItem = copyOfMenuItemWithAction(@selector(viewSourceHomePageInAlternateBrowser:)); [alternateItem setKeyEquivalentModifierMask:NSAlternateKeyMask]; [alternateItem setAlternate:YES]; [articleListMenu addItem:alternateItem]; - [articleListMenu addItem:copyOfMenuWithAction(@selector(viewArticlePage:))]; - alternateItem = copyOfMenuWithAction(@selector(viewArticlePageInAlternateBrowser:)); + [articleListMenu addItem:copyOfMenuItemWithAction(@selector(viewArticlePage:))]; + alternateItem = copyOfMenuItemWithAction(@selector(viewArticlePageInAlternateBrowser:)); [alternateItem setKeyEquivalentModifierMask:NSAlternateKeyMask]; [alternateItem setAlternate:YES]; [articleListMenu addItem:alternateItem]; Modified: trunk/2.5.0/HelperFunctions.h =================================================================== --- trunk/2.5.0/HelperFunctions.h 2010-02-21 21:01:08 UTC (rev 1532) +++ trunk/2.5.0/HelperFunctions.h 2010-02-23 11:51:54 UTC (rev 1533) @@ -41,9 +41,9 @@ void runOKAlertPanel(NSString * titleString, NSString * bodyText, ...); void runOKAlertSheet(NSString * titleString, NSString * bodyText, ...); NSMenuItem * menuItemWithAction(SEL theSelector); -NSMenuItem * menuWithTitleAndAction(NSString * theTitle, SEL theSelector); +NSMenuItem * menuItemWithTitleAndAction(NSString * theTitle, SEL theSelector); NSMenuItem * menuItemOfMenuWithAction(NSMenu * menu, SEL theSelector); -NSMenuItem * copyOfMenuWithAction(SEL theSelector); +NSMenuItem * copyOfMenuItemWithAction(SEL theSelector); NSString * getDefaultBrowser(void); NSURL * cleanedUpAndEscapedUrlFromString(NSString * theUrl); BOOL hasOSScriptsMenu(void); Modified: trunk/2.5.0/HelperFunctions.m =================================================================== --- trunk/2.5.0/HelperFunctions.m 2010-02-21 21:01:08 UTC (rev 1532) +++ trunk/2.5.0/HelperFunctions.m 2010-02-23 11:51:54 UTC (rev 1533) @@ -141,11 +141,11 @@ return urlToLoad; } -/* copyOfMenuWithAction +/* copyOfMenuItemWithAction * Returns an NSMenuItem that matches the one that implements the corresponding * action in the application main menu. Returns nil if no match is found. */ -NSMenuItem * copyOfMenuWithAction(SEL theSelector) +NSMenuItem * copyOfMenuItemWithAction(SEL theSelector) { NSMenuItem * item = menuItemWithAction(theSelector); return (item) ? [[[NSMenuItem alloc] initWithTitle:[item title] action:theSelector keyEquivalent:@""] autorelease] : nil; @@ -154,7 +154,7 @@ /* menuWithTitleAndAction * Returns an NSMenuItem with the specified menu and action. */ -NSMenuItem * menuWithTitleAndAction(NSString * theTitle, SEL theSelector) +NSMenuItem * menuItemWithTitleAndAction(NSString * theTitle, SEL theSelector) { return [[[NSMenuItem alloc] initWithTitle:theTitle action:theSelector keyEquivalent:@""] autorelease]; } Modified: trunk/2.5.0/SearchMethod.m =================================================================== --- trunk/2.5.0/SearchMethod.m 2010-02-21 21:01:08 UTC (rev 1532) +++ trunk/2.5.0/SearchMethod.m 2010-02-23 11:51:54 UTC (rev 1533) @@ -25,6 +25,9 @@ @implementation SearchMethod +/* init + * Create an "empty" search method that will not do anything on its own. + */ -(id)init { if ((self = [super init]) != nil) @@ -36,15 +39,17 @@ return self; } +/* initWithDictionary: + * Used to init fron a plugin's info.dict. This class is designed to be capable + * of doing different things with searches according to the plugin definition. + * At the moment, however, we only ever do a normal web-search.*/ + -(id)initWithDictionary:(NSDictionary *)dict { if ((self = [super init]) != nil) { friendlyName = [dict valueForKey:@"FriendlyName"]; searchQueryString = [dict valueForKey:@"SearchQueryString"]; - /* This class is designed to be capable of doing different things with searches - * according to the plugin definition. At the moment, however, we only ever - * do a normal web-search when we initialize from a plugn dict.*/ handler = @selector(performWebSearch:); } return self; @@ -73,8 +78,9 @@ # pragma mark Class Methods /* searchCurrentWebPageMethod - * Returns all built-in SearchMethods. They are defined immediately below.If you add - * a new one, add it to the array. Remember: arrayWithObjects needs a "nil" termination. + * Class method that returns all built-in SearchMethods. They are defined + * immediately below.If you add a new one, add it to the array. + * Remember: arrayWithObjects needs a "nil" termination. */ +(NSArray *)builtInSearchMethods { @@ -82,7 +88,7 @@ } /* searchCurrentWebPageMethod - * Returns the standard SearchMethod "Search all Articles". + * Class method that returns the standard SearchMethod "Search all Articles". */ +(SearchMethod *)searchAllArticlesMethod { @@ -94,7 +100,8 @@ } /* searchCurrentWebPageMethod - * Returns a SearchMethod that only works when the active view is a web pane. + * Class method that Returns a SearchMethod that only works when + * the active view is a web pane. */ +(SearchMethod *)searchCurrentWebPageMethod { @@ -120,33 +127,53 @@ #pragma mark Getters and setters +/* setFriendlyName + * Sets the name of the search method to be displayed in Vienna. + */ -(void)setFriendlyName:(NSString *) newName { [friendlyName release]; friendlyName = [newName retain]; } +/* friendlyName + * Returns the name of the search method to be displayed in Vienna. + */ -(NSString *)friendlyName { return friendlyName; } --(NSString *)searchQueryString -{ - return searchQueryString; -} - +/* setSearchQueryString + * Sets the format string from the plugin info that we plug the search terms into. + */ -(void)setSearchQueryString:(NSString *) newQueryString { [searchQueryString release]; searchQueryString = [newQueryString retain]; } +/* searchQueryString + * Returns the format string from the plugin info that we plug the search terms into. + */ +-(NSString *)searchQueryString +{ + return searchQueryString; +} + +/* setHandler + * Sets the handler for the SearchMetod. Handling happens in AppController, + * because that's where these always get called. + */ -(void)setHandler:(SEL) theHandler { handler = theHandler; } +/* setHandler + * Returns the handler for the SearchMetod. Handling happens in AppController, + * because that's where these always get called. + */ -(SEL)handler { return handler; Modified: trunk/2.5.0/XMLSourceWindow.m =================================================================== --- trunk/2.5.0/XMLSourceWindow.m 2010-02-21 21:01:08 UTC (rev 1532) +++ trunk/2.5.0/XMLSourceWindow.m 2010-02-23 11:51:54 UTC (rev 1533) @@ -99,6 +99,11 @@ } } +/* windowDidLoad + * When the window has finished loading, we make sure that the WebView's WebPreferences + * allow the execution of JavaScript. We need that for syntax coloring, and the user might + * have turned it off in the user preferences. + */ - (void)windowDidLoad { static WebPreferences * sJavaScriptPreferences; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-02-23 17:46:40
|
Revision: 1534 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1534&view=rev Author: mstroeck Date: 2010-02-23 17:46:31 +0000 (Tue, 23 Feb 2010) Log Message: ----------- Steve: If you don't want to add anything, Vienna 2.5 is now FEATURE COMPLETE. -) Finish search engine plugins. Modified Paths: -------------- trunk/2.5.0/AppController.h trunk/2.5.0/AppController.m trunk/2.5.0/SearchMethod.m Modified: trunk/2.5.0/AppController.h =================================================================== --- trunk/2.5.0/AppController.h 2010-02-23 11:51:54 UTC (rev 1533) +++ trunk/2.5.0/AppController.h 2010-02-23 17:46:31 UTC (rev 1534) @@ -207,4 +207,5 @@ -(void)growlNotify:(id)notifyContext title:(NSString *)title description:(NSString *)description notificationName:(NSString *)notificationName; -(void)performWebSearch:(SearchMethod *)searchMethod; -(void)performAllArticlesSearch; +-(void)performWebPageSearch; @end Modified: trunk/2.5.0/AppController.m =================================================================== --- trunk/2.5.0/AppController.m 2010-02-23 11:51:54 UTC (rev 1533) +++ trunk/2.5.0/AppController.m 2010-02-23 17:46:31 UTC (rev 1534) @@ -653,7 +653,6 @@ return drawnRect; } - /* openFile [delegate] * Called when the user opens a data file associated with Vienna by clicking in the finder or dragging it onto the dock. */ @@ -768,6 +767,17 @@ [cellMenu addItem:item]; [item release]; + searchMethod = [SearchMethod searchCurrentWebPageMethod]; + friendlyName = [searchMethod friendlyName]; + item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(friendlyName, nil) action:@selector(setSearchMethod:) keyEquivalent:@""]; + [item setRepresentedObject: searchMethod]; + // Is this the currently set search method? If yes, mark it as such. + if ( [friendlyName isEqualToString:[[[Preferences standardPreferences] searchMethod] friendlyName]] ) + [item setState:NSOnState]; + [cellMenu addItem:item]; + [item release]; + + // Add all available plugged-in search methods to the menu. NSMutableArray * searchMethods = [NSMutableArray arrayWithArray:[pluginManager searchMethods]]; if ([searchMethods count] > 0) @@ -791,7 +801,6 @@ return [cellMenu autorelease]; } - /* setSearchMethod */ -(void)setSearchMethod:(NSMenuItem *)sender @@ -3174,14 +3183,41 @@ NSView<BaseView> * theView = [browserView activeTabItemView]; Preferences * prefs = [Preferences standardPreferences]; + // START of rather verbose implementation of switching between "Search all articles" and "Search current web page". if ([theView isKindOfClass:[BrowserPane class]]) { + // If the current view is a browser view and "Search all articles" is the current SearchMethod, switch to "Search current webpage" if ([[[prefs searchMethod] friendlyName] isEqualToString:[[SearchMethod searchAllArticlesMethod] friendlyName]]) - [[searchField cell] setPlaceholderString:NSLocalizedString(@"Search current web page", nil)]; + { + for (NSMenuItem * menuItem in [[[searchField cell] searchMenuTemplate] itemArray]) + { + if ([[[menuItem representedObject] friendlyName] isEqualToString:[[SearchMethod searchCurrentWebPageMethod] friendlyName]]) + { + [[searchField cell] setPlaceholderString:NSLocalizedString([[SearchMethod searchCurrentWebPageMethod] friendlyName], nil)]; + [[Preferences standardPreferences] setSearchMethod: [menuItem representedObject]]; + } + } + } } else { - [[searchField cell] setPlaceholderString:NSLocalizedString([[prefs searchMethod] friendlyName], nil)]; + // If the current view is anything else "Search current webpage" is active, switch to "Search all articles". + if ([[[prefs searchMethod] friendlyName] isEqualToString:[[SearchMethod searchCurrentWebPageMethod] friendlyName]]) + { + for (NSMenuItem * menuItem in [[[searchField cell] searchMenuTemplate] itemArray]) + { + if ([[[menuItem representedObject] friendlyName] isEqualToString:[[SearchMethod searchAllArticlesMethod] friendlyName]]) + { + [[searchField cell] setPlaceholderString:NSLocalizedString([[SearchMethod searchAllArticlesMethod] friendlyName], nil)]; + [[Preferences standardPreferences] setSearchMethod: [menuItem representedObject]]; + } + } + } + else + { + [[searchField cell] setPlaceholderString:NSLocalizedString([[prefs searchMethod] friendlyName], nil)]; + } + // END of switching between "Search all articles" and "Search current web page". } if ([[Preferences standardPreferences] layout] == MA_Layout_Unified) @@ -3267,24 +3303,35 @@ [self performSelector:[currentSearchMethod handler] withObject: currentSearchMethod]; } +/* performAllArticlesSearch + * Searches for the current searchString in all articles. + */ -(void)performAllArticlesSearch { - // The browser needs to be handled separately + [self searchArticlesWithString:[searchField stringValue]]; +} + +/* performAllArticlesSearch + * Performs a web-search with the defined query URL. This is usually called by plugged-in SearchMethods. + */ +-(void)performWebSearch:(SearchMethod *)searchMethod +{ + [self createNewTab:[searchMethod queryURLforSearchString:searchString] inBackground:NO]; +} + +/* performWebPageSearch + * Performs a search for searchString within the currently displayed web page in our bult-in browser. + */ +-(void)performWebPageSearch +{ NSView<BaseView> * theView = [browserView activeTabItemView]; if ([theView isKindOfClass:[BrowserPane class]]) { [self setFocusToSearchField:self]; [theView performFindPanelAction:NSFindPanelActionSetFindString]; } - else - [self searchArticlesWithString:[searchField stringValue]]; -} - --(void)performWebSearch:(SearchMethod *)searchMethod -{ - [self createNewTab:[searchMethod queryURLforSearchString:searchString] inBackground:NO]; -} - +} + /* searchArticlesWithString * Do the actual article search. The database is called to set the search string * and then we make sure the search folder is selected so that the subsequent Modified: trunk/2.5.0/SearchMethod.m =================================================================== --- trunk/2.5.0/SearchMethod.m 2010-02-23 11:51:54 UTC (rev 1533) +++ trunk/2.5.0/SearchMethod.m 2010-02-23 17:46:31 UTC (rev 1534) @@ -107,7 +107,8 @@ { SearchMethod * method = [[SearchMethod alloc] init]; [method setFriendlyName:@"Search current web page"]; - [method setHandler:@selector(performWebpageSearch)]; + [method setHandler:@selector(performWebPageSearch + )]; return [method autorelease]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-02-25 09:24:30
|
Revision: 1535 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1535&view=rev Author: stevewpalmer Date: 2010-02-25 09:24:23 +0000 (Thu, 25 Feb 2010) Log Message: ----------- Fix crash that occurs when changing article font size. There was a missing retain on font creation which eventually lead to the font being prematurely released. Modified Paths: -------------- trunk/2.5.0/ArticleListView.m trunk/2.5.0/Preferences.m Modified: trunk/2.5.0/ArticleListView.m =================================================================== --- trunk/2.5.0/ArticleListView.m 2010-02-23 17:46:31 UTC (rev 1534) +++ trunk/2.5.0/ArticleListView.m 2010-02-25 09:24:23 UTC (rev 1535) @@ -564,9 +564,10 @@ [articleListUnreadFont release]; Preferences * prefs = [Preferences standardPreferences]; - articleListFont = [NSFont fontWithName:[prefs articleListFont] size:[prefs articleListFontSize]]; + articleListFont = [[NSFont fontWithName:[prefs articleListFont] size:[prefs articleListFontSize]] retain]; articleListUnreadFont = [prefs boolForKey:MAPref_ShowUnreadArticlesInBold] ? [[NSFontManager sharedFontManager] convertWeight:YES ofFont:articleListFont] : articleListFont; - + [articleListUnreadFont retain]; + [reportCellDict setObject:articleListFont forKey:NSFontAttributeName]; [unreadReportCellDict setObject:articleListUnreadFont forKey:NSFontAttributeName]; Modified: trunk/2.5.0/Preferences.m =================================================================== --- trunk/2.5.0/Preferences.m 2010-02-23 17:46:31 UTC (rev 1534) +++ trunk/2.5.0/Preferences.m 2010-02-25 09:24:23 UTC (rev 1535) @@ -811,7 +811,7 @@ -(void)setFolderListFont:(NSString *)newFontName { [folderFont release]; - folderFont = [NSFont fontWithName:newFontName size:[self folderListFontSize]]; + folderFont = [[NSFont fontWithName:newFontName size:[self folderListFontSize]] retain]; [self setObject:[NSArchiver archivedDataWithRootObject:folderFont] forKey:MAPref_FolderFont]; [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_FolderFontChange" object:folderFont]; } @@ -822,7 +822,7 @@ -(void)setFolderListFontSize:(int)newFontSize { [folderFont release]; - folderFont = [NSFont fontWithName:[self folderListFont] size:newFontSize]; + folderFont = [[NSFont fontWithName:[self folderListFont] size:newFontSize] retain]; [self setObject:[NSArchiver archivedDataWithRootObject:folderFont] forKey:MAPref_FolderFont]; [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_FolderFontChange" object:folderFont]; } @@ -849,7 +849,7 @@ -(void)setArticleListFont:(NSString *)newFontName { [articleFont release]; - articleFont = [NSFont fontWithName:newFontName size:[self articleListFontSize]]; + articleFont = [[NSFont fontWithName:newFontName size:[self articleListFontSize]] retain]; [self setObject:[NSArchiver archivedDataWithRootObject:articleFont] forKey:MAPref_ArticleListFont]; [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_ArticleListFontChange" object:articleFont]; } @@ -860,7 +860,7 @@ -(void)setArticleListFontSize:(int)newFontSize { [articleFont release]; - articleFont = [NSFont fontWithName:[self articleListFont] size:newFontSize]; + articleFont = [[NSFont fontWithName:[self articleListFont] size:newFontSize] retain]; [self setObject:[NSArchiver archivedDataWithRootObject:articleFont] forKey:MAPref_ArticleListFont]; [[NSNotificationCenter defaultCenter] postNotificationName:@"MA_Notify_ArticleListFontChange" object:articleFont]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2010-02-28 14:31:38
|
Revision: 1537 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1537&view=rev Author: stevewpalmer Date: 2010-02-28 14:31:31 +0000 (Sun, 28 Feb 2010) Log Message: ----------- Update changelog and notes. Modified Paths: -------------- trunk/2.5.0/CHANGES trunk/2.5.0/notes.html Modified: trunk/2.5.0/CHANGES =================================================================== --- trunk/2.5.0/CHANGES 2010-02-26 10:36:42 UTC (rev 1536) +++ trunk/2.5.0/CHANGES 2010-02-28 14:31:31 UTC (rev 1537) @@ -17,6 +17,7 @@ - Added user contributed "Share with Delicious" plugin to the core distribution. Thanks to forum user czanderna. - Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system. - Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly. +- Fix bug where changing the article font size would crash Vienna. 2.4.0.2401 ---------- Modified: trunk/2.5.0/notes.html =================================================================== --- trunk/2.5.0/notes.html 2010-02-26 10:36:42 UTC (rev 1536) +++ trunk/2.5.0/notes.html 2010-02-28 14:31:31 UTC (rev 1537) @@ -7,8 +7,11 @@ <li>Add support for plugins.</li> <li>Added Share With Facebook button.</li> <li>Added Share With Evernote button.</li> +<li>Added Share With Twitter button.</li> +<li>Added user contributed "Share with Delicious" plugin to the core distribution. Thanks to forum user czanderna.</li> <li>Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system.</li> <li>Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly.</li> +<li>Fix bug where changing the article font size would crash Vienna.</li> </ul> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-03-01 08:10:46
|
Revision: 1538 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1538&view=rev Author: mstroeck Date: 2010-03-01 08:10:39 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Fix copyright date in the "About"-panel (it's now 2004-2010). Modified Paths: -------------- trunk/2.5.0/Info.plist trunk/2.5.0/cs.lproj/InfoPlist.strings trunk/2.5.0/da.lproj/InfoPlist.strings trunk/2.5.0/de.lproj/InfoPlist.strings trunk/2.5.0/en.lproj/InfoPlist.strings trunk/2.5.0/es.lproj/InfoPlist.strings trunk/2.5.0/eus.lproj/InfoPlist.strings trunk/2.5.0/fr.lproj/InfoPlist.strings trunk/2.5.0/it.lproj/InfoPlist.strings trunk/2.5.0/ja.lproj/InfoPlist.strings trunk/2.5.0/ko.lproj/InfoPlist.strings trunk/2.5.0/nl.lproj/InfoPlist.strings trunk/2.5.0/pt.lproj/InfoPlist.strings trunk/2.5.0/pt_BR.lproj/InfoPlist.strings trunk/2.5.0/ru.lproj/InfoPlist.strings trunk/2.5.0/sv.lproj/InfoPlist.strings trunk/2.5.0/tr.lproj/InfoPlist.strings trunk/2.5.0/uk.lproj/InfoPlist.strings trunk/2.5.0/zh_CN.lproj/InfoPlist.strings trunk/2.5.0/zh_TW.lproj/InfoPlist.strings Modified: trunk/2.5.0/Info.plist =================================================================== --- trunk/2.5.0/Info.plist 2010-02-28 14:31:31 UTC (rev 1537) +++ trunk/2.5.0/Info.plist 2010-03-01 08:10:39 UTC (rev 1538) @@ -54,7 +54,7 @@ <key>CFBundleExecutable</key> <string>Vienna</string> <key>CFBundleGetInfoString</key> - <string>Vienna version $(VIENNA_VERSION_NUMBER).${BUILD_NUMBER}, Copyright 2004-2008 Contributors. See Help/Acknowledgements for list of contributors.</string> + <string>Vienna version $(VIENNA_VERSION_NUMBER).${BUILD_NUMBER}, Copyright 2004-2010 Contributors. See Help/Acknowledgements for list of contributors.</string> <key>CFBundleHelpBookFolder</key> <string>Vienna Help</string> <key>CFBundleHelpBookName</key> Modified: trunk/2.5.0/cs.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/da.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/de.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/en.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/es.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/eus.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/fr.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/it.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/ja.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/ko.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/nl.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/pt.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/pt_BR.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/ru.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/sv.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/tr.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/uk.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/zh_CN.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: trunk/2.5.0/zh_TW.lproj/InfoPlist.strings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-03-06 20:08:00
|
Revision: 1541 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1541&view=rev Author: mstroeck Date: 2010-03-06 20:07:53 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Patch by Curtis Faith: Fix bug 1778173 that caused zombified spinners when changing anything about the Folders list under some circumstances. Modified Paths: -------------- trunk/2.5.0/FolderView.m trunk/2.5.0/FoldersTree.m trunk/2.5.0/ImageAndTextCell.h trunk/2.5.0/ImageAndTextCell.m trunk/2.5.0/TreeNode.h trunk/2.5.0/TreeNode.m Modified: trunk/2.5.0/FolderView.m =================================================================== --- trunk/2.5.0/FolderView.m 2010-03-03 08:53:16 UTC (rev 1540) +++ trunk/2.5.0/FolderView.m 2010-03-06 20:07:53 UTC (rev 1541) @@ -20,6 +20,7 @@ #import "FolderView.h" #import "ImageAndTextCell.h" +#import "TreeNode.h" @interface NSObject (FoldersViewDelegate) -(BOOL)handleKeyDown:(unichar)keyChar withFlags:(unsigned int)flags; @@ -54,6 +55,11 @@ iRect = NSMakeRect(0,0,1,[blueGradient size].height-1); [grayGradient setFlipped:YES]; + + // Add the notifications for collapse and expand. + NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(outlineViewItemDidExpand:) name:NSOutlineViewItemDidExpandNotification object:(id)self]; + [nc addObserver:self selector:@selector(outlineViewItemDidCollapse:) name:NSOutlineViewItemDidCollapseNotification object:(id)self]; } /* becomeFirstResponder @@ -80,17 +86,7 @@ */ -(void)setEnableTooltips:(BOOL)flag { - NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; - if ((useTooltips = flag) == YES) - { - [nc addObserver:self selector:@selector(outlineViewItemDidExpand:) name:NSOutlineViewItemDidExpandNotification object:(id)self]; - [nc addObserver:self selector:@selector(outlineViewItemDidCollapse:) name:NSOutlineViewItemDidCollapseNotification object:(id)self]; - } - else - { - [nc removeObserver:self name:NSOutlineViewItemDidExpandNotification object:nil]; - [nc removeObserver:self name:NSOutlineViewItemDidCollapseNotification object:nil]; - } + useTooltips = flag; [self buildTooltips]; } @@ -192,7 +188,9 @@ */ -(void)outlineViewItemDidExpand:(NSNotification *)notification { - [self buildTooltips]; + // Rebuild the tooltips if required. + if (useTooltips == YES) + [self buildTooltips]; } /* outlineViewItemDidCollapse @@ -201,7 +199,14 @@ */ -(void)outlineViewItemDidCollapse:(NSNotification *)notification { - [self buildTooltips]; + // Rebuild the tooltips if required. + if (useTooltips == YES) + [self buildTooltips]; + + // Have the collapsed item remove any progress indicators. + TreeNode * collapsedItem = [[notification userInfo] objectForKey:@"NSObject"]; + [collapsedItem stopAndReleaseProgressIndicator]; + } /* menuForEvent Modified: trunk/2.5.0/FoldersTree.m =================================================================== --- trunk/2.5.0/FoldersTree.m 2010-03-03 08:53:16 UTC (rev 1540) +++ trunk/2.5.0/FoldersTree.m 2010-03-06 20:07:53 UTC (rev 1541) @@ -654,6 +654,9 @@ int folderId = [(NSNumber *)[nc object] intValue]; TreeNode * thisNode = [rootNode nodeFromID:folderId]; TreeNode * nextNode; + + // Stop any in process progress indicators. + [thisNode stopAndReleaseProgressIndicator]; // First find the next node we'll select if ([thisNode nextSibling] != nil) Modified: trunk/2.5.0/ImageAndTextCell.h =================================================================== --- trunk/2.5.0/ImageAndTextCell.h 2010-03-03 08:53:16 UTC (rev 1540) +++ trunk/2.5.0/ImageAndTextCell.h 2010-03-06 20:07:53 UTC (rev 1541) @@ -20,6 +20,8 @@ #import <Cocoa/Cocoa.h> +@class TreeNode; + @interface ImageAndTextCell : NSTextFieldCell { @private NSImage * image; @@ -30,8 +32,7 @@ BOOL hasCount; BOOL inProgress; - id item; - NSMutableArray *progressIndicators; + TreeNode * item; } // Accessor functions @@ -46,5 +47,5 @@ -(int)offset; -(void)drawCellImage:(NSRect *)cellFrame inView:(NSView *)controlView; - (void)setInProgress:(BOOL)newInProgress; -- (void)setItem:(id)inItem; +- (void)setItem:(TreeNode *)newItem; @end \ No newline at end of file Modified: trunk/2.5.0/ImageAndTextCell.m =================================================================== --- trunk/2.5.0/ImageAndTextCell.m 2010-03-03 08:53:16 UTC (rev 1540) +++ trunk/2.5.0/ImageAndTextCell.m 2010-03-06 20:07:53 UTC (rev 1541) @@ -21,19 +21,11 @@ #import "ImageAndTextCell.h" #import "BezierPathExtensions.h" #import "FolderView.h" +#import "TreeNode.h" -#define PROGRESS_INDICATOR_DIMENSION 16 #define PROGRESS_INDICATOR_LEFT_MARGIN 1 -@interface NSObject (ProgressIndicatorSupportingItem) - -(NSProgressIndicator *)progressIndicator; - -(void)setProgressIndicator:(NSProgressIndicator *)progressIndicator; -@end -@interface ImageAndTextCell (Private) - -(void)configureProgressAnimation; -@end - /* All of this stuff taken from public stuff published * by Apple. */ @@ -52,8 +44,6 @@ hasCount = NO; count = 0; [self setCountBackgroundColour:[NSColor shadowColor]]; - - progressIndicators = [[NSMutableArray alloc] init]; } return self; } @@ -69,7 +59,6 @@ cell->inProgress = inProgress; cell->countBackgroundColour = [countBackgroundColour retain]; cell->item = item; - cell->progressIndicators = [[NSMutableArray alloc] init]; return cell; } @@ -165,9 +154,9 @@ /* setItem * Set the item which is being displayed. This should be used in a willDisplayCell: style method. */ --(void)setItem:(id)inItem +-(void)setItem:(TreeNode *)newItem { - item = inItem; + item = newItem; } /* drawCellImage @@ -206,54 +195,32 @@ { // If the cell has a progress indicator, ensure it's framed properly // and then reduce cellFrame to keep from overlapping it - if ([item respondsToSelector:@selector(progressIndicator)]) + if (inProgress) { NSProgressIndicator *progressIndicator = [item progressIndicator]; - if (!inProgress && progressIndicator) - { - [progressIndicator setDisplayedWhenStopped:NO]; - [progressIndicator stopAnimation:self]; - [[progressIndicator superview] setNeedsDisplayInRect:[progressIndicator frame]]; - [progressIndicator removeFromSuperviewWithoutNeedingDisplay]; - [progressIndicators removeObject:progressIndicator]; + if (!progressIndicator) + progressIndicator = [item allocAndStartProgressIndicator]; - // The item was keeping track of the progress indicator; it is no longer needed - [item setProgressIndicator:nil]; - } - else if (inProgress) - { - if (!progressIndicator) - { - progressIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0, 0, - PROGRESS_INDICATOR_DIMENSION, PROGRESS_INDICATOR_DIMENSION)]; - [progressIndicator setControlSize:NSSmallControlSize]; - [progressIndicator setStyle:NSProgressIndicatorSpinningStyle]; - [progressIndicator setDisplayedWhenStopped:YES]; - [progressIndicator setUsesThreadedAnimation:YES]; - [progressIndicators addObject:progressIndicator]; - - // Let the item keep track of this progress indicator for us so we can stop it later - [item setProgressIndicator:progressIndicator]; - [progressIndicator startAnimation:self]; - [progressIndicator autorelease]; - } + NSRect progressIndicatorFrame; - NSRect progressIndicatorFrame; + NSDivideRect(cellFrame, &progressIndicatorFrame, &cellFrame, PROGRESS_INDICATOR_DIMENSION + PROGRESS_INDICATOR_LEFT_MARGIN, NSMaxXEdge); - NSDivideRect(cellFrame, &progressIndicatorFrame, &cellFrame, PROGRESS_INDICATOR_DIMENSION + PROGRESS_INDICATOR_LEFT_MARGIN, NSMaxXEdge); + progressIndicatorFrame.size = NSMakeSize(PROGRESS_INDICATOR_DIMENSION, PROGRESS_INDICATOR_DIMENSION); + progressIndicatorFrame.origin.x += PROGRESS_INDICATOR_LEFT_MARGIN; - progressIndicatorFrame.size = NSMakeSize(PROGRESS_INDICATOR_DIMENSION, PROGRESS_INDICATOR_DIMENSION); - progressIndicatorFrame.origin.x += PROGRESS_INDICATOR_LEFT_MARGIN; + if ([progressIndicator superview] != controlView) + [controlView addSubview:progressIndicator]; - if ([progressIndicator superview] != controlView) - [controlView addSubview:progressIndicator]; - - if (!NSEqualRects([progressIndicator frame], progressIndicatorFrame)) { - [progressIndicator setFrame:progressIndicatorFrame]; - } + if (!NSEqualRects([progressIndicator frame], progressIndicatorFrame)) { + [progressIndicator setFrame:progressIndicatorFrame]; } } + else + { + [item stopAndReleaseProgressIndicator]; + } + // If the cell has an image, draw the image and then reduce // cellFrame to move the text to the right of the image. if (image != nil) @@ -356,8 +323,6 @@ [auxiliaryImage release]; [image release]; - [progressIndicators release]; - [super dealloc]; } Modified: trunk/2.5.0/TreeNode.h =================================================================== --- trunk/2.5.0/TreeNode.h 2010-03-03 08:53:16 UTC (rev 1540) +++ trunk/2.5.0/TreeNode.h 2010-03-06 20:07:53 UTC (rev 1541) @@ -21,6 +21,9 @@ #import <Cocoa/Cocoa.h> #import "Folder.h" +#define PROGRESS_INDICATOR_DIMENSION 16 + + @interface TreeNode : NSObject { TreeNode * parentNode; NSMutableArray * children; @@ -54,4 +57,10 @@ -(void)setCanHaveChildren:(BOOL)childflag; -(BOOL)canHaveChildren; -(NSComparisonResult)folderNameCompare:(TreeNode *)otherObject; + +-(NSProgressIndicator *)allocAndStartProgressIndicator; +-(void)stopAndReleaseProgressIndicator; +-(NSProgressIndicator *)progressIndicator; +-(void)setProgressIndicator:(NSProgressIndicator *)inProgressIndicator; + @end Modified: trunk/2.5.0/TreeNode.m =================================================================== --- trunk/2.5.0/TreeNode.m 2010-03-03 08:53:16 UTC (rev 1540) +++ trunk/2.5.0/TreeNode.m 2010-03-06 20:07:53 UTC (rev 1541) @@ -41,6 +41,7 @@ [parent addChild:self atIndex:insertIndex]; } children = [[NSMutableArray array] retain]; + progressIndicator = nil; } return self; } @@ -308,6 +309,49 @@ return [NSString stringWithFormat:@"%@ (Parent=%d, # of children=%d)", [folder name], parentNode, [children count]]; } +/* allocAndStartProgressIndicator: + * Allocate a new progress indicator and start it animating. + */ +-(NSProgressIndicator *)allocAndStartProgressIndicator +{ + // Allocate and initialize the spinning progress indicator. + NSRect progressRect = NSMakeRect(0, 0, PROGRESS_INDICATOR_DIMENSION, PROGRESS_INDICATOR_DIMENSION); + progressIndicator = [[NSProgressIndicator alloc] initWithFrame:progressRect]; + [progressIndicator setControlSize:NSSmallControlSize]; + [progressIndicator setStyle:NSProgressIndicatorSpinningStyle]; + [progressIndicator setDisplayedWhenStopped:YES]; + [progressIndicator setUsesThreadedAnimation:YES]; + + // Start the animation. + [progressIndicator startAnimation:self]; + return progressIndicator; +} + +/* stopAndReleaseProgressIndicator: + * Stops the progress indicator and releases it, also calls recursively for child + * nodes so that this can be called when a tree node is collapsed to stop the + * progress indicators for all children. + */ +-(void)stopAndReleaseProgressIndicator +{ + if ( progressIndicator) + { + // Stop the animation and remove from the superview. + [progressIndicator setDisplayedWhenStopped:NO]; + [progressIndicator stopAnimation:self]; + [[progressIndicator superview] setNeedsDisplayInRect:[progressIndicator frame]]; + [progressIndicator removeFromSuperviewWithoutNeedingDisplay]; + + // Release the progress indicator. + [progressIndicator release]; + progressIndicator = nil; + } + + // Make sure the children do the same in case this is being called on a folder node. + for (TreeNode * node in children) + [node stopAndReleaseProgressIndicator]; +} + /* setProgressIndicator: * Retrieve a progressIndicator set by other code in association with this TreeNode */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-03-07 15:10:19
|
Revision: 1542 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1542&view=rev Author: mstroeck Date: 2010-03-07 15:10:09 +0000 (Sun, 07 Mar 2010) Log Message: ----------- Patch by Curtis Faith: Fix bugs 1888784 and 2032990. Modified Paths: -------------- trunk/2.5.0/ArticleView.h trunk/2.5.0/ArticleView.m Modified: trunk/2.5.0/ArticleView.h =================================================================== --- trunk/2.5.0/ArticleView.h 2010-03-06 20:07:53 UTC (rev 1541) +++ trunk/2.5.0/ArticleView.h 2010-03-07 15:10:09 UTC (rev 1542) @@ -25,6 +25,7 @@ NSString * htmlTemplate; NSString * cssStylesheet; NSString * jsScript; + NSString * currentHTML; } // Public functions Modified: trunk/2.5.0/ArticleView.m =================================================================== --- trunk/2.5.0/ArticleView.m 2010-03-06 20:07:53 UTC (rev 1541) +++ trunk/2.5.0/ArticleView.m 2010-03-07 15:10:09 UTC (rev 1542) @@ -48,6 +48,7 @@ htmlTemplate = nil; cssStylesheet = nil; jsScript = nil; + currentHTML = nil; // Set up to be notified when style changes NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; @@ -237,6 +238,17 @@ */ -(void)setHTML:(NSString *)htmlText withBase:(NSString *)urlString { + // If the current HTML is the same as the new HTML then we don't need to + // do anything here. This will stop the view from spurious redraws of the same + // article after a refresh. + if (currentHTML != nil && [currentHTML compare:htmlText] == NSOrderedSame) + return; + + // Remember the current html string. + if (currentHTML != nil) + [currentHTML release]; + currentHTML = [[NSString alloc] initWithString: htmlText]; + // Replace feed:// with http:// if necessary if ([urlString hasPrefix:@"feed://"]) urlString = [NSString stringWithFormat:@"http://%@", [urlString substringFromIndex:7]]; @@ -346,6 +358,7 @@ [[NSNotificationCenter defaultCenter] removeObserver:self]; [cssStylesheet release]; [htmlTemplate release]; + [currentHTML release]; [super dealloc]; } @end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-03-17 22:33:18
|
Revision: 1545 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1545&view=rev Author: mstroeck Date: 2010-03-17 22:33:11 +0000 (Wed, 17 Mar 2010) Log Message: ----------- Update CHANGES and notes.html in preparation for release. Modified Paths: -------------- trunk/2.5.0/CHANGES trunk/2.5.0/notes.html Modified: trunk/2.5.0/CHANGES =================================================================== --- trunk/2.5.0/CHANGES 2010-03-15 21:34:43 UTC (rev 1544) +++ trunk/2.5.0/CHANGES 2010-03-17 22:33:11 UTC (rev 1545) @@ -10,14 +10,20 @@ 2.5.0.2500 ---------- +- User Interface refresh: Removed the grey headers, made the vertical divider easier to grab and made filtering more discoverable. - Added support for plugins. +- Added support for search engine plugins. +- Added support for blog editor plugins. +- Added support for sharing plugins that work like bookmarklets for social websites. - Added "Share With Facebook" button. - Added "Share With Evernote" button. -- Added "Share With Twitter" button. +- Added "Share With Twitter" button with automatic URL shortening via bit.ly. - Added user contributed "Share with Delicious" plugin to the core distribution. Thanks to forum user czanderna. - Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system. - Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly. - Fix bug where changing the article font size would crash Vienna. +- Fix bug that caused zombiefied update spinners (thanks to Curtis Faith). +- Fix bug that caused the reading position to be lost upon refresh (thanks to Curtis Faith). 2.4.0.2401 ---------- Modified: trunk/2.5.0/notes.html =================================================================== --- trunk/2.5.0/notes.html 2010-03-15 21:34:43 UTC (rev 1544) +++ trunk/2.5.0/notes.html 2010-03-17 22:33:11 UTC (rev 1545) @@ -3,15 +3,24 @@ <title>Vienna 2.5.0.2500</title> </head> <body> +<h1>This version requires Mac OS X 10.5 Leopard.</h1> <ul> -<li>Add support for plugins.</li> +<li>User Interface refresh: Removed the grey headers, made the vertical divider easier to grab and made filtering more discoverable.</li> +<li>Added support for plugins.</li> +<li>Added support for search engine plugins.</li> +<li>Added support for blog editor plugins.</li> +<li>Added support for sharing plugins that work like bookmarklets for social websites.</li> +<li>Added support for script plugins.</li> <li>Added Share With Facebook button.</li> <li>Added Share With Evernote button.</li> -<li>Added Share With Twitter button.</li> +<li>Added Share With Twitter button with automatic URL shortening via bit.ly.</li> <li>Added user contributed "Share with Delicious" plugin to the core distribution. Thanks to forum user czanderna.</li> <li>Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system.</li> <li>Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly.</li> <li>Fix bug where changing the article font size would crash Vienna.</li> +<li>Fix bug that caused zombiefied update spinners (thanks to Curtis Faith).</li> +<li>Fix bug that caused the reading position to be lost upon refresh (thanks to Curtis Faith).</li> + </ul> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mst...@us...> - 2010-03-17 22:38:20
|
Revision: 1546 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1546&view=rev Author: mstroeck Date: 2010-03-17 22:38:11 +0000 (Wed, 17 Mar 2010) Log Message: ----------- One more small change to CHANGES and notes.html. Modified Paths: -------------- trunk/2.5.0/CHANGES trunk/2.5.0/notes.html Modified: trunk/2.5.0/CHANGES =================================================================== --- trunk/2.5.0/CHANGES 2010-03-17 22:33:11 UTC (rev 1545) +++ trunk/2.5.0/CHANGES 2010-03-17 22:38:11 UTC (rev 1546) @@ -12,7 +12,7 @@ ---------- - User Interface refresh: Removed the grey headers, made the vertical divider easier to grab and made filtering more discoverable. - Added support for plugins. -- Added support for search engine plugins. +- Added support for search engine plugins and the ability to do web-searches from the toolbar. - Added support for blog editor plugins. - Added support for sharing plugins that work like bookmarklets for social websites. - Added "Share With Facebook" button. Modified: trunk/2.5.0/notes.html =================================================================== --- trunk/2.5.0/notes.html 2010-03-17 22:33:11 UTC (rev 1545) +++ trunk/2.5.0/notes.html 2010-03-17 22:38:11 UTC (rev 1546) @@ -7,7 +7,7 @@ <ul> <li>User Interface refresh: Removed the grey headers, made the vertical divider easier to grab and made filtering more discoverable.</li> <li>Added support for plugins.</li> -<li>Added support for search engine plugins.</li> +<li>Added support for search engine plugins and the ability to do web-searches from the toolbar.</li> <li>Added support for blog editor plugins.</li> <li>Added support for sharing plugins that work like bookmarklets for social websites.</li> <li>Added support for script plugins.</li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-05-11 03:56:23
|
Revision: 1594 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1594&view=rev Author: stevewpalmer Date: 2011-05-11 03:56:16 +0000 (Wed, 11 May 2011) Log Message: ----------- Bump up build number to 2502 and copyright year to 2011 in anticipation of a minor release. Modified Paths: -------------- trunk/2.5.0/Info.plist trunk/2.5.0/Vienna.xcodeproj/project.pbxproj Modified: trunk/2.5.0/Info.plist =================================================================== --- trunk/2.5.0/Info.plist 2010-12-03 22:20:33 UTC (rev 1593) +++ trunk/2.5.0/Info.plist 2011-05-11 03:56:16 UTC (rev 1594) @@ -54,7 +54,7 @@ <key>CFBundleExecutable</key> <string>Vienna</string> <key>CFBundleGetInfoString</key> - <string>Vienna version $(VIENNA_VERSION_NUMBER).${BUILD_NUMBER}, Copyright 2004-2010 Contributors. See Help/Acknowledgements for list of contributors.</string> + <string>Vienna version $(VIENNA_VERSION_NUMBER).${BUILD_NUMBER}, Copyright 2004-2011 Contributors. See Help/Acknowledgements for list of contributors.</string> <key>CFBundleHelpBookFolder</key> <string>Vienna Help</string> <key>CFBundleHelpBookName</key> Modified: trunk/2.5.0/Vienna.xcodeproj/project.pbxproj =================================================================== --- trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2010-12-03 22:20:33 UTC (rev 1593) +++ trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2011-05-11 03:56:16 UTC (rev 1594) @@ -139,7 +139,6 @@ AA5AC2660C3ECAA000B2E14F /* SearchString.m in Sources */ = {isa = PBXBuildFile; fileRef = AA5AC2640C3ECAA000B2E14F /* SearchString.m */; }; AA60238108C298FB002CFD06 /* HelperFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = AA60237F08C298FB002CFD06 /* HelperFunctions.m */; }; AA62D7DC0859A9F70040C370 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA62D7DB0859A9F70040C370 /* Growl.framework */; }; - AA62D7FC0859ABEC0040C370 /* Growl.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = AA62D7DB0859A9F70040C370 /* Growl.framework */; }; AA6321510885F0BB006382D3 /* comments.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AA6321500885F0BB006382D3 /* comments.tiff */; }; AA63227F08861C99006382D3 /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = AA63227E08861C99006382D3 /* Constants.m */; }; AA67F353089728AD008BBC37 /* Styles in Copy Shared Support Files */ = {isa = PBXBuildFile; fileRef = AA67F32E089727FB008BBC37 /* Styles */; }; @@ -297,7 +296,6 @@ files = ( B23A794D10FF50BE0085C85B /* Sparkle.framework in Copy Frameworks */, AABCD0760B66B0B300A986F5 /* PSMTabBarControl.framework in Copy Frameworks */, - AA62D7FC0859ABEC0040C370 /* Growl.framework in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -1485,8 +1483,12 @@ /* Begin PBXProject section */ 2A37F4A9FDCFA73011CA2CEA /* Project object */ = { isa = PBXProject; + attributes = { + ORGANIZATIONNAME = None; + }; buildConfigurationList = AA4F9AB60855422400C18279 /* Build configuration list for PBXProject "Vienna" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, @@ -2604,8 +2606,8 @@ AA4F9AB70855422400C18279 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUILD_NUMBER = 2500; + ALWAYS_SEARCH_USER_PATHS = YES; + BUILD_NUMBER = 2502; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; GCC_DEBUGGING_SYMBOLS = full; @@ -2615,6 +2617,7 @@ GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_VERSION = 4.2; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + HEADER_SEARCH_PATHS = .; PREBINDING = NO; SDKROOT = macosx10.5; VIENNA_CHANGELOG_SUFFIX = ""; @@ -2626,12 +2629,12 @@ AA4F9AB80855422400C18279 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; ARCHS = ( ppc, i386, ); - BUILD_NUMBER = 2500; + BUILD_NUMBER = 2502; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_POSTPROCESSING = YES; GCC_DEBUGGING_SYMBOLS = full; @@ -2640,6 +2643,7 @@ GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_VERSION = 4.2; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + HEADER_SEARCH_PATHS = .; PREBINDING = NO; SDKROOT = macosx10.5; SEPARATE_STRIP = YES; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-06-10 04:16:55
|
Revision: 1597 http://vienna-rss.svn.sourceforge.net/vienna-rss/?rev=1597&view=rev Author: stevewpalmer Date: 2011-06-10 04:16:48 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Update notes, changes, release instructions and minima version to 2.5.1. Modified Paths: -------------- trunk/2.5.0/CHANGES trunk/2.5.0/Release Instructions.txt trunk/2.5.0/Vienna.xcodeproj/project.pbxproj trunk/2.5.0/notes.html Modified: trunk/2.5.0/CHANGES =================================================================== --- trunk/2.5.0/CHANGES 2011-06-10 03:59:56 UTC (rev 1596) +++ trunk/2.5.0/CHANGES 2011-06-10 04:16:48 UTC (rev 1597) @@ -8,6 +8,11 @@ Thanks! +2.5.1.2502 +---------- +- Fix issue where styles fail to render under Mac OSX Lion. +- Fix Share With Twitter plugin. + 2.5.0.2500 ---------- - User Interface refresh: Removed the grey headers, made the vertical divider easier to grab and made filtering more discoverable. Modified: trunk/2.5.0/Release Instructions.txt =================================================================== --- trunk/2.5.0/Release Instructions.txt 2011-06-10 03:59:56 UTC (rev 1596) +++ trunk/2.5.0/Release Instructions.txt 2011-06-10 04:16:48 UTC (rev 1597) @@ -4,11 +4,11 @@ (1) Check out a fresh working copy from the repository, to make sure there's no crud that goes into the release version. Also, I would suggest not using your home directory to build, because the full path names will appear in the code (do "strings Vienna" on the executable to see). I use "/Users/ReleaseBuilds", for example. cd /Users/ReleaseBuilds -svn checkout https://vienna-rss.svn.sourceforge.net/svnroot/vienna-rss/trunk/2.3.0 Vienna2.3.0 +svn checkout https://vienna-rss.svn.sourceforge.net/svnroot/vienna-rss/trunk/2.5.0 Vienna2.5.1 (2) Run the build script. -cd Vienna2.3.0/scripts +cd Vienna2.5.0/scripts For stable releases: @@ -20,11 +20,11 @@ (3) Login to SourceForge with your admin account and load <https://sourceforge.net/project/admin/explorer.php?group_id=142635>. -(4) Create a new folder "2.3.0.2300" under "Released Versions" for stable releases or "Test Versions" for beta releases. +(4) Create a new folder "2.5.1.2502" under "Released Versions" for stable releases or "Test Versions" for beta releases. -(5) Upload "Vienna2.3.0.2300.zip" and "Vienna2.3.0.2300.en-us.zip" to the "2.3.0.2300" folder. +(5) Upload "Vienna2.5.1.2502.zip" and "Vienna2.5.1.2502.en-us.zip" to the "2.5.1.2502" folder. -(6) For stable releases, edit the "Properties" of "Vienna2.3.0.2300.zip" and set it as default download for Mac OS X. Don't do this for beta releases! +(6) For stable releases, edit the "Properties" of "Vienna2.5.1.2502.zip" and set it as default download for Mac OS X. Don't do this for beta releases! (7) Verify the downloads. Load the SourceForge Downloads page for Vienna at <https://sourceforge.net/projects/vienna-rss/files/>, download both new zip files, uncompress them, and the run apps. @@ -37,24 +37,24 @@ For stable releases: -cp changelog.xml changelog.2.3.0.backup.xml +cp changelog.xml changelog.2.5.1.backup.xml For beta releases: -cp changelog_beta.xml changelog_beta.2.3.0.backup.xml +cp changelog_beta.xml changelog_beta.2.5.1.backup.xml -(9) Upload "changelog.xml" or "changelog_beta.xml" and "noteson2.3.0.2300.html" via ssh or sftp to "/home/groups/v/vi/vienna-rss/htdocs". +(9) Upload "changelog.xml" or "changelog_beta.xml" and "noteson2.5.1.2502.html" via ssh or sftp to "/home/groups/v/vi/vienna-rss/htdocs". (10) Make sure that minimumSystemVersion is entered correctly in "changelog.xml". -(11) Make sure that the files uploaded in step (12) are group-writable on the server, in case someone else needs to edit them. +(11) Make sure that the files uploaded in step (9) are group-writable on the server, in case someone else needs to edit them. -chmod g+w changelog.xml noteson2.3.0.2300.html +chmod g+w changelog.xml noteson2.5.1.2502.html (12) Run the previous version of Vienna, and make sure that the Sparkle update mechanism works correctly to display and download the latest version. Check again after updating to make sure Sparkle is showing that you have the latest version. (13) Post an announcement of the new release on the CocoaForge Vienna forum at <http://forums.cocoaforge.com/viewforum.php?f=18>. -(14) Upload "Vienna2.3.0.2300.dSYM.zip" via ssh or sftp to "/home/groups/v/vi/vienna-rss/htdocs/debugging". +(14) Upload "Vienna2.5.1.2502.dSYM.zip" via ssh or sftp to "/home/groups/v/vi/vienna-rss/htdocs/debugging". (15) Update the svn trunk for the next release. This requires modifying the files "CHANGES" and "notes.html", as well as increasing BUILD_NUMBER and VIENNA_VERSION_NUMBER in the project build settings. Modified: trunk/2.5.0/Vienna.xcodeproj/project.pbxproj =================================================================== --- trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2011-06-10 03:59:56 UTC (rev 1596) +++ trunk/2.5.0/Vienna.xcodeproj/project.pbxproj 2011-06-10 04:16:48 UTC (rev 1597) @@ -79,6 +79,7 @@ AA1A2C300C0A1EC1005968DC /* emptyTrashButton.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AA1A2C2F0C0A1EC1005968DC /* emptyTrashButton.tiff */; }; AA20DC9E0882CCC300A226F5 /* unread.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AA20DC9D0882CCC300A226F5 /* unread.tiff */; }; AA2185060861E7E10024DD4A /* metal_column_header.png in Resources */ = {isa = PBXBuildFile; fileRef = AA2185050861E7E10024DD4A /* metal_column_header.png */; }; + AA2325FC137A50E300255ADE /* Growl.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = AA62D7DB0859A9F70040C370 /* Growl.framework */; }; AA26F448060490BE00FE7994 /* alphaPixel.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AA26F435060490BD00FE7994 /* alphaPixel.tiff */; }; AA26F44D060490BE00FE7994 /* flagged_header.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AA26F43A060490BD00FE7994 /* flagged_header.tiff */; }; AA26F44E060490BE00FE7994 /* flagged.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AA26F43B060490BD00FE7994 /* flagged.tiff */; }; @@ -294,6 +295,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + AA2325FC137A50E300255ADE /* Growl.framework in Copy Frameworks */, B23A794D10FF50BE0085C85B /* Sparkle.framework in Copy Frameworks */, AABCD0760B66B0B300A986F5 /* PSMTabBarControl.framework in Copy Frameworks */, ); @@ -2621,7 +2623,7 @@ PREBINDING = NO; SDKROOT = macosx10.5; VIENNA_CHANGELOG_SUFFIX = ""; - VIENNA_VERSION_NUMBER = 2.5.0; + VIENNA_VERSION_NUMBER = 2.5.1; WARNING_CFLAGS = "-Wall"; }; name = Development; @@ -2648,7 +2650,7 @@ SDKROOT = macosx10.5; SEPARATE_STRIP = YES; VIENNA_CHANGELOG_SUFFIX = ""; - VIENNA_VERSION_NUMBER = 2.5.0; + VIENNA_VERSION_NUMBER = 2.5.1; WARNING_CFLAGS = "-Wall"; }; name = Deployment; Modified: trunk/2.5.0/notes.html =================================================================== --- trunk/2.5.0/notes.html 2011-06-10 03:59:56 UTC (rev 1596) +++ trunk/2.5.0/notes.html 2011-06-10 04:16:48 UTC (rev 1597) @@ -1,26 +1,12 @@ <html> <head> -<title>Vienna 2.5.0.2500</title> +<title>Vienna 2.5.1.2502</title> </head> <body> <h1>This version requires Mac OS X 10.5 Leopard.</h1> <ul> -<li>User Interface refresh: Removed the grey headers, made the vertical divider easier to grab and made filtering more discoverable.</li> -<li>Added support for plugins.</li> -<li>Added support for search engine plugins and the ability to do web-searches from the toolbar.</li> -<li>Added support for blog editor plugins.</li> -<li>Added support for sharing plugins that work like bookmarklets for social websites.</li> -<li>Added support for script plugins.</li> -<li>Added Share With Facebook button.</li> -<li>Added Share With Evernote button.</li> -<li>Added Share With Twitter button with automatic URL shortening via bit.ly.</li> -<li>Added user contributed "Share with Delicious" plugin to the core distribution. Thanks to forum user czanderna.</li> -<li>Update to the current version of Sparkle, which prevents auto-updating to a version of Vienna which will not run on the user's system.</li> -<li>Fix bug where deleting a feed in Unified view mode would cause Vienna to stop working correctly.</li> -<li>Fix bug where changing the article font size would crash Vienna.</li> -<li>Fix bug that caused zombiefied update spinners (thanks to Curtis Faith).</li> -<li>Fix bug that caused the reading position to be lost upon refresh (thanks to Curtis Faith).</li> - +<li>Fix issue where styles fail to render under Mac OSX Lion.</li> +<li>Fix Share With Twitter plugin.</li> </ul> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |