[balsa/gtk3] Do not check for subthread
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Do not check for subthread
- Date: Thu, 21 Feb 2013 16:51:16 +0000 (UTC)
commit b91614309d4d16bbb115518e1969e0c4976a8553
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Feb 21 08:05:15 2013 -0500
Do not check for subthread
* src/main.c (balsa_progress_set_text): do not check for
subthread, as balsa_window_setup_progress is thread-safe.
ChangeLog | 5 +++++
src/main.c | 6 ++----
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5c5d615..4fd686d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-21 Peter Bloomfield
+
+ * src/main.c (balsa_progress_set_text): do not check for
+ subthread, as balsa_window_setup_progress is thread-safe.
+
2013-02-20 Peter Bloomfield
* src/main-window.c: set up progress bar in an idle callback.
diff --git a/src/main.c b/src/main.c
index 3c7864f..592e34a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -490,18 +490,16 @@ balsa_progress_set_text(LibBalsaProgress * progress, const gchar * text,
{
gboolean rc = FALSE;
- gdk_threads_enter();
-
if (!balsa_app.main_window) {
- gdk_threads_leave();
return;
}
+ /* balsa_window_setup_progress is thread-safe, so we do not check
+ * for a subthread */
if (!text || total >= LIBBALSA_PROGRESS_MIN_COUNT)
rc = balsa_window_setup_progress(balsa_app.main_window, text);
g_get_current_time(&prev_time_val);
min_fraction = LIBBALSA_PROGRESS_MIN_UPDATE_STEP;
- gdk_threads_leave();
*progress = (text && rc) ?
LIBBALSA_PROGRESS_YES : LIBBALSA_PROGRESS_NO;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]