logo       

Re: Small xine-ui inconsistency with loading subtitles: msg#00078

video.xine.devel

Subject: Re: Small xine-ui inconsistency with loading subtitles

Hi again,

Boszormenyi Zoltan wrote:
Hi,

I looked at the problem and it turned out to be easy to fix.
The fix fixes both my problems, patch is attached.

the previous *almost* fixed the second problem. This one tries to fix
it, too. The way it currently works is this:

1. Select a movie file, it remembers the directory (gGui->curdir)
2. Select a subtitle file, it starts in the same directory as the
previous movie file.
2a.Selecting a subtitle remembers the subtitle file
but does not update gGui->curdir, selecting a subtitle next time
starts in the same directory as the previous subtitle.
2b.Cancelling the selection forgets the (maybe changed) subdir,
selecting a subtitle next time starts in the same directory
as the previous movie file.
3. Select a new movie file, and it forgets about the previous
subtitle, go to #2.

Will someone please review and (maybe) apply it into the current CVS?

Boszormenyi Zoltan wrote:

Hi,

there is a small problem that annoys me enough to talk about it. :-)
I regularly use the right click menu of Xine-ui to load the movie file,
and the subtitle file after that. The annoying thing is that the file
dialog starts in my home directory, not in the directory that I loaded
the last movie from. It is not uncommon that the subtitle and the movie
file are in the same directory, so it would be logical to use the movie
directory as the starting point for the subtitle.

Also, if I press the "Close" button without selecting a subtitle file,
the next time I want to load another movie and user the right click menu, it starts from the same directory that the "Pick a subtitle file"
window showed before. Is it considered a feature or a usability bug? :-)


--
Best regards,
Zoltán Böszörményi

---------------------
What did Hussein say about his knife?
One in Bush worth two in the hand.
--- xine-ui/src/xitk/actions.c.old 2003-08-06 12:04:04.000000000 +0200
+++ xine-ui/src/xitk/actions.c 2003-08-06 13:03:15.000000000 +0200
@@ -1744,7 +1744,9 @@
static void subselector_callback(filebrowser_t *fb) {
char *file;

+#if 0
sprintf(gGui->curdir, "%s", (filebrowser_get_current_dir(fb)));
+#endif

if((file = filebrowser_get_full_filename(fb)) != NULL) {
if(file) {
@@ -1787,13 +1789,24 @@
mmk = mediamark_get_current_mmk();

if(mmk) {
+ char *dir, *file = NULL;

cbb[0].label = _("Select");
cbb[0].callback = subselector_callback;
cbb[0].need_a_file = 1;
+#if 0
cbb[1].callback = fileselector_cancel_callback;
+#else
+ cbb[1].callback = NULL;
+#endif
cbb[1].need_a_file = 0;
- (void *) create_filebrowser(_("Pick a subtitle file"), mmk->sub,
&cbb[0], NULL, &cbb[1]);
+
+ xine_strdupa(dir, (mmk->sub ? mmk->sub : mmk->mrl));
+ file = strrchr(dir, '/');
+ if (file && (strlen(file) > 1))
+ *file = '\0';
+
+ (void *) create_filebrowser(_("Pick a subtitle file"), dir, &cbb[0],
NULL, &cbb[1]);
}
}
}
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise