Author: post
Date: 2010-07-10 21:55:53 +0200 (Sat, 10 Jul 2010)
New Revision: 3474
Modified:
trunk/librawstudio/rs-dcp-file.c
trunk/librawstudio/rs-filter-request.c
trunk/librawstudio/rs-job-queue.c
trunk/librawstudio/rs-lens-db.c
trunk/librawstudio/rs-metadata.c
trunk/librawstudio/rs-profile-factory.c
trunk/src/gtk-helper.c
trunk/src/gtk-interface.c
trunk/src/rs-actions.c
trunk/src/rs-store.c
Log:
Make a whole bunch of GStaticMutex actually static, and not just show good
intentions, but actually act as a mutex ;)
Modified: trunk/librawstudio/rs-dcp-file.c
===================================================================
--- trunk/librawstudio/rs-dcp-file.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/librawstudio/rs-dcp-file.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -198,7 +198,7 @@
const gchar *
read_ascii(RSDcpFile *dcp_file, guint ifd, gushort tag, gchar **cache)
{
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
g_static_mutex_lock(&lock);
if (!*cache)
*cache = rs_tiff_get_ascii(RS_TIFF(dcp_file), ifd, tag);
Modified: trunk/librawstudio/rs-filter-request.c
===================================================================
--- trunk/librawstudio/rs-filter-request.c 2010-07-10 18:07:31 UTC (rev
3473)
+++ trunk/librawstudio/rs-filter-request.c 2010-07-10 19:55:53 UTC (rev
3474)
@@ -67,7 +67,7 @@
const RSFilterRequest *rs_filter_request_get_quick_singleton(void)
{
RSFilterRequest *request = NULL;
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
g_static_mutex_lock(&lock);
if (!request)
Modified: trunk/librawstudio/rs-job-queue.c
===================================================================
--- trunk/librawstudio/rs-job-queue.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/librawstudio/rs-job-queue.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -130,7 +130,7 @@
rs_job_queue_get_singleton()
{
static RSJobQueue *singleton = NULL;
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
g_static_mutex_lock(&lock);
if (!singleton)
Modified: trunk/librawstudio/rs-lens-db.c
===================================================================
--- trunk/librawstudio/rs-lens-db.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/librawstudio/rs-lens-db.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -113,7 +113,7 @@
{
xmlTextWriterPtr writer;
GList *list;
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
g_static_mutex_lock(&lock);
writer = xmlNewTextWriterFilename(lens_db->path, 0);
Modified: trunk/librawstudio/rs-metadata.c
===================================================================
--- trunk/librawstudio/rs-metadata.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/librawstudio/rs-metadata.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -121,7 +121,7 @@
gchar *cache_filename;
gchar *thumb_filename;
xmlTextWriterPtr writer;
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
if (!dotdir)
return;
Modified: trunk/librawstudio/rs-profile-factory.c
===================================================================
--- trunk/librawstudio/rs-profile-factory.c 2010-07-10 18:07:31 UTC (rev
3473)
+++ trunk/librawstudio/rs-profile-factory.c 2010-07-10 19:55:53 UTC (rev
3474)
@@ -153,7 +153,7 @@
rs_profile_factory_new_default(void)
{
static RSProfileFactory *factory = NULL;
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
g_static_mutex_lock(&lock);
if (!factory)
@@ -171,7 +171,7 @@
const gchar *
rs_profile_factory_get_user_profile_directory(void)
{
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
gchar *directory = NULL;
g_static_mutex_lock(&lock);
Modified: trunk/src/gtk-helper.c
===================================================================
--- trunk/src/gtk-helper.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/src/gtk-helper.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -437,7 +437,7 @@
{
static RS_THEME current_theme = STANDARD_GTK_THEME;
static gchar **default_rc_files = NULL;
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
GtkSettings *settings;
g_static_mutex_lock(&lock);
Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/src/gtk-interface.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -149,7 +149,10 @@
photo = rs_photo_load_from_file(filename);
if (photo)
- rs_photo_close(rs->photo);
+ {
+ if (rs->photo)
+ rs_photo_close(rs->photo);
+ }
else
{
gui_set_busy(FALSE);
@@ -743,7 +746,7 @@
GtkUIManager *
gui_get_uimanager()
{
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
static GtkUIManager *ui_manager = NULL;
g_static_mutex_lock(&lock);
Modified: trunk/src/rs-actions.c
===================================================================
--- trunk/src/rs-actions.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/src/rs-actions.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -42,7 +42,7 @@
#include "rs-toolbox.h"
static GtkActionGroup *core_action_group = NULL;
-GStaticMutex rs_actions_spinlock = G_STATIC_MUTEX_INIT;
+static GStaticMutex rs_actions_spinlock = G_STATIC_MUTEX_INIT;
#define ACTION(Action) void rs_action_##Action(GtkAction *action, RS_BLOB
*rs); \
void rs_action_##Action(GtkAction *action, RS_BLOB *rs)
Modified: trunk/src/rs-store.c
===================================================================
--- trunk/src/rs-store.c 2010-07-10 18:07:31 UTC (rev 3473)
+++ trunk/src/rs-store.c 2010-07-10 19:55:53 UTC (rev 3474)
@@ -1195,7 +1195,7 @@
{
RSLibrary *library = rs_library_get_singleton();
static gboolean running = FALSE;
- GStaticMutex lock = G_STATIC_MUTEX_INIT;
+ static GStaticMutex lock = G_STATIC_MUTEX_INIT;
GtkTreeSortable *sortable;
gboolean load_8bit = FALSE;
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit