165
165
def on_finished (self, evt):
166
166
win = self.parent
168
if evt.id == operations.SUCCESSFUL:
169
gtkutil.dialog_info (
171
_("Playlist was saved successfully."),
168
if evt.id != operations.SUCCESSFUL:
175
169
gtkutil.dialog_error (
176
170
_("Playlist Not Saved"),
177
171
_("There was an error while saving the playlist."),
231
225
except SerpentineNotSupportedError:
232
gtkutil.dialog_error (
233
_("Unsupported Format"),
234
_("The playlist format you used (by the file extension) is "
235
"currently not supported."),
226
# In this case the user supplied a wrong extension
227
# let's ask for him to choose one
229
if extension is None:
231
items = map(lambda row: row[0], self.store)
232
# First row is useless
235
indexes, response = gtkutil.choice_dialog(
236
_("Select one playlist format"),
237
_("Serpentine will open any of these formats so the "
238
"one you choose only matters if you are going to "
239
"open with other applications."),
240
one_text_item = _("Do you want to save as the %s "
246
ok_button = gtk.STOCK_SAVE,
248
if len(indexes) != 0:
250
# Since we deleted the first row from the items then
251
# the index have an offset of 1
253
row = self.store[index]
257
oper = app.savePlaylist.save (filename, extension)
258
oper.listeners.append (self)
261
# Select the option in the list store
262
self.combo.set_active(index)
267
gtkutil.dialog_error (
268
_("Unsupported Format"),
269
_("The playlist format you used (by the file extension) is "
270
"currently not supported."),
239
275
self.file_dlg.unselect_all()
240
276
self.file_dlg.hide()