mousetweaks r114 - in trunk: . data src



Author: gerdk
Date: Wed Mar 19 23:42:56 2008
New Revision: 114
URL: http://svn.gnome.org/viewvc/mousetweaks?rev=114&view=rev

Log:
2008-03-20 Gerd Kohlberger <gerdk svn gnome org>

	* configure.ac:
	* src/Makefile.am:
	* data/Makefile.am:
	
	Clean up build system.
	
	* src/mt-main.c: Remove obsolete session support.
	
	* src/dwell-click-applet.c:
	* src/pointer-capture-applet.c:
	* src/mt-ctw.c:
	* src/mt-main.c:
	
	Use new DATADIR.


Removed:
   trunk/src/mt-session.c
   trunk/src/mt-session.h
Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/data/Makefile.am
   trunk/src/Makefile.am
   trunk/src/dwell-click-applet.c
   trunk/src/mt-ctw.c
   trunk/src/mt-main.c
   trunk/src/pointer-capture-applet.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Mar 19 23:42:56 2008
@@ -1,6 +1,9 @@
 AC_PREREQ(2.57)
+AC_INIT([mousetweaks],
+	[2.23.1],
+	[http://bugzilla.gnome.org/enter_bug.cgi?product=mousetweaks], 
+	[mousetweaks])
 
-AC_INIT([mousetweaks], [2.23.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=mousetweaks], [mousetweaks])
 AC_CONFIG_SRCDIR([src])
 AC_CONFIG_HEADER([config.h])
 AC_PREFIX_DEFAULT([/usr])
@@ -13,9 +16,7 @@
 AC_HEADER_STDC
 AC_C_CONST
 
-dnl *************
-dnl          i18n
-dnl *************
+dnl *** i18n ***
 
 AM_GLIB_GNU_GETTEXT
 IT_PROG_INTLTOOL([0.35.0])
@@ -26,22 +27,26 @@
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
 
-localedir=$datadir/locale
-AC_SUBST(localedir)
+dnl *** documentation ***
 
 GNOME_DOC_INIT
 
-dnl *************
-dnl          deps
-dnl *************
-
-PKG_CHECK_MODULES(GCONF, gconf-2.0, have_gconf=true, have_gconf=false)
-if test "x${have_gconf}" = "xfalse"; then
-        AC_MSG_ERROR([No gconf-2.0 package information found])
-fi
+dnl *** dependencies ***
+
+PKG_CHECK_MODULES(DEPENDENCIES,
+	gtk+-2.0 >= 2.10.0
+	libglade-2.0 >= 2.4.0
+	gconf-2.0 >= 2.16.0
+	dbus-glib-1 >= 0.7
+	libpanelapplet-2.0
+	libgnome-2.0
+	cspi-1.0
+	xfixes)
 
-AC_SUBST(GCONF_CFLAGS)
-AC_SUBST(GCONF_LIBS)
+AC_SUBST(DEPENDENCIES_CFLAGS)
+AC_SUBST(DEPENDENCIES_LIBS)
+
+dnl *** gconf ***
 
 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
 if test x"$GCONFTOOL" = xno; then
@@ -50,21 +55,7 @@
 
 AM_GCONF_SOURCE_2
 
-PKG_CHECK_MODULES(GTK, gtk+-2.0, have_gtk=true, have_gtk=false)
-if test "x${have_gtk}" = "xfalse"; then
-        AC_MSG_ERROR([No gtk+-2.0 package information found])
-fi
-
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
-PKG_CHECK_MODULES(GLADE, libglade-2.0, have_glade=true, have_glade=false)
-if test "x${have_glade}" = "xfalse"; then
-	AC_MSG_ERROR([No libglade-2.0 package information found])
-fi
-
-AC_SUBST(GLADE_CFLAGS)
-AC_SUBST(GLADE_LIBS)
+dnl *** arguments ***
 
 AC_ARG_ENABLE(pointer-capture,
   [  --disable-pointer-capture     Disable pointer-capture applet],
@@ -75,73 +66,15 @@
   AC_DEFINE(BUILD_PCA, 1, [Build pointer-capture applet])
 fi
 
-AC_ARG_ENABLE(click-type,
-  [  --disable-click-type          Disable click-type applet],
-  [build_cta=$enableval], [build_cta=yes])
-
-AM_CONDITIONAL(BUILD_CTA, test "x$build_cta" = "xyes")
-if test "$build_cta" = yes; then
-  AC_DEFINE(BUILD_CTA, 1, [Build click-type applet])
+AC_ARG_ENABLE(dwell-click,
+  [  --disable-dwell-click         Disable dwell-click applet],
+  [build_dca=$enableval], [build_dca=yes])
+
+AM_CONDITIONAL(BUILD_DCA, test "x$build_dca" = "xyes")
+if test "$build_dca" = yes; then
+  AC_DEFINE(BUILD_DCA, 1, [Build dwell-click applet])
 fi
 
-PKG_CHECK_MODULES(PANEL, libpanelapplet-2.0, have_panel=true, have_panel=false)
-if test "x${have_panel}" = "xfalse"; then
-	AC_MSG_ERROR([No libpanelapplet-2.0 package information found])
-fi
-
-AC_SUBST(PANEL_CFLAGS)
-AC_SUBST(PANEL_LIBS)
-
-PKG_CHECK_MODULES(CSPI, cspi-1.0, have_spi=true, have_spi=false)
-if test "x${have_spi}" = "xfalse"; then
-	AC_MSG_ERROR([No cspi-1.0 package information found])
-fi
-
-AC_SUBST(CSPI_CFLAGS)
-AC_SUBST(CSPI_LIBS)
-
-PKG_CHECK_MODULES(DBUS, dbus-glib-1, have_dbus=true, have_dbus=false)
-if test "x${have_dbus}" = "xfalse"; then
-	AC_MSG_ERROR([No dbus-glib-1 package information found])
-fi
-
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-PKG_CHECK_MODULES(GNOME, libgnome-2.0, have_gnome=true, have_gnome=false)
-if test "x${have_gnome}" = "xfalse"; then
-	AC_MSG_ERROR([No libgnome-2.0 package information found])
-fi
-
-AC_SUBST(GNOME_CFLAGS)
-AC_SUBST(GNOME_LIBS)
-
-PKG_CHECK_MODULES(GNOMEUI, libgnomeui-2.0, have_gnomeui=true, have_gnomeui=false)
-if test "x${have_gnomeui}" = "xfalse"; then
-	AC_MSG_ERROR([No libgnomeui-2.0 package information found])
-fi
-
-AC_SUBST(GNOMEUI_CFLAGS)
-AC_SUBST(GNOMEUI_LIBS)
-
-PKG_CHECK_MODULES(XFIXES, xfixes, have_xfixes=true, have_xfixes=false)
-if test "x${have_xfixes}" = "xfalse"; then
-	AC_MSG_ERROR([No xfixes package information found])
-fi
-
-AC_SUBST(XFIXES_CFLAGS)
-AC_SUBST(XFIXES_LIBS)
-
-dnl *************
-dnl          dirs
-dnl *************
-
-icondir=$datadir/pixmaps
-AC_SUBST(icondir)
-
-gladedir=$datadir/mousetweaks
-AC_SUBST(gladedir)
-
 AC_OUTPUT([Makefile
 	   src/Makefile
 	   data/Makefile
@@ -152,6 +85,7 @@
 
 echo ""
 echo "Building panel applets:"
+echo "-----------------------"
 echo "  pointer-capture: $build_pca"
-echo "  dwell-click:     $build_cta"
+echo "  dwell-click:     $build_dca"
 echo ""

Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am	(original)
+++ trunk/data/Makefile.am	Wed Mar 19 23:42:56 2008
@@ -5,14 +5,15 @@
 pca_menu    = PointerCapture.xml
 endif
 
-if BUILD_CTA
-cta_glade  = dwell-click-applet.glade
-cta_server = DwellClick_Factory.server.in
-cta_menu   = DwellClick.xml
+if BUILD_DCA
+dca_glade  = dwell-click-applet.glade
+dca_server = DwellClick_Factory.server.in
+dca_menu   = DwellClick.xml
 endif
 
+ INTLTOOL_SERVER_RULE@
 serverdir = $(libdir)/bonobo/servers
-server_in_files = $(pca_server)	$(cta_server)
+server_in_files = $(pca_server)	$(dca_server)
 server_in_in_files = $(server_in_files:.server.in=.server.in.in)
 server_DATA = $(server_in_files:.server.in=.server)
 
@@ -21,25 +22,22 @@
 	sed -e "s|\ bindir\@|$(bindir)|g" < $< > $@
 endif
 
-if BUILD_CTA
-$(cta_server): $(cta_server).in Makefile
+if BUILD_DCA
+$(dca_server): $(dca_server).in Makefile
 	sed -e "s|\ bindir\@|$(bindir)|g" < $< > $@
 endif
 
- INTLTOOL_SERVER_RULE@
-
 xmldir = $(datadir)/mousetweaks
-xml_DATA = ctw.glade $(pca_glade) $(cta_glade)
+xml_DATA = ctw.glade $(pca_glade) $(dca_glade)
 
 uidir = $(datadir)/mousetweaks
-ui_DATA = $(pca_menu) $(cta_menu)
+ui_DATA = $(pca_menu) $(dca_menu)
 
+ INTLTOOL_SCHEMAS_RULE@
 schemasdir = @GCONF_SCHEMA_FILE_DIR@
 schemas_in_files = mousetweaks.schemas.in $(pca_schemas)
 schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
 
- INTLTOOL_SCHEMAS_RULE@
-
 if GCONF_SCHEMAS_INSTALL
 install-data-local:
 	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Wed Mar 19 23:42:56 2008
@@ -1,62 +1,45 @@
-INCLUDES =			\
-	$(GLADE_CFLAGS)		\
-	$(PANEL_CFLAGS)		\
-	$(CSPI_CFLAGS)		\
-	$(DBUS_CFLAGS)		\
-	$(XFIXES_CFLAGS)
-
-AM_CFLAGS =				\
-	-DGLADEDIR=\"$(gladedir)\"	\
-	-DDATADIR=\"$(datadir)\"	\
-	-DLOCALEDIR=\"$(localedir)\"
+INCLUDES =				     \
+	$(DEPENDENCIES_CFLAGS)		     \
+	-DDATADIR=\"$(datadir)/mousetweaks\" \
+	-DPIXMAPDIR=\"$(datadir)/pixmaps\"   \
+	-DLOCALEDIR=\"$(datadir)/locale\"
 
 if BUILD_PCA
 pca_bin = pointer-capture-applet
 endif
 
-if BUILD_CTA 
-cta_bin = dwell-click-applet
+if BUILD_DCA 
+dca_bin = dwell-click-applet
 endif
 
-bin_PROGRAMS = mousetweaks $(pca_bin) $(cta_bin)
-mousetweaks_SOURCES =		\
-	mt-main.c		\
-	mt-main.h		\
-	mt-common.c		\
-	mt-common.h		\
-	mt-session.c		\
-	mt-session.h		\
-	mt-pidfile.c		\
-	mt-pidfile.h		\
-	mt-dbus.c		\
-	mt-dbus.h		\
-	mt-ctw.c		\
-	mt-ctw.h		\
-	mt-timer.c		\
+bin_PROGRAMS = mousetweaks $(pca_bin) $(dca_bin)
+
+mousetweaks_SOURCES =	\
+	mt-main.c	\
+	mt-main.h	\
+	mt-common.c	\
+	mt-common.h	\
+	mt-pidfile.c	\
+	mt-pidfile.h	\
+	mt-dbus.c	\
+	mt-dbus.h	\
+	mt-ctw.c	\
+	mt-ctw.h	\
+	mt-timer.c	\
 	mt-timer.h
 
-mousetweaks_LDFLAGS =		\
-	$(GLADE_LIBS)		\
-	$(CSPI_LIBS)		\
-	$(DBUS_LIBS)		\
-	$(GNOMEUI_LIBS)     	\
-	$(XFIXES_LIBS)
+mousetweaks_LDFLAGS = $(DEPENDENCIES_LIBS)
 
 dwell_click_applet_SOURCES = \
 	dwell-click-applet.c \
 	mt-common.c	     \
 	mt-common.h
 
-dwell_click_applet_LDFLAGS = \
-	$(GLADE_LIBS)	     \
-	$(PANEL_LIBS)	     \
-	$(DBUS_LIBS)
+dwell_click_applet_LDFLAGS = $(DEPENDENCIES_LIBS)
 
 pointer_capture_applet_SOURCES = \
 	pointer-capture-applet.c \
 	mt-common.c		 \
 	mt-common.h
 
-pointer_capture_applet_LDFLAGS = \
-	$(GLADE_LIBS)		 \
-	$(PANEL_LIBS)
+pointer_capture_applet_LDFLAGS = $(DEPENDENCIES_LIBS)

Modified: trunk/src/dwell-click-applet.c
==============================================================================
--- trunk/src/dwell-click-applet.c	(original)
+++ trunk/src/dwell-click-applet.c	Wed Mar 19 23:42:56 2008
@@ -427,7 +427,7 @@
     bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
     textdomain (GETTEXT_PACKAGE);
 
-    dd->xml = glade_xml_new (GLADEDIR "/dwell-click-applet.glade", NULL, NULL);
+    dd->xml = glade_xml_new (DATADIR "/dwell-click-applet.glade", NULL, NULL);
     if (!dd->xml) {
 	fini_dwell_data (dd);
 	return FALSE;
@@ -474,20 +474,20 @@
 		      G_CALLBACK(gconf_value_changed), dd);
 
     dd->click[DWELL_CLICK_TYPE_SINGLE] =
-	gdk_pixbuf_new_from_file (GLADEDIR "/human-single.png", NULL);
+	gdk_pixbuf_new_from_file (DATADIR "/human-single.png", NULL);
     dd->click[DWELL_CLICK_TYPE_DOUBLE] =
-	gdk_pixbuf_new_from_file (GLADEDIR "/human-double.png", NULL);
+	gdk_pixbuf_new_from_file (DATADIR "/human-double.png", NULL);
     dd->click[DWELL_CLICK_TYPE_DRAG] =
-	gdk_pixbuf_new_from_file (GLADEDIR "/human-drag.png", NULL);
+	gdk_pixbuf_new_from_file (DATADIR "/human-drag.png", NULL);
     dd->click[DWELL_CLICK_TYPE_RIGHT] =
-	gdk_pixbuf_new_from_file (GLADEDIR "/human-right.png", NULL);
+	gdk_pixbuf_new_from_file (DATADIR "/human-right.png", NULL);
 
     panel_applet_set_flags (applet,
 			    PANEL_APPLET_EXPAND_MINOR |
 			    PANEL_APPLET_HAS_HANDLE);
     panel_applet_set_background_widget (applet, GTK_WIDGET(applet));
     panel_applet_setup_menu_from_file (applet,
-				       GLADEDIR, "DwellClick.xml",
+				       DATADIR, "DwellClick.xml",
 				       NULL, menu_verb, dd);
 
     g_signal_connect (applet, "change-orient",

Modified: trunk/src/mt-ctw.c
==============================================================================
--- trunk/src/mt-ctw.c	(original)
+++ trunk/src/mt-ctw.c	Wed Mar 19 23:42:56 2008
@@ -162,7 +162,7 @@
     gpointer data;
     gint i;
 
-    xml = glade_xml_new (GLADEDIR "/ctw.glade", NULL, NULL);
+    xml = glade_xml_new (DATADIR "/ctw.glade", NULL, NULL);
     if (!xml)
 	return FALSE;
 

Modified: trunk/src/mt-main.c
==============================================================================
--- trunk/src/mt-main.c	(original)
+++ trunk/src/mt-main.c	Wed Mar 19 23:42:56 2008
@@ -26,13 +26,10 @@
 #include <gdk/gdkx.h>
 #include <X11/extensions/Xfixes.h>
 #include <cspi/spi.h>
-#include <libgnome/gnome-program.h>
-#include <libgnomeui/gnome-ui-init.h>
 
 #include "mt-common.h"
 #include "mt-dbus.h"
 #include "mt-main.h"
-#include "mt-session.h"
 #include "mt-pidfile.h"
 #include "mt-ctw.h"
 #include "mt-timer.h"
@@ -404,7 +401,6 @@
 int
 main (int argc, char **argv)
 {
-    GnomeProgram *program;
     MTClosure *mt;
     int fixes_error_base;
     pid_t pid;
@@ -428,12 +424,18 @@
 	{NULL}
     };
 
+    bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+    textdomain (GETTEXT_PACKAGE);
+
     context = g_option_context_new ("");
     g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
     g_option_context_add_group (context, gtk_get_option_group (FALSE));
     g_option_context_parse (context, &argc, &argv, NULL);
     g_option_context_free (context);
 
+    gtk_init (&argc, &argv);
+
     if (shutdown) {
 	int ret;
 
@@ -465,20 +467,9 @@
 	signal (SIGQUIT, signal_handler);
 	signal (SIGHUP, signal_handler);
 
-	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-	textdomain (GETTEXT_PACKAGE);
-
-	program = gnome_program_init (PACKAGE, VERSION,
-				      LIBGNOMEUI_MODULE,
-				      argc, argv,
-				      GNOME_PARAM_NONE);
-
 	mt = mt_closure_init ();
-	if (!mt) {
-	    g_object_unref (program);
+	if (!mt)
 	    goto FINISH;
-	}
 
 	if (SPI_init ()) {
 	    mt_show_dialog (_("Assistive Technologies not enabled"),
@@ -490,13 +481,9 @@
 	    gconf_client_set_bool (mt->client, OPT_DWELL, FALSE, NULL);
 
 	    mt_closure_free (mt);
-	    g_object_unref (program);
-
 	    goto FINISH;
 	}
 
-	mt_session_init ();
-
 	/* listen for cursor changes */
 	if (XFixesQueryExtension (GDK_DISPLAY(),
 				  &fixes_event_base,
@@ -575,7 +562,6 @@
     AccessibleDeviceListener_unref (button_listener);
     SPI_exit ();
     mt_closure_free (mt);
-    g_object_unref (program);
 
 FINISH:
     mt_pidfile_remove ();

Modified: trunk/src/pointer-capture-applet.c
==============================================================================
--- trunk/src/pointer-capture-applet.c	(original)
+++ trunk/src/pointer-capture-applet.c	Wed Mar 19 23:42:56 2008
@@ -437,7 +437,8 @@
 {
     GtkWidget *w;
 
-    cd->xml = glade_xml_new (GLADEDIR "/pointer-capture-applet.glade", NULL, NULL);
+    cd->xml = glade_xml_new (DATADIR "/pointer-capture-applet.glade",
+			     NULL, NULL);
     if (!cd->xml)
 	return FALSE;
 
@@ -623,7 +624,7 @@
 			    PANEL_APPLET_HAS_HANDLE);
     panel_applet_set_background_widget (applet, GTK_WIDGET(applet));
     panel_applet_setup_menu_from_file (applet,
-				       GLADEDIR, "PointerCapture.xml",
+				       DATADIR, "PointerCapture.xml",
 				       NULL, menu_verb, cd);
 
     g_signal_connect (applet, "change-orient",



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