• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamewindowspythonphpguic翻訳omegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

「プロジェクト終了」 BathyScapheのプレビューアプラグインを複数使用出来るようにするプラグイン


Commit MetaInfo

Révision57b1436ef7c0a8b3cb3ff6a59950933ded3ec30d (tree)
l'heure2012-07-21 23:23:24
Auteurmasakih <masakih@user...>
Commitermasakih

Message de Log

[Mod] 環境設定用プロパティ追加。

Change Summary

Modification

--- a/PSPreviewerItem.h
+++ b/PSPreviewerItem.h
@@ -30,4 +30,8 @@
3030 @property (getter=isTryCheck) BOOL tryCheck;
3131 @property (getter=isDisplayInMenu) BOOL displayInMenu;
3232
33+@property (readonly) NSString *copyright;
34+@property (readonly) BOOL hasPreviewPanel;
35+@property (readonly) BOOL hasPreferencePanel;
36+
3337 @end
--- a/PSPreviewerItem.m
+++ b/PSPreviewerItem.m
@@ -68,6 +68,22 @@ static NSMutableDictionary *previewerInfo = nil;
6868 [previewerInfo setObject:_previewer forKey:_identifier];
6969 }
7070
71+- (NSString *)copyright
72+{
73+ NSBundle *bundle = [NSBundle bundleForClass:[self.previewer class]];
74+ NSDictionary *info = [bundle localizedInfoDictionary];
75+ return [info objectForKey:@"NSHumanReadableCopyright"];
76+}
77+- (BOOL)hasPreviewPanel
78+{
79+ return [self.previewer respondsToSelector:@selector(togglePreviewPanel:)];
80+}
81+- (BOOL)hasPreferencePanel
82+{
83+ return [self.previewer respondsToSelector:@selector(showPreviewerPreferences:)];
84+}
85+
86+
7187 - (BOOL)isEqual:(id)object
7288 {
7389 if(self == object) return YES;