1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 05:34:36 +00:00

Adapted to recent fairware changes in hscommon.

This commit is contained in:
Virgil Dupras 2011-09-26 11:54:17 -04:00
parent 9a7a20472d
commit 1b855ad64b
9 changed files with 42 additions and 15 deletions

View File

@ -63,4 +63,7 @@ http://www.hardcoded.net/licenses/bsd_license
/* model --> view */ /* model --> view */
- (void)showExtraFairwareReminder; - (void)showExtraFairwareReminder;
- (void)showMessage:(NSString *)msg; - (void)showMessage:(NSString *)msg;
- (void)setupAsRegistered;
- (void)showFairwareNagWithPrompt:(NSString *)prompt;
- (void)showDemoNagWithPrompt:(NSString *)prompt;
@end @end

View File

@ -233,8 +233,13 @@ http://www.hardcoded.net/licenses/bsd_license
// Nothing to do. // Nothing to do.
} }
- (void)showFairwareNag - (void)showFairwareNagWithPrompt:(NSString *)prompt
{ {
[HSFairwareReminder showNagWithApp:[self py]]; [HSFairwareReminder showFairwareNagWithApp:[self py] prompt:prompt];
}
- (void)showDemoNagWithPrompt:(NSString *)prompt
{
[HSFairwareReminder showDemoNagWithApp:[self py] prompt:prompt];
} }
@end @end

View File

@ -27,3 +27,7 @@
"IPhotoAppNotFoundMsg" = "The iPhoto application couldn't be found."; "IPhotoAppNotFoundMsg" = "The iPhoto application couldn't be found.";
"ClearPictureCacheConfirmMsg" = "Möchten Sie wirklich alle zwischengespeicherten Bildanalysen entfernen?"; "ClearPictureCacheConfirmMsg" = "Möchten Sie wirklich alle zwischengespeicherten Bildanalysen entfernen?";
/* hscommon */
"FairwarePromptMsg" = "{name} ist Fairware, das bedeutet \"Open Source Software, entwickelt in der Hoffnung auf einen fairen Beitrag von den Benutzern\". Viel Zeit wurde in die Software investiert, mit der Erwartung der Nutzer möge fair genug sein die Entwickler für ihren Einsatz zu kompensieren. Die \"Unbezahlte Stunden\" Abbildung zeigt die Anzahl der Stunden die noch nicht bezahlt wurden.\nWenn Sie diese Anwendung mögen, so spenden Sie bitte einen Ihrer Ansicht nach angemessenen Betrag. Danke!\n\nWenn Sie es sich nicht leisten können zu spenden, können Sie diese Erinnerung entweder ignorieren oder mir eine Anfrage an hsoft@hardcoded.net schicken, mit der Bitte für einen Registrierungsschlüssel.\n\nDieser Dialog erscheint nicht, wenn es keine unbezahlten Stunden gibt oder Sie einen gültigen Registrierungsschlüssel besitzen.";
"DemoPromptMsg" = "{name} is fairware, which means \"open source software developed with expectation of fair contributions from users\". It's a very interesting concept, but one year of fairware has shown that most people just want to know how much it costs and not be bothered with theories about intellectual property.\n\nSo I won't bother you and will be very straightforward: You can try {name} for free but you have to buy it in order to use it without limitations. In demo mode, {name} {limitation}.\n\nSo it's as simple as this. If you're curious about fairware, however, I encourage you to read more about it by clicking on the \"Fairware?\" button.";

View File

@ -26,4 +26,8 @@
"NoDeadTrackMsg" = "You have no dead tracks in your iTunes Library"; "NoDeadTrackMsg" = "You have no dead tracks in your iTunes Library";
"IPhotoAppNotFoundMsg" = "The iPhoto application couldn't be found."; "IPhotoAppNotFoundMsg" = "The iPhoto application couldn't be found.";
"ClearPictureCacheConfirmMsg" = "Do you really want to remove all your cached picture analysis?"; "ClearPictureCacheConfirmMsg" = "Do you really want to remove all your cached picture analysis?";
/* hscommon */
"FairwarePromptMsg" = "{name} is Fairware, which means \"open source software developed with expectation of fair contributions from users\". Hours have been invested in this software with the expectation that users will be fair enough to compensate them. The \"Unpaid hours\" figure you see below is the hours that have yet to be compensated for this project.\n\nIf you like this application, please make a contribution that you consider fair. Thanks!\n\nIf you cannot afford to contribute, you can either ignore this reminder or send an e-mail at support@hardcoded.net so I can send you a registration key.\n\nThis dialog doesn't show when there are no unpaid hours or when you have a valid contribution key.";
"DemoPromptMsg" = "{name} is fairware, which means \"open source software developed with expectation of fair contributions from users\". It's a very interesting concept, but one year of fairware has shown that most people just want to know how much it costs and not be bothered with theories about intellectual property.\n\nSo I won't bother you and will be very straightforward: You can try {name} for free but you have to buy it in order to use it without limitations. In demo mode, {name} {limitation}.\n\nSo it's as simple as this. If you're curious about fairware, however, I encourage you to read more about it by clicking on the \"Fairware?\" button.";

View File

@ -26,4 +26,8 @@
"NoDeadTrackMsg" = "Votre librairie iTunes ne contient aucune track morte."; "NoDeadTrackMsg" = "Votre librairie iTunes ne contient aucune track morte.";
"IPhotoAppNotFoundMsg" = "iPhoto n'a pas pu être trouvée dans vos applications."; "IPhotoAppNotFoundMsg" = "iPhoto n'a pas pu être trouvée dans vos applications.";
"ClearPictureCacheConfirmMsg" = "Voulez-vous vraiment vider la cache de vos analyses précédentes?"; "ClearPictureCacheConfirmMsg" = "Voulez-vous vraiment vider la cache de vos analyses précédentes?";
/* hscommon */
"FairwarePromptMsg" = "{name} est Fairware, ce qui signifie \"open source développé avec des attentes de contributions justes de la part des utilisateurs\". Les heures investies dans ce programme l'ont été avec l'attente que les utilisateurs seront assez honnêtes pour les compenser. Les \"Heures impayées\" que vous voyez ci-dessous sont le nombre d'heures qui n'ont pas encore été compensées.\n\nSi vous aimez cette application, veuillez faire une contribution qui vous semble juste. Merci!\n\nSi vous n'avez pas les moyens de contribuer, vous pouvez soit ignorer ce message soit envoyer un e-mail à support@hardcoded.net pour avoir une clé d'enregistrement.\n\nCette fenêtre n'apparaît pas lorsque vous avez contribué ou qu'il n'y a aucune heure impayée.";
"DemoPromptMsg" = "{name} is fairware, which means \"open source software developed with expectation of fair contributions from users\". It's a very interesting concept, but one year of fairware has shown that most people just want to know how much it costs and not be bothered with theories about intellectual property.\n\nSo I won't bother you and will be very straightforward: You can try {name} for free but you have to buy it in order to use it without limitations. In demo mode, {name} {limitation}.\n\nSo it's as simple as this. If you're curious about fairware, however, I encourage you to read more about it by clicking on the \"Fairware?\" button.";

View File

@ -26,4 +26,8 @@
"NoDeadTrackMsg" = "You have no dead tracks in your iTunes Library"; "NoDeadTrackMsg" = "You have no dead tracks in your iTunes Library";
"IPhotoAppNotFoundMsg" = "The iPhoto application couldn't be found."; "IPhotoAppNotFoundMsg" = "The iPhoto application couldn't be found.";
"ClearPictureCacheConfirmMsg" = "确定要移除所有缓存图片?"; "ClearPictureCacheConfirmMsg" = "确定要移除所有缓存图片?";
/* hscommon */
"FairwarePromptMsg" = "{name} 是一款捐助软件,也就是说 \"用户对研发开源软件所花费的时间进行符合用户意愿的捐助\"。用户可以根据研发人员花费在开发软件上的时间进行合理的补偿。用户在下面看到的 \"未支付的时间\" (Unpaid hours)表示需要对该软件进行补偿的时间。\n\n如果您喜欢这款软件我诚挚的希望您可以进行必要的捐助。谢谢\n\n如果您无法承担捐助您也可以忽略此提醒或者发送电子邮件至 support@hardcoded.net ,我会发送给您一个注册密钥。\n\n当软件没有未支付的时间或您已使用一个有效的注册密钥此对话框将不会再显示。";
"DemoPromptMsg" = "{name} is fairware, which means \"open source software developed with expectation of fair contributions from users\". It's a very interesting concept, but one year of fairware has shown that most people just want to know how much it costs and not be bothered with theories about intellectual property.\n\nSo I won't bother you and will be very straightforward: You can try {name} for free but you have to buy it in order to use it without limitations. In demo mode, {name} {limitation}.\n\nSo it's as simple as this. If you're curious about fairware, however, I encourage you to read more about it by clicking on the \"Fairware?\" button.";

View File

@ -165,10 +165,6 @@ class PyDupeGuruBase(PyFairware):
def jobCompleted_(self, jobid): def jobCompleted_(self, jobid):
self.py._job_completed(jobid) self.py._job_completed(jobid)
#---Registration
def appName(self):
return self.py.NAME
#--- model --> view #--- model --> view
def open_path(self, path): def open_path(self, path):
NSWorkspace.sharedWorkspace().openFile_(str(path)) NSWorkspace.sharedWorkspace().openFile_(str(path))

View File

@ -80,7 +80,10 @@ class DupeGuru(RegistrableApplication, Broadcaster):
# reveal_path(path) # reveal_path(path)
# start_job(jobid, func, args=()) ( func(j, *args) ) # start_job(jobid, func, args=()) ( func(j, *args) )
# show_extra_fairware_reminder() # show_extra_fairware_reminder()
# show_message(msg)
# in fairware prompts, we don't mention the edition, it's too long.
PROMPT_NAME = "dupeGuru"
DEMO_LIMITATION = tr("will only be able to delete, move or copy 10 duplicates at once")
def __init__(self, view, appdata): def __init__(self, view, appdata):
if view.get_default(DEBUG_MODE_PREFERENCE): if view.get_default(DEBUG_MODE_PREFERENCE):
@ -88,9 +91,6 @@ class DupeGuru(RegistrableApplication, Broadcaster):
logging.debug("Debug mode enabled") logging.debug("Debug mode enabled")
RegistrableApplication.__init__(self, view, appid=1) RegistrableApplication.__init__(self, view, appid=1)
Broadcaster.__init__(self) Broadcaster.__init__(self)
self.is_first_run = not self.get_default(HAD_FIRST_LAUNCH_PREFERENCE, False)
if self.is_first_run:
self.set_default(HAD_FIRST_LAUNCH_PREFERENCE, True)
self.appdata = appdata self.appdata = appdata
if not op.exists(self.appdata): if not op.exists(self.appdata):
os.makedirs(self.appdata) os.makedirs(self.appdata)

View File

@ -276,9 +276,13 @@ class DupeGuru(QObject):
self.about_box.registerButton.hide() self.about_box.registerButton.hide()
self.about_box.registeredEmailLabel.setText(self.model.registration_email) self.about_box.registeredEmailLabel.setText(self.model.registration_email)
def show_fairware_nag(self): def show_fairware_nag(self, prompt):
reg = Registration(self.model) reg = Registration(self.model)
reg.show_nag() reg.show_fairware_nag(prompt)
def show_demo_nag(self, prompt):
reg = Registration(self.model)
reg.show_demo_nag(prompt)
def show_extra_fairware_reminder(self): def show_extra_fairware_reminder(self):
dialog = ExtraFairwareReminder(self.directories_dialog, self) dialog = ExtraFairwareReminder(self.directories_dialog, self)
@ -288,3 +292,6 @@ class DupeGuru(QObject):
window = QApplication.activeWindow() window = QApplication.activeWindow()
QMessageBox.information(window, '', msg) QMessageBox.information(window, '', msg)
def open_url(self, url):
self.open_path(url)