Commit c4a7e269 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels
Browse files

screenshot: add "finished" signal to GfFlashspot

parent 2c344cd3
......@@ -40,6 +40,15 @@ struct _GfFlashspot
guint fade_id;
};
enum
{
SIGNAL_FINISHED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (GfFlashspot, gf_flashspot, G_TYPE_OBJECT)
static gboolean
......@@ -57,6 +66,8 @@ fade (gpointer user_data)
{
gtk_widget_hide (flashspot->window);
g_signal_emit (flashspot, signals[SIGNAL_FINISHED], 0);
flashspot->fade_id = 0;
return G_SOURCE_REMOVE;
}
......@@ -77,6 +88,8 @@ start_fade (gpointer user_data)
{
gtk_widget_hide (flashspot->window);
g_signal_emit (flashspot, signals[SIGNAL_FINISHED], 0);
flashspot->flash_id = 0;
return G_SOURCE_REMOVE;
}
......@@ -127,6 +140,13 @@ gf_flashspot_class_init (GfFlashspotClass *flashspot_class)
object_class = G_OBJECT_CLASS (flashspot_class);
object_class->dispose = gf_flashspot_dispose;
signals[SIGNAL_FINISHED] =
g_signal_new ("finished",
G_OBJECT_CLASS_TYPE (flashspot_class),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
static void
......
Supports Markdown
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