[gnome-media] drop libgnomeui dependency for gst-props



commit 58f8cf537421fedd48f3df1397cada83e55de498
Author: Saleem Abdulrasool <compnerd compnerd org>
Date:   Thu Jan 8 21:11:26 2009 -0800

    drop libgnomeui dependency for gst-props
---
 configure.ac                                |    2 +-
 gstreamer-properties/gstreamer-properties.c |   26 ++++++++++++++++----------
 gstreamer-properties/pipeline-constants.c   |    4 +++-
 gstreamer-properties/pipeline-tests.c       |    4 +++-
 4 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 970278f..b8a501f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -559,8 +559,8 @@ AC_ARG_ENABLE([gstprops],
 if test "x$have_gst" = "xyes" && test "x$enable_gstprops" = "xyes";
 then
   PKG_CHECK_MODULES(GSTPROPS, [
+    glib-2.0
     gconf-2.0
-    libgnomeui-2.0
     libglade-2.0 >= 1.99.12
     gstreamer-$GST_MAJORMINOR
     gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_PLUGINS_BASE_REQ
diff --git a/gstreamer-properties/gstreamer-properties.c b/gstreamer-properties/gstreamer-properties.c
index ac49964..fdbc612 100644
--- a/gstreamer-properties/gstreamer-properties.c
+++ b/gstreamer-properties/gstreamer-properties.c
@@ -29,7 +29,9 @@
 
 #include <locale.h>
 #include <string.h>
-#include <gnome.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <glade/glade.h>
 #include <gtk/gtk.h>
 #include <gconf/gconf-client.h>
@@ -599,8 +601,12 @@ create_dialog (void)
   main_window = GTK_DIALOG (WID ("gst_properties_dialog"));
   if (!main_window) {
     /* Fatal error */
-    gnome_app_error (GNOME_APP (gnome_program_get ()),
-        _("Failure instantiating main window"));
+    GtkWidget *dialog;
+    dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
+                                     GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+                                     _("Failure instantiating main window"));
+    gtk_dialog_run (GTK_DIALOG (dialog));
+    gtk_widget_destroy (dialog);
     return;
   }
 
@@ -614,7 +620,7 @@ int
 main (int argc, char **argv)
 {
   GOptionContext *ctx;
-  GnomeProgram *program;
+  GError *error = NULL;
 
   g_thread_init (NULL);
 
@@ -623,12 +629,14 @@ main (int argc, char **argv)
   textdomain (GETTEXT_PACKAGE);
 
   ctx = g_option_context_new ("gstreamer-properties");
+  g_option_context_add_group (ctx, gtk_get_option_group ());
   g_option_context_add_group (ctx, gst_init_get_option_group ());
 
-  program = gnome_program_init ("gstreamer-properties", VERSION,
-      LIBGNOMEUI_MODULE, argc, argv,
-      GNOME_PARAM_GOPTION_CONTEXT, ctx,
-      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);
+     return EXIT_FAILURE;
+  }
 
   /* FIXME: hardcode uninstalled path here */
   if (g_file_test ("gstreamer-properties.glade", G_FILE_TEST_EXISTS) == TRUE) {
@@ -653,7 +661,6 @@ main (int argc, char **argv)
 
     gtk_dialog_run (GTK_DIALOG (dialog));
     gtk_widget_destroy (dialog);
-    g_object_unref (program);
 
     exit (1);
   }
@@ -664,7 +671,6 @@ main (int argc, char **argv)
     gtk_main ();
 
   g_object_unref (gconf_client);
-  g_object_unref (program);
 
   return 0;
 }
diff --git a/gstreamer-properties/pipeline-constants.c b/gstreamer-properties/pipeline-constants.c
index 6ec3b73..f0aaf58 100644
--- a/gstreamer-properties/pipeline-constants.c
+++ b/gstreamer-properties/pipeline-constants.c
@@ -26,8 +26,10 @@
 #endif
 
 #include "gstreamer-properties-structs.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <bonobo/bonobo-i18n.h>
 
 /* Test specified inputs for pipelines */
 /* static const gchar audiosink_test_pipe[] = "afsrc location=\"" TEST_MEDIA_FILE "\""; FIXME*/
diff --git a/gstreamer-properties/pipeline-tests.c b/gstreamer-properties/pipeline-tests.c
index 89fe684..ab0c377 100644
--- a/gstreamer-properties/pipeline-tests.c
+++ b/gstreamer-properties/pipeline-tests.c
@@ -28,7 +28,9 @@
 
 #include <locale.h>
 #include <string.h>
-#include <gnome.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <glade/glade.h>
 #include <gtk/gtk.h>
 #include <gst/gst.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]