[gromit: 12/13] * all files: small reorganisation of the stuff, basically untested autotools stuff, cleanup.
- From: Simon Budig <simon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gromit: 12/13] * all files: small reorganisation of the stuff, basically untested autotools stuff, cleanup.
- Date: Tue, 16 Mar 2010 22:24:28 +0000 (UTC)
commit a0df44c226e83dd0c5c5637ba08bf500f51cfda1
Author: Simon Budig <simon budig de>
Date: Tue Dec 6 20:44:55 2005 +0100
* all files: small reorganisation of the stuff, basically untested
autotools stuff, cleanup.
* import into Gnome CVS.
.cvsignore | 15 ++++++++
ChangeLog | 7 ++++
Makefile | 10 -----
Makefile.am | 18 +++++++++
autogen.sh | 8 ++++
configure.ac | 12 ++++++
erase_cursor.xbm => cursors/erase_cursor.xbm | 0
.../erase_cursor_mask.xbm | 0
paint_cursor.xbm => cursors/paint_cursor.xbm | 0
.../paint_cursor_mask.xbm | 0
gromit.c | 22 +++++++-----
sawfish-config | 38 ++++++++++++++++++++
12 files changed, 111 insertions(+), 19 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..0996740
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,15 @@
+Makefile.in
+Makefile
+aclocal.m4
+autom4te.cache
+configure
+config.cache
+config.h
+config.h.in
+config.log
+config.status
+config.guess
+config.sub
+ltmain.sh
+libtool
+mkinstalldirs
diff --git a/ChangeLog b/ChangeLog
index 7072bc5..b727b1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-06 Simon Budig <simon gimp org>
+
+ * all files: small reorganisation of the stuff, basically untested
+ autotools stuff, cleanup.
+
+ * import into Gnome CVS.
+
2005-04-12 Simon Budig <simon gimp org>
* gromit.c: - Tweaked various messages to give better error reporting
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..b6c0eaa
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,18 @@
+# status bar plugin
+
+bin_PROGRAMS = gromit
+
+gromit_SOURCES = gromit.c
+gromit_CFLAGS = $(GTK_CFLAGS)
+gromit_LDADD = $(GTK_LIBS)
+
+EXTRA_DIST = \
+ AUTHORS \
+ COPYING \
+ README \
+ ChangeLog \
+ autogen.sh \
+ gromit.1 \
+ gromitrc \
+ gromitrc_gsr \
+ sawfish-config
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..3c614c5
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+version=1.9
+set -x
+aclocal-$version
+autoconf
+libtoolize
+automake-$version --add-missing --foreign
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..cddee1e
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,12 @@
+AC_INIT(Makefile.am)
+AM_INIT_AUTOMAKE(gromit, 0.2)
+
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+PKG_CHECK_MODULES(GTK, gtk+-2.0)
+AC_SUBST(GTK_LIBS)
+AC_SUBST(GTK_CFLAGS)
+
+AC_OUTPUT([ Makefile ])
diff --git a/erase_cursor.xbm b/cursors/erase_cursor.xbm
similarity index 100%
rename from erase_cursor.xbm
rename to cursors/erase_cursor.xbm
diff --git a/erase_cursor_mask.xbm b/cursors/erase_cursor_mask.xbm
similarity index 100%
rename from erase_cursor_mask.xbm
rename to cursors/erase_cursor_mask.xbm
diff --git a/paint_cursor.xbm b/cursors/paint_cursor.xbm
similarity index 100%
rename from paint_cursor.xbm
rename to cursors/paint_cursor.xbm
diff --git a/paint_cursor_mask.xbm b/cursors/paint_cursor_mask.xbm
similarity index 100%
rename from paint_cursor_mask.xbm
rename to cursors/paint_cursor_mask.xbm
diff --git a/gromit.c b/gromit.c
index 01d12c7..0fb8119 100644
--- a/gromit.c
+++ b/gromit.c
@@ -29,10 +29,10 @@
#include <math.h>
#include <stdlib.h>
-#include "paint_cursor.xbm"
-#include "paint_cursor_mask.xbm"
-#include "erase_cursor.xbm"
-#include "erase_cursor_mask.xbm"
+#include "cursors/paint_cursor.xbm"
+#include "cursors/paint_cursor_mask.xbm"
+#include "cursors/erase_cursor.xbm"
+#include "cursors/erase_cursor_mask.xbm"
#define GROMIT_MOUSE_EVENTS ( GDK_PROXIMITY_IN_MASK | \
GDK_PROXIMITY_OUT_MASK | \
@@ -927,7 +927,7 @@ event_selection_get (GtkWidget *widget,
gtk_selection_data_set (selection_data,
selection_data->target,
- 8, uri, strlen (uri));
+ 8, (guchar *) uri, strlen (uri));
}
@@ -1358,10 +1358,12 @@ setup_main_app (GromitData *data, gboolean activate)
gdk_colormap_alloc_color (data->cm, data->red, FALSE, TRUE);
/* CURSORS */
- cursor_src = gdk_bitmap_create_from_data (NULL, paint_cursor_bits,
+ cursor_src = gdk_bitmap_create_from_data (NULL,
+ (gchar *) paint_cursor_bits,
paint_cursor_width,
paint_cursor_height);
- cursor_mask = gdk_bitmap_create_from_data (NULL, paint_cursor_mask_bits,
+ cursor_mask = gdk_bitmap_create_from_data (NULL,
+ (gchar *) paint_cursor_mask_bits,
paint_cursor_width,
paint_cursor_height);
data->paint_cursor = gdk_cursor_new_from_pixmap (cursor_src, cursor_mask,
@@ -1371,10 +1373,12 @@ setup_main_app (GromitData *data, gboolean activate)
g_object_unref (cursor_src);
g_object_unref (cursor_mask);
- cursor_src = gdk_bitmap_create_from_data (NULL, erase_cursor_bits,
+ cursor_src = gdk_bitmap_create_from_data (NULL,
+ (gchar *) erase_cursor_bits,
erase_cursor_width,
erase_cursor_height);
- cursor_mask = gdk_bitmap_create_from_data (NULL, erase_cursor_mask_bits,
+ cursor_mask = gdk_bitmap_create_from_data (NULL,
+ (gchar *) erase_cursor_mask_bits,
erase_cursor_width,
erase_cursor_height);
data->erase_cursor = gdk_cursor_new_from_pixmap (cursor_src, cursor_mask,
diff --git a/sawfish-config b/sawfish-config
new file mode 100755
index 0000000..69c5118
--- /dev/null
+++ b/sawfish-config
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+case $0 in
+ /*) LOCATION=`dirname $0` ;;
+ *) LOCATION="$PWD"/`dirname $0` ;;
+esac
+
+sawfish-client -- >/dev/null <<ENDOFSAWFISHCONFIG
+
+(defun gromit-toggle-grab ()
+ (interactive)
+ (ungrab-pointer)
+ (ungrab-keyboard)
+ (sync-server)
+ (system "cd \"$LOCATION\" ; ./gromit --toggle &")
+)
+
+(defun gromit-clear-screen ()
+ (interactive)
+ (ungrab-pointer)
+ (ungrab-keyboard)
+ (sync-server)
+ (system "cd \"$LOCATION\" ; ./gromit --clear &")
+)
+
+(defun gromit-toggle-visibility ()
+ (interactive)
+ (ungrab-pointer)
+ (ungrab-keyboard)
+ (sync-server)
+ (system "cd \"$LOCATION\" ; ./gromit --visibility &")
+)
+
+(bind-keys global-keymap "Pause" 'gromit-toggle-grab)
+(bind-keys global-keymap "C-Pause" 'gromit-toggle-visibility)
+(bind-keys global-keymap "Break" 'gromit-clear-screen)
+
+ENDOFSAWFISHCONFIG
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]