Author: duncan
Date: Sun Feb 24 12:33:58 2008
New Revision: 10428

Log:
Updated AlertBox messages


Modified:
   branches/rel-1-7/freevo/src/tv/edit_favorite.py
   branches/rel-1-7/freevo/src/tv/favoriteitem.py
   branches/rel-1-7/freevo/src/tv/plugins/manual_record.py
   branches/rel-1/freevo/src/tv/edit_favorite.py
   branches/rel-1/freevo/src/tv/favoriteitem.py
   branches/rel-1/freevo/src/tv/plugins/manual_record.py
   branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py
   branches/rel-1/freevo/src/tv/plugins/view_favorites.py
   branches/rel-1/freevo/src/tv/programitem.py

Modified: branches/rel-1-7/freevo/src/tv/edit_favorite.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/edit_favorite.py     (original)
+++ branches/rel-1-7/freevo/src/tv/edit_favorite.py     Sun Feb 24 12:33:58 2008
@@ -208,8 +208,7 @@
                     searcher.draw()
                     self.osd.update()
         else:
-            AlertBox(parent=self,
-                     text=_('Remove Failed')+(': %s' % msg)).show()
+            AlertBox(parent=self, text=_('Remove favorite failed')+(':\n%s' % 
msg)).show()
 
 
     def eventhandler(self, event, menuw=None):
@@ -325,7 +324,7 @@
                     self.destroy()
                     AlertBox(parent='osd', text=_('Favorite %s has been 
saved') % self.name_input.get_word()).show()
                 else:
-                    AlertBox(parent=self, text=_('Failed: %s') % msg).show()
+                    AlertBox(parent=self, text=_('Add favorite 
failed')+(':\n%s' % msg)).show()
                 return True
             elif event in (em.INPUT_LEFT, em.MENU_PAGEUP):
                 self.save.toggle_selected()

Modified: branches/rel-1-7/freevo/src/tv/favoriteitem.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/favoriteitem.py      (original)
+++ branches/rel-1-7/freevo/src/tv/favoriteitem.py      Sun Feb 24 12:33:58 2008
@@ -347,7 +347,7 @@
                 # it is important to show the user this error,
                 # because that means the favorite is removed,
                 # and must be created again
-                msgtext=_('Save failed, favorite was lost.')+(': %s' % msg)
+                msgtext=_('Save failed, favorite was lost')+(':\n%s' % msg)
                 AlertBox(text=msgtext).show()
 
 
@@ -368,5 +368,5 @@
             AlertBox(text=msgtext).show()
         else:
             # if all fails then we should show an error
-            msgtext = _('Remove failed')+(': %s' % msg)
+            msgtext = _('Remove failed')+(':\n%s' % msg)
             AlertBox(text=msgtext).show()

Modified: branches/rel-1-7/freevo/src/tv/plugins/manual_record.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/plugins/manual_record.py     (original)
+++ branches/rel-1-7/freevo/src/tv/plugins/manual_record.py     Sun Feb 24 
12:33:58 2008
@@ -337,7 +337,7 @@
             (result, reason) = 
self.recordclient.scheduleRecordingNow(self.prog)
 
             if not result:
-                AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
reason)).show()
+                AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
reason)).show()
             else:
                 if menuw:
                     menuw.back_one_menu(arg='reload')
@@ -367,20 +367,20 @@
             if self.MAXDAYS > 1:
                 isgood = False
                 msg = _("Program would record for more than %d days!") % 
self.MAXDAYS
-                AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+                AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
             else:
                 isgood = False
                 msg = _("Program would record for more than 1 day!") % 
self.MAXDAYS
-                AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+                AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
 
         elif not starttime < stoptime:
             isgood = False
             msg = _("start time is not before stop time." )
-            AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+            AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
         elif stoptime < curtime_epoch + self.MINPICKUP:
             isgood = False
             msg = _("Sorry, the stop time does not give enough time for 
scheduler to pickup the change.  Please set it to record for a few minutes 
longer.")
-            AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+            AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
         else:
             self.prog.start = starttime
             self.prog.stop = stoptime

Modified: branches/rel-1/freevo/src/tv/edit_favorite.py
==============================================================================
--- branches/rel-1/freevo/src/tv/edit_favorite.py       (original)
+++ branches/rel-1/freevo/src/tv/edit_favorite.py       Sun Feb 24 12:33:58 2008
@@ -209,8 +209,7 @@
                     searcher.draw()
                     self.osd.update()
         else:
-            AlertBox(parent=self,
-                     text=_('Remove Failed')+(': %s' % msg)).show()
+            AlertBox(parent=self, text=_('Remove favorite failed')+(':\n%s' % 
msg)).show()
 
 
     def eventhandler(self, event, menuw=None):
@@ -326,7 +325,7 @@
                     self.destroy()
                     AlertBox(parent='osd', text=_('Favorite %s has been 
saved') % self.name_input.get_word()).show()
                 else:
-                    AlertBox(parent=self, text=_('Failed: %s') % msg).show()
+                    AlertBox(parent=self, text=_('Add favorite 
failed')+(':\n%s' % msg)).show()
                 return True
             elif event in (em.INPUT_LEFT, em.MENU_PAGEUP):
                 self.save.toggle_selected()

Modified: branches/rel-1/freevo/src/tv/favoriteitem.py
==============================================================================
--- branches/rel-1/freevo/src/tv/favoriteitem.py        (original)
+++ branches/rel-1/freevo/src/tv/favoriteitem.py        Sun Feb 24 12:33:58 2008
@@ -348,7 +348,7 @@
                 # it is important to show the user this error,
                 # because that means the favorite is removed,
                 # and must be created again
-                msgtext=_('Save failed, favorite was lost.')+(': %s' % msg)
+                msgtext=_('Save failed, favorite was lost')+(':\n%s' % msg)
                 AlertBox(text=msgtext).show()
 
 
@@ -369,5 +369,5 @@
             AlertBox(text=msgtext).show()
         else:
             # if all fails then we should show an error
-            msgtext = _('Remove failed')+(': %s' % msg)
+            msgtext = _('Remove failed')+(':\n%s' % msg)
             AlertBox(text=msgtext).show()

Modified: branches/rel-1/freevo/src/tv/plugins/manual_record.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/manual_record.py       (original)
+++ branches/rel-1/freevo/src/tv/plugins/manual_record.py       Sun Feb 24 
12:33:58 2008
@@ -339,7 +339,7 @@
             (result, reason) = 
self.recordclient.scheduleRecordingNow(self.prog)
 
             if not result:
-                AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
reason)).show()
+                AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
reason)).show()
             else:
                 if menuw:
                     menuw.back_one_menu(arg='reload')
@@ -369,20 +369,20 @@
             if self.MAXDAYS > 1:
                 isgood = False
                 msg = _("Program would record for more than %d days!") % 
self.MAXDAYS
-                AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+                AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
             else:
                 isgood = False
                 msg = _("Program would record for more than 1 day!") % 
self.MAXDAYS
-                AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+                AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
 
         elif not starttime < stoptime:
             isgood = False
             msg = _("start time is not before stop time." )
-            AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+            AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
         elif stoptime < curtime_epoch + self.MINPICKUP:
             isgood = False
             msg = _("Sorry, the stop time does not give enough time for 
scheduler to pickup the change.  Please set it to record for a few minutes 
longer.")
-            AlertBox(text=_('Save Failed, recording was lost')+(': %s' % 
msg)).show()
+            AlertBox(text=_('Save Failed, recording was lost')+(':\n%s' % 
msg)).show()
         else:
             self.prog.start = starttime
             self.prog.stop = stoptime

Modified: branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py        
(original)
+++ branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py        Sun Feb 
24 12:33:58 2008
@@ -88,7 +88,7 @@
 
         #(server_available, msg) = self.recordclient.connectionTest()
         #if not server_available:
-        #    AlertBox(_('Recording server is unavailable.')+(': %s' % 
msg)).show()
+        #    AlertBox(_('Recording server is not available')+(':\n%s' % 
msg)).show()
         #    return []
 
         recordings = self.recordclient.getScheduledRecordingsNow()
@@ -101,7 +101,7 @@
             for prog in progs:
                 items.append(ProgramItem(self, prog, context='schedule'))
         else:
-            AlertBox(_('Get recordings failed')+(': %s' % recordings)).show()
+            AlertBox(_('Get recordings failed')+(':\n%s' % recordings)).show()
             return []
 
         return items

Modified: branches/rel-1/freevo/src/tv/plugins/view_favorites.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/view_favorites.py      (original)
+++ branches/rel-1/freevo/src/tv/plugins/view_favorites.py      Sun Feb 24 
12:33:58 2008
@@ -89,21 +89,18 @@
         _debug_('get_items()', 2)
         items = []
 
-        #(server_available, msg) = self.recordclient.connectionTest()
-        #if not server_available:
-        #    AlertBox(_('Recording server is unavailable.')+(': %s' % 
msg)).show()
-        #    return []
+        server_available = self.recordclient.pingNow()
+        if not server_available:
+            AlertBox(_('Recording server is not available')+(':\n%s' % 
msg)).show()
+            return []
 
-        (result, favorites) = self.recordclient.getFavoritesNow()
-        if result:
+        favorites = self.recordclient.getFavoritesNow()
+        if favorites:
             f = lambda a, b: cmp(a.priority, b.priority)
-            favorites = favorites.values()
-            favorites.sort(f)
-            for fav in favorites:
+            favs = favorites.values()
+            favs.sort(f)
+            for fav in favs:
                 items.append(FavoriteItem(self, fav))
-        else:
-            AlertBox(_('Get favorites failed')+(': %s' % favorites)).show()
-            return []
 
         return items
 

Modified: branches/rel-1/freevo/src/tv/programitem.py
==============================================================================
--- branches/rel-1/freevo/src/tv/programitem.py (original)
+++ branches/rel-1/freevo/src/tv/programitem.py Sun Feb 24 12:33:58 2008
@@ -225,7 +225,7 @@
             pop = AlertBox(text=msgtext).show()
         else:
             # something went wrong
-            msgtext = _('Scheduling failed')+(': %s' % reason)
+            msgtext = _('Scheduling failed')+(':\n%s' % reason)
             AlertBox(text=msgtext).show()
 
 
@@ -246,7 +246,7 @@
             AlertBox(text=msgtext).show()
         else:
             # something went wrong
-            msgtext = _('Remove failed')+(': %s' % reason)
+            msgtext = _('Remove failed')+(':\n%s' % reason)
             AlertBox(text=msgtext).show()
 
 
@@ -316,7 +316,7 @@
             return
         else:
             # something else went wrong
-            msgtext = _('findMatches failed') +(': %s' % matches)
+            msgtext = _('Search failed') +(':\n%s' % matches)
             AlertBox(text=msgtext).show()
             return
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to