summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-03-01 20:55:10 +0000
committersr55 <[email protected]>2013-03-01 20:55:10 +0000
commit3f27ed840bdd9956abdae723422f2b4da7fff8c7 (patch)
tree38d836742a1d1ebf78984e18b22071d5626aeedc /gtk
parent06e7a9ace3439f08350a75a6f9a491f1bc4161a3 (diff)
Merging Trunk into OpenCL
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5279 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c12
-rw-r--r--gtk/src/hb-backend.c9
-rw-r--r--gtk/src/hb-backend.h2
-rw-r--r--gtk/src/main.c2
4 files changed, 21 insertions, 4 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index eb98553e3..6e494f26e 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2826,15 +2826,21 @@ ghb_backend_events(signal_user_data_t *ud)
}
else
{
- status_str = g_strdup_printf ("Scanning title %d of %d...",
+ if (status.scan.preview_cur == 0)
+ status_str = g_strdup_printf("Scanning title %d of %d...",
status.scan.title_cur, status.scan.title_count );
+ else
+ status_str = g_strdup_printf(
+ "Scanning title %d of %d preview %d...",
+ status.scan.title_cur, status.scan.title_count,
+ status.scan.preview_cur);
+
}
gtk_label_set_text (label, status_str);
g_free(status_str);
if (status.scan.title_count > 0)
{
- gtk_progress_bar_set_fraction (scan_prog,
- (gdouble)status.scan.title_cur / status.scan.title_count);
+ gtk_progress_bar_set_fraction (scan_prog, status.scan.progress);
}
}
else if (status.scan.state & GHB_STATE_SCANDONE)
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index bdd53c959..689c3b7e0 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -3495,6 +3495,9 @@ ghb_backend_scan(const gchar *path, gint titleindex, gint preview_count, uint64_
// when computing progress
hb_status.scan.title_count = 1;
hb_status.scan.title_cur = 0;
+ hb_status.scan.preview_count = 1;
+ hb_status.scan.preview_cur = 0;
+ hb_status.scan.progress = 0;
}
void
@@ -3563,6 +3566,9 @@ ghb_track_status()
hb_status.scan.state |= GHB_STATE_SCANNING;
hb_status.scan.title_count = p.title_count;
hb_status.scan.title_cur = p.title_cur;
+ hb_status.scan.preview_count = p.preview_count;
+ hb_status.scan.preview_cur = p.preview_cur;
+ hb_status.scan.progress = p.progress;
} break;
#undef p
@@ -3637,6 +3643,9 @@ ghb_track_status()
hb_status.queue.state |= GHB_STATE_SCANNING;
hb_status.queue.title_count = p.title_count;
hb_status.queue.title_cur = p.title_cur;
+ hb_status.queue.preview_count = p.preview_count;
+ hb_status.queue.preview_cur = p.preview_cur;
+ hb_status.queue.progress = p.progress;
} break;
#undef p
diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h
index e07bcb4cc..242a3e3b7 100644
--- a/gtk/src/hb-backend.h
+++ b/gtk/src/hb-backend.h
@@ -34,6 +34,8 @@ typedef struct
// SCANNING
gint title_count;
gint title_cur;
+ gint preview_count;
+ gint preview_cur;
// WORKING
gint unique_id;
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 9f3dc8b24..b990ec0c4 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -1082,7 +1082,7 @@ main(int argc, char *argv[])
g_idle_add((GSourceFunc)ghb_reload_queue, ud);
// Start timer for monitoring libhb status, 500ms
- g_timeout_add(500, ghb_timer_cb, (gpointer)ud);
+ g_timeout_add(200, ghb_timer_cb, (gpointer)ud);
// Add dvd devices to File menu
ghb_volname_cache_init();