SF.net SVN: geany:[5292] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Oct 7 14:10:33 UTC 2010
Revision: 5292
http://geany.svn.sourceforge.net/geany/?rev=5292&view=rev
Author: ntrel
Date: 2010-10-07 14:10:32 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
Revert X11 workspace socket support as it needs more work; moved
to workspace-sockets branch.
Modified Paths:
--------------
trunk/ChangeLog
trunk/TODO
trunk/configure.ac
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/Makefile.am
trunk/src/socket.c
trunk/src/ui_utils.c
trunk/src/ui_utils.h
trunk/wscript
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/ChangeLog 2010-10-07 14:10:32 UTC (rev 5292)
@@ -1,3 +1,11 @@
+2010-10-07 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/ui_utils.h, src/socket.c, src/Makefile.am, src/ui_utils.c,
+ configure.ac, doc/geany.txt, doc/geany.html, wscript, TODO:
+ Revert X11 workspace socket support as it needs more work; moved
+ to workspace-sockets branch.
+
+
2010-10-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/geanywraplabel.c:
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/TODO 2010-10-07 14:10:32 UTC (rev 5292)
@@ -21,6 +21,8 @@
o (sci macro support - as a plugin?)
o (parsing tags from a memory buffer instead of a file on disk)
o (tango-like icons for the symbol list)
+ o (per-workspace instances with socket support - see
+ workspace-sockets branch)
1.0:
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/configure.ac 2010-10-07 14:10:32 UTC (rev 5292)
@@ -146,13 +146,6 @@
if test $have_gio = 1 ; then
AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
fi
-# X11
-PKG_CHECK_MODULES(X11, ["x11"], have_x11=1, have_x11=0)
-AC_SUBST(X11_CFLAGS)
-AC_SUBST(X11_LIBS)
-if test $have_x11 = 1 ; then
- AC_DEFINE(HAVE_X11, 1, [Whether X11 is available])
-fi
# --disable-deprecated switch for GTK2 purification
AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/doc/geany.html 2010-10-07 14:10:32 UTC (rev 5292)
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
-<meta name="date" content="2010-10-01" />
+<meta name="date" content="2010-10-04" />
<style type="text/css">
/*
@@ -139,7 +139,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2010-10-01</td></tr>
+<td>2010-10-04</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.20</td></tr>
</tbody>
@@ -722,9 +722,9 @@
<h2><a class="toc-backref" href="#id28" id="command-line-options" name="command-line-options">Command line options</a></h2>
<table border="1" class="docutils">
<colgroup>
-<col width="13%" />
-<col width="25%" />
-<col width="62%" />
+<col width="9%" />
+<col width="18%" />
+<col width="72%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Short option</th>
@@ -822,11 +822,11 @@
<tr><td><em>none</em></td>
<td>--socket-file</td>
<td><p class="first">Use this socket filename for communication with a
-running Geany instance. By default Geany uses one
-socket file per workspace for X Windows, otherwise
-only one.</p>
-<p class="last">Example:
-geany --socket-file=/tmp/geany-sock-2</p>
+running Geany instance. This can be used with the following
+command to execute Geany on the current workspace:</p>
+<pre class="last literal-block">
+geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
+</pre>
</td>
</tr>
<tr><td><em>none</em></td>
@@ -6256,7 +6256,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-10-04 11:04 UTC.
+Generated on: 2010-10-07 14:02 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/doc/geany.txt 2010-10-07 14:10:32 UTC (rev 5292)
@@ -365,12 +365,10 @@
available if Geany was compiled with support for VTE.
*none* --socket-file Use this socket filename for communication with a
- running Geany instance. By default Geany uses one
- socket file per workspace for X Windows, otherwise
- only one.
+ running Geany instance. This can be used with the following
+ command to execute Geany on the current workspace::
- Example:
- geany --socket-file=/tmp/geany-sock-2
+ geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
*none* --vte-lib Specify explicitly the path including filename or only
the filename to the VTE library, e.g.
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/src/Makefile.am 2010-10-07 14:10:32 UTC (rev 5292)
@@ -74,7 +74,7 @@
INCLUDES = -I$(top_srcdir) -I$(srcdir)/../scintilla/include -I$(srcdir)/../tagmanager/include \
- @GTK_CFLAGS@ @GIO_CFLAGS@ @X11_CFLAGS@
+ @GTK_CFLAGS@ @GIO_CFLAGS@
# tell automake we have a C++ file so it uses the C++ linker we need for Scintilla
nodist_EXTRA_geany_SOURCES = dummy.cxx
@@ -85,9 +85,8 @@
geany_SOURCES = $(SRCS) win32.c win32.h
-geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a \
- @GTK_LIBS@ @GIO_LIBS@ @X11_LIBS@ $(INTLLIBS) \
- -lole32 -luuid -liberty -lwsock32 geany_private.res
+geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a @GTK_LIBS@ @GIO_LIBS@ \
+ $(INTLLIBS) -lole32 -luuid -liberty -lwsock32 geany_private.res
AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
-DGEANY_DOCDIR=\"\" \
@@ -113,8 +112,7 @@
geany_SOURCES = $(SRCS) vte.c vte.h
-geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a \
- @GTK_LIBS@ @GIO_LIBS@ @X11_LIBS@ $(INTLLIBS)
+geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a @GTK_LIBS@ @GIO_LIBS@ $(INTLLIBS)
AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
-DGEANY_DOCDIR=\""$(docdir)"\" \
Modified: trunk/src/socket.c
===================================================================
--- trunk/src/socket.c 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/src/socket.c 2010-10-07 14:10:32 UTC (rev 5292)
@@ -271,7 +271,6 @@
return -1;
#else
gchar *display_name = gdk_get_display();
- gint workspace = ui_get_current_workspace(display_name);
gchar *hostname = utils_get_hostname();
gchar *p;
@@ -285,8 +284,8 @@
*p = '_';
if (socket_info.file_name == NULL)
- socket_info.file_name = g_strdup_printf("%s%cgeany_socket_%s_%s_ws%d",
- app->configdir, G_DIR_SEPARATOR, hostname, display_name, workspace);
+ socket_info.file_name = g_strdup_printf("%s%cgeany_socket_%s_%s",
+ app->configdir, G_DIR_SEPARATOR, hostname, display_name);
g_free(display_name);
g_free(hostname);
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/src/ui_utils.c 2010-10-07 14:10:32 UTC (rev 5292)
@@ -31,14 +31,6 @@
#include <ctype.h>
#include <gdk/gdkkeysyms.h>
-/* For ui_get_current_workspace() */
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#endif
-
#include "ui_utils.h"
#include "prefs.h"
#include "sciwrappers.h"
@@ -2461,48 +2453,3 @@
g_signal_stop_emission_by_name(editable, "insert-text");
}
-
-/* Get the current visible workspace number for the given display name.
- *
- * If the X11 window property isn't found, 0 (the first workspace)
- * is returned.
- *
- * Has been tested and verified to work under GNOME and KDE. Assuming that
- * most other X11 desktops will work the same. For non-X11 backends it returns
- * a workspace number of 0.
- *
- * This code is a slightly modified version of code that was ripped from Gedit
- * which ripped it from Galeon. */
-gint ui_get_current_workspace(const gchar *display_name)
-{
-#if defined(GDK_WINDOWING_X11) && defined(HAVE_X11)
- GdkScreen *screen = gdk_screen_get_default();
- GdkWindow *root_win = gdk_screen_get_root_window(screen);
- GdkDisplay *display = gdk_display_open(display_name);
- Atom type;
- gint format;
- gulong nitems;
- gulong bytes_after;
- guint *current_desktop;
- gint err, result;
- gint ret = 0;
-
- gdk_error_trap_push();
- result = XGetWindowProperty(GDK_DISPLAY_XDISPLAY(display), GDK_WINDOW_XID(root_win),
- gdk_x11_get_xatom_by_name_for_display(display, "_NET_CURRENT_DESKTOP"),
- 0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems,
- &bytes_after, (gpointer) ¤t_desktop);
- err = gdk_error_trap_pop();
-
- if (err == Success && result == Success)
- {
- if (type == XA_CARDINAL && format == 32 && nitems > 0)
- ret = current_desktop[0];
- XFree(current_desktop);
- }
- gdk_display_close(display);
- return ret;
-#else
- return 0;
-#endif
-}
Modified: trunk/src/ui_utils.h
===================================================================
--- trunk/src/ui_utils.h 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/src/ui_utils.h 2010-10-07 14:10:32 UTC (rev 5292)
@@ -321,6 +321,4 @@
gint ui_get_gtk_settings_integer(const gchar *property_name, gint default_value);
-gint ui_get_current_workspace(const gchar *display_name);
-
#endif
Modified: trunk/wscript
===================================================================
--- trunk/wscript 2010-10-07 13:55:45 UTC (rev 5291)
+++ trunk/wscript 2010-10-07 14:10:32 UTC (rev 5292)
@@ -226,7 +226,6 @@
else:
gtk_version = 'Unknown'
conf.check_cfg(package='gio-2.0', uselib_store='GIO', args='--cflags --libs', mandatory=False)
- conf.check_cfg(package='x11', uselib_store='X11', args='--cflags --libs', mandatory=False)
# Windows specials
if is_win32:
@@ -391,7 +390,7 @@
source = geany_sources,
includes = '. src/ scintilla/include/ tagmanager/include/',
defines = 'G_LOG_DOMAIN="Geany"',
- uselib = 'GTK GIO X11 WIN32 SUNOS_SOCKET',
+ uselib = 'GTK GIO WIN32 SUNOS_SOCKET',
uselib_local = 'scintilla tagmanager',
add_objects = 'geany-rc' if is_win32 else None
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list