static GSList *status_messages = NULL;
+#ifdef USE_THREADS
static GMutex *recent_mtx = NULL;
+#endif
/* The "scroll box dynamic" is a (complicated) pseudo widget to */
/* place a vertically list of widgets in (currently the interfaces and recent files). */
* most OSes use.
*/
err = ws_stat64(ri_stat->filename, &stat_buf);
+#ifdef USE_THREADS
g_mutex_lock(recent_mtx);
+#endif
ri_stat->err = err;
if(err == 0) {
if (stat_buf.st_size/1024/1024/1024 > 10) {
} else {
ri_stat->stat_done = TRUE;
}
+#ifdef USE_THREADS
g_mutex_unlock(recent_mtx);
+#endif
return NULL;
}
return FALSE;
}
+#ifdef USE_THREADS
g_mutex_lock(recent_mtx);
-
+#endif
if (ri_stat->stat_done) {
again = FALSE;
gtk_label_set_markup(GTK_LABEL(ri_stat->label), ri_stat->str->str);
ri_stat->timer = 0;
}
/* Else append some sort of Unicode or ASCII animation to the label? */
+#ifdef USE_THREADS
g_mutex_unlock(recent_mtx);
-
+#endif
return again;
}
return;
}
+#ifdef USE_THREADS
g_mutex_lock(recent_mtx);
+#endif
if (ri_stat->timer) {
g_source_remove(ri_stat->timer);
ri_stat->timer = 0;
} else {
ri_stat->label = NULL;
}
+#ifdef USE_THREADS
g_mutex_unlock(recent_mtx);
+#endif
}
/* create a "file link widget" */
welcome_eb);
gtk_widget_show_all(welcome_scrollw);
+#ifdef USE_THREADS
recent_mtx = g_mutex_new();
+#endif
return welcome_scrollw;
}