libgnomekbd r289 - in trunk: . capplet m4 test



Author: svu
Date: Thu Aug 14 19:55:10 2008
New Revision: 289
URL: http://svn.gnome.org/viewvc/libgnomekbd?rev=289&view=rev

Log:
dropped dependency on libgnomeui, b.g.o#534140

Modified:
   trunk/ChangeLog
   trunk/capplet/Makefile.am
   trunk/capplet/gkbd-indicator-plugins-capplet.c
   trunk/configure.in
   trunk/m4/intltool.m4
   trunk/test/gkbd-keyboard-drawing-test.c

Modified: trunk/capplet/Makefile.am
==============================================================================
--- trunk/capplet/Makefile.am	(original)
+++ trunk/capplet/Makefile.am	Thu Aug 14 19:55:10 2008
@@ -11,6 +11,7 @@
 
 gkbd_indicator_plugins_capplet_CFLAGS = \
 	-I$(top_srcdir)	-Wall -Werror				\
+	$(GCONF_CFLAGS)					\
 	$(LIBGLADE_CFLAGS)				\
 	$(LIBGNOME_CFLAGS)				\
 	$(LIBGNOMEUI_CFLAGS)				\

Modified: trunk/capplet/gkbd-indicator-plugins-capplet.c
==============================================================================
--- trunk/capplet/gkbd-indicator-plugins-capplet.c	(original)
+++ trunk/capplet/gkbd-indicator-plugins-capplet.c	Thu Aug 14 19:55:10 2008
@@ -27,8 +27,6 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkx.h>
 #include <glade/glade.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-help.h>
 
 static GkbdKeyboardConfig initialSysKbdConfig;
 static GMainLoop *loop;
@@ -242,11 +240,26 @@
 {
 	if (response == GTK_RESPONSE_HELP) {
 		GError *error = NULL;
-		gnome_help_display_on_screen ("gkbd",
-					      "gkb-indicator-applet-plugins",
-					      gtk_widget_get_screen
-					      (GTK_WIDGET (dialog)),
-					      &error);
+		GdkAppLaunchContext *ctx = gdk_app_launch_context_new ();
+
+		g_app_info_launch_default_for_uri("ghelp:gkbd?gkb-indicator-applet-plugins",
+						  G_APP_LAUNCH_CONTEXT (ctx), &error);
+
+		if (error) {
+			GtkWidget *d = NULL;
+
+			d = gtk_message_dialog_new (GTK_WINDOW (dialog),
+						    GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+						    GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+						    _("Unable to open help file"));
+			gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (d),
+								  "%s", error->message);
+			g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+			gtk_window_present (GTK_WINDOW (d));
+
+			g_error_free (error);
+		}
+
 		return;
 	}
 
@@ -336,9 +349,7 @@
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 	memset (&gipc, 0, sizeof (gipc));
-	gnome_program_init ("gkbd", VERSION,
-			    LIBGNOMEUI_MODULE, argc, argv,
-			    GNOME_PROGRAM_STANDARD_PROPERTIES, NULL);
+        gtk_init_with_args (&argc, &argv, "gkbd", NULL, NULL, NULL);
 	if (!gconf_init (argc, argv, &gconf_error)) {
 		g_warning (_("Failed to init GConf: %s\n"),
 			   gconf_error->message);

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu Aug 14 19:55:10 2008
@@ -14,15 +14,13 @@
 dnl ***************************************************************************
 dnl *** Minimum library versions for libgnomekbd                            ***
 dnl ***************************************************************************
-GLIB_REQUIRED=2.6
+GLIB_REQUIRED=2.16
 DBUS_REQUIRED=0.92
 DBUS_GLIB_REQUIRED=0.34
 GCONF_REQUIRED=2.14.0
-GDK_REQUIRED=2.10.3
-GTK_REQUIRED=2.10.3
+GDK_REQUIRED=2.13
+GTK_REQUIRED=2.13
 LIBGLADE_REQUIRED=2.6.0
-LIBGNOME_REQUIRED=2.16.0
-LIBGNOMEUI_REQUIRED=2.16.0
 LIBXKLAVIER_REQUIRED=3.2
 
 AC_SUBST([DBUS_REQUIRED])
@@ -31,8 +29,6 @@
 AC_SUBST([LIBGLADE_REQUIRED])
 AC_SUBST([GDK_REQUIRED])
 AC_SUBST([GTK_REQUIRED])
-AC_SUBST([LIBGNOME_REQUIRED])
-AC_SUBST([LIBGNOMEUI_REQUIRED])
 AC_SUBST([LIBXKLAVIER_REQUIRED])
 
 dnl ***************************************************************************
@@ -102,16 +98,6 @@
 AC_SUBST(LIBGLADE_CFLAGS)
 AC_SUBST(LIBGLADE_LIBS)
 
-PKG_CHECK_MODULES(LIBGNOME, libgnome-2.0 >= $LIBGNOME_REQUIRED)
-
-AC_SUBST(LIBGNOME_CFLAGS)
-AC_SUBST(LIBGNOME_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
-
-AC_SUBST(LIBGNOMEUI_CFLAGS)
-AC_SUBST(LIBGNOMEUI_LIBS)
-
 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
 
 if test x"$GCONFTOOL" = xno; then

Modified: trunk/m4/intltool.m4
==============================================================================
--- trunk/m4/intltool.m4	(original)
+++ trunk/m4/intltool.m4	Thu Aug 14 19:55:10 2008
@@ -23,7 +23,7 @@
 ## the same distribution terms that you use for the rest of that program.
 
 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 36 IT_PROG_INTLTOOL
+# serial 40 IT_PROG_INTLTOOL
 AC_DEFUN([IT_PROG_INTLTOOL],
 [AC_PREREQ([2.50])dnl
 
@@ -39,14 +39,21 @@
     AC_MSG_CHECKING([for intltool >= $1])
 
     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
-    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
+    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
     ]
     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 fi
 
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
@@ -101,12 +108,7 @@
     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 fi
 
-# Use the tools built into the package, not the ones that are installed.
-AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
-AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
-AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
+AC_PATH_PROG(INTLTOOL_PERL, [perl])
 if test -z "$INTLTOOL_PERL"; then
    AC_MSG_ERROR([perl not found; required for intltool])
 fi
@@ -152,42 +154,6 @@
 
 IT_PO_SUBDIR([po])
 
-dnl The following is very similar to
-dnl
-dnl	AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
-dnl
-dnl with the following slight differences:
-dnl  - the *.in files are in ac_aux_dir,
-dnl  - if the file haven't changed upon reconfigure, it's not touched,
-dnl  - the evaluation of the third parameter enables a hack which computes
-dnl    the actual value of $libdir,
-dnl  - the user sees "executing intltool commands", instead of
-dnl    "creating intltool-extract" and such.
-dnl
-dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
-dnl a reason for it.
-
-AC_CONFIG_COMMANDS([intltool], [
-
-for file in intltool-extract intltool-merge intltool-update; do
-  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
-      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
-      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
-	< ${ac_aux_dir}/${file}.in > ${file}.out
-  if cmp -s ${file} ${file}.out 2>/dev/null; then
-    rm -f ${file}.out
-  else
-    mv -f ${file}.out ${file}
-  fi
-  chmod ugo+x ${file}
-  chmod u+w ${file}
-done
-
-],
-[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
-
 ])
 
 

Modified: trunk/test/gkbd-keyboard-drawing-test.c
==============================================================================
--- trunk/test/gkbd-keyboard-drawing-test.c	(original)
+++ trunk/test/gkbd-keyboard-drawing-test.c	Thu Aug 14 19:55:10 2008
@@ -163,7 +163,7 @@
 	gint monitor;
 	GdkRectangle rect;
 	GOptionContext *context;
-	gint rc;
+
 	GkbdKeyboardDrawingGroupLevel groupLevels[4] =
 	    { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
 	GkbdKeyboardDrawingGroupLevel *pgroupLevels[4] =



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