[gnome-media] grecord: remove libgnome dependency
- From: Marc-Andre Lureau <malureau src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-media] grecord: remove libgnome dependency
- Date: Sat, 2 May 2009 08:40:54 -0400 (EDT)
commit 955567c04d815c6abd2ee0ecec55f64c629716f7
Author: Felix Riemann <friemann svn gnome org>
Date: Fri May 1 20:42:22 2009 +0200
grecord: remove libgnome dependency
(help http://bugzilla.gnome.org/show_bug.cgi?id=567310)
Signed-off-by: Marc-André Lureau <marcandre lureau gmail com>
---
configure.ac | 4 ++--
grecord/src/gnome-recorder.c | 24 ++++++++++++++----------
grecord/src/gsr-window.c | 5 +++--
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/configure.ac b/configure.ac
index e70f46f..90e1209 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,8 +274,8 @@ PKG_CHECK_MODULES(GSR, [
gstreamer-$GST_MAJORMINOR >= $GST_REQ
gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ
gtk+-2.0 >= 2.6.0
- libgnomeui-2.0 >= 1.102.0
- gio-2.0],
+ gio-2.0
+ gconf-2.0],
have_gst=yes,
[
AC_MSG_RESULT(no)
diff --git a/grecord/src/gnome-recorder.c b/grecord/src/gnome-recorder.c
index a30322a..108a50d 100644
--- a/grecord/src/gnome-recorder.c
+++ b/grecord/src/gnome-recorder.c
@@ -27,9 +27,10 @@
#include <config.h>
#endif
-#include <gconf/gconf-client.h>
-#include <gnome.h>
+#include <string.h>
+#include <glib/gi18n.h>
+#include <gconf/gconf-client.h>
#include <gst/gst.h>
#include "gsr-window.h"
@@ -183,7 +184,7 @@ main (int argc,
};
GOptionContext *ctx;
- GnomeProgram *program;
+ GError *error = NULL;
g_thread_init (NULL);
@@ -193,16 +194,19 @@ main (int argc,
textdomain (GETTEXT_PACKAGE);
ctx = g_option_context_new ("gnome-sound-recorder");
+ /* Initializes gtk during option parsing */
+ g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
g_option_context_add_group (ctx, gst_init_get_option_group ());
g_option_context_add_main_entries (ctx, entries, GETTEXT_PACKAGE);
- program = gnome_program_init ("gnome-sound-recorder", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, ctx,
- GNOME_PARAM_HUMAN_READABLE_NAME,
- "GNOME Sound Recorder",
- GNOME_PARAM_APP_DATADIR, DATADIR,
- NULL);
+ if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
+ g_printerr ("Option parsing failed: %s\n", error->message);
+ g_error_free (error);
+ g_option_context_free (ctx);
+ return EXIT_FAILURE;
+ }
+
+ g_option_context_free (ctx);
gtk_window_set_default_icon_name ("gnome-sound-recorder");
/* use it like a singleton */
diff --git a/grecord/src/gsr-window.c b/grecord/src/gsr-window.c
index bd1efeb..b9f182c 100644
--- a/grecord/src/gsr-window.c
+++ b/grecord/src/gsr-window.c
@@ -40,7 +40,6 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
-#include <libgnome/gnome-help.h>
#include <gconf/gconf-client.h>
#include <gst/gst.h>
#include <gst/interfaces/mixer.h>
@@ -1211,7 +1210,9 @@ help_contents_cb (GtkAction *action,
{
GError *error = NULL;
- gnome_help_display ("gnome-sound-recorder.xml", NULL, &error);
+ gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (window)),
+ "ghelp:gnome-sound-recorder",
+ gtk_get_current_event_time (), &error);
if (error != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]