Commit b6c3adca authored by Qball Cow's avatar Qball Cow Committed by Max Kellermann

Add idle event on sticker deletion, update and insertion

parent 3635c93a
...@@ -38,7 +38,7 @@ static const char *const idle_names[] = { ...@@ -38,7 +38,7 @@ static const char *const idle_names[] = {
"mixer", "mixer",
"output", "output",
"options", "options",
"elapsed", "sticker",
NULL NULL
}; };
......
...@@ -46,6 +46,9 @@ enum { ...@@ -46,6 +46,9 @@ enum {
/** options have changed: crossfade, random, repeat, ... */ /** options have changed: crossfade, random, repeat, ... */
IDLE_OPTIONS = 0x40, IDLE_OPTIONS = 0x40,
/** a sticker has been modified. */
IDLE_STICKER = 0x80,
}; };
/** /**
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
*/ */
#include "sticker.h" #include "sticker.h"
#include "idle.h"
#include <glib.h> #include <glib.h>
#include <sqlite3.h> #include <sqlite3.h>
...@@ -239,6 +240,7 @@ sticker_update_value(const char *type, const char *uri, ...@@ -239,6 +240,7 @@ sticker_update_value(const char *type, const char *uri,
sqlite3_reset(sticker_stmt_update); sqlite3_reset(sticker_stmt_update);
sqlite3_clear_bindings(sticker_stmt_update); sqlite3_clear_bindings(sticker_stmt_update);
idle_add(IDLE_STICKER);
return ret > 0; return ret > 0;
} }
...@@ -299,6 +301,8 @@ sticker_insert_value(const char *type, const char *uri, ...@@ -299,6 +301,8 @@ sticker_insert_value(const char *type, const char *uri,
sqlite3_reset(sticker_stmt_insert); sqlite3_reset(sticker_stmt_insert);
sqlite3_clear_bindings(sticker_stmt_insert); sqlite3_clear_bindings(sticker_stmt_insert);
idle_add(IDLE_STICKER);
return true; return true;
} }
...@@ -357,5 +361,6 @@ sticker_delete(const char *type, const char *uri) ...@@ -357,5 +361,6 @@ sticker_delete(const char *type, const char *uri)
sqlite3_reset(sticker_stmt_delete); sqlite3_reset(sticker_stmt_delete);
sqlite3_clear_bindings(sticker_stmt_delete); sqlite3_clear_bindings(sticker_stmt_delete);
idle_add(IDLE_STICKER);
return true; return true;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment