OSDN Git Service
(root)
/
handbrake-jp
/
handbrake-jp-git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LinGui: don't disable subme 10 when psy-rd is 0
[handbrake-jp/handbrake-jp-git.git]
/
gtk
/
src
/
callbacks.c
diff --git
a/gtk/src/callbacks.c
b/gtk/src/callbacks.c
index
f25e6e5
..
0d2aa76
100644
(file)
--- a/
gtk/src/callbacks.c
+++ b/
gtk/src/callbacks.c
@@
-393,7
+393,7
@@
get_direct_dvd_volume_name(const gchar *drive)
gchar *result = NULL;
gchar vname[51], fsname[51];
gchar *result = NULL;
gchar vname[51], fsname[51];
- if (GetVolumeInformation(drive, vname, 50, NULL, NULL, NULL, fsname, 5
1
))
+ if (GetVolumeInformation(drive, vname, 50, NULL, NULL, NULL, fsname, 5
0
))
{
result = g_strdup_printf("%s", vname);
}
{
result = g_strdup_printf("%s", vname);
}
@@
-599,21
+599,17
@@
set_destination(signal_user_data_t *ud)
static gchar*
get_file_label(const gchar *filename)
{
static gchar*
get_file_label(const gchar *filename)
{
- static gchar *containers[] =
- {".vob", ".mpg", ".m2ts", ".mkv", ".mp4", ".m4v", ".avi", ".ogm", NULL};
- gchar *base;
- gint ii;
+ gchar *base, *pos, *end;
base = g_path_get_basename(filename);
base = g_path_get_basename(filename);
- for (ii = 0; containers[ii] != NULL; ii++)
+ pos = strrchr(base, '.');
+ if (pos != NULL)
{
{
- if (g_str_has_suffix(base, containers[ii]))
- {
-
gchar *pos
;
- pos = strrchr(base, '.');
+ // If the last '.' is within 4 chars of end of name, assume
+ // there is an extension we want to strip.
+
end = &base[strlen(base) - 1]
;
+ if (end - pos <= 4)
*pos = 0;
*pos = 0;
- break;
- }
}
return base;
}
}
return base;
}
@@
-656,7
+652,6
@@
update_source_label(signal_user_data_t *ud, const gchar *source, gboolean update
g_debug("update_source_label()");
len = strlen(filename);
g_debug("update_source_label()");
len = strlen(filename);
- if (filename[len-1] == G_DIR_SEPARATOR) filename[len-1] = 0;
if (g_file_test(filename, G_FILE_TEST_IS_DIR))
{
// Skip dos drive letters
if (g_file_test(filename, G_FILE_TEST_IS_DIR))
{
// Skip dos drive letters
@@
-671,6
+666,7
@@
update_source_label(signal_user_data_t *ud, const gchar *source, gboolean update
}
else
{
}
else
{
+ if (filename[len-1] == G_DIR_SEPARATOR) filename[len-1] = 0;
if (start != NULL)
start++;
else
if (start != NULL)
start++;
else