[gnome-screenshot] screenshot: make play_sound_effect public
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screenshot] screenshot: make play_sound_effect public
- Date: Thu, 26 Jan 2012 04:32:33 +0000 (UTC)
commit 6c78f12649242f2d433788b2b7ffa3f7159bd50c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jan 25 21:00:24 2012 -0500
screenshot: make play_sound_effect public
src/screenshot-utils.c | 11 ++++++-----
src/screenshot-utils.h | 2 ++
2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/screenshot-utils.c b/src/screenshot-utils.c
index 37338a7..3995062 100644
--- a/src/screenshot-utils.c
+++ b/src/screenshot-utils.c
@@ -272,8 +272,9 @@ screenshot_fallback_get_window_rect_coords (GdkWindow *window,
}
}
-static void
-screenshot_play_sound_effect (void)
+void
+screenshot_play_sound_effect (const gchar *event_id,
+ const gchar *event_desc)
{
ca_context *c;
ca_proplist *p = NULL;
@@ -285,11 +286,11 @@ screenshot_play_sound_effect (void)
if (res < 0)
goto done;
- res = ca_proplist_sets (p, CA_PROP_EVENT_ID, "screen-capture");
+ res = ca_proplist_sets (p, CA_PROP_EVENT_ID, event_id);
if (res < 0)
goto done;
- res = ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, _("Screenshot taken"));
+ res = ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, event_desc);
if (res < 0)
goto done;
@@ -652,7 +653,7 @@ screenshot_get_pixbuf (GdkRectangle *rectangle)
}
if (screenshot != NULL)
- screenshot_play_sound_effect ();
+ screenshot_play_sound_effect ("screen-capture", _("Screenshot taken"));
g_free (path);
g_free (tmpname);
diff --git a/src/screenshot-utils.h b/src/screenshot-utils.h
index 904a6fd..e614611 100644
--- a/src/screenshot-utils.h
+++ b/src/screenshot-utils.h
@@ -33,6 +33,8 @@ void screenshot_show_error_dialog (GtkWindow *parent,
void screenshot_show_gerror_dialog (GtkWindow *parent,
const gchar *message,
GError *error);
+void screenshot_play_sound_effect (const gchar *event_id,
+ const gchar *event_desc);
void screenshot_display_help (GtkWindow *parent);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]