SF.net SVN: geany:[3504] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Thu Jan 22 20:33:22 UTC 2009


Revision: 3504
          http://geany.svn.sourceforge.net/geany/?rev=3504&view=rev
Author:   eht16
Date:     2009-01-22 20:33:21 +0000 (Thu, 22 Jan 2009)

Log Message:
-----------
Increase minimum required GTK version to 2.8.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/HACKING
    trunk/README
    trunk/configure.in
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/geany.nsi
    trunk/src/geany.h
    trunk/src/notebook.c
    trunk/src/utils.c
    trunk/wscript

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/ChangeLog	2009-01-22 20:33:21 UTC (rev 3504)
@@ -9,6 +9,9 @@
    instance which then brings the window to the front (grab focus). This
    should work better than the previous implementation and should avoid
    the blinking tasklist item.
+ * HACKING, README, wscript, configure.in, doc/geany.html,
+   doc/geany.txt, geany.nsi, src/geany.h, src/notebook.c, src/utils.c:
+   Increase minimum required GTK version to 2.8.
 
 
 2009-01-22  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/HACKING
===================================================================
--- trunk/HACKING	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/HACKING	2009-01-22 20:33:21 UTC (rev 3504)
@@ -91,28 +91,28 @@
 Glade
 -----
 Use the code generation features of Glade instead of editing interface.c
-or support.c. Glade 2.10 is recommended as long as we support GTK+ 2.6,
-because later versions of Glade are not 100% compatible with GTK+ 2.6
-(e.g. they may use functions added in GTK+ 2.8).
+or support.c. Glade 2.12 is recommended as long as we support GTK+ 2.8,
+because later versions of Glade are not 100% compatible with GTK+ 2.8
+(e.g. they may use functions added in GTK+ 2.10).
 
-You can build Glade 2.10 and run the binary in place, without installing
+You can build Glade 2.12 and run the binary in place, without installing
 it - this should work fine even if you have another version of Glade
 installed on the system.
 
 GTK API documentation
 ---------------------
-The official GTK 2.6 API documentation is not available online anymore,
+The official GTK 2.8 API documentation is not available online anymore,
 so we put them on http://www.geany.org/manual/gtk/.
 There is also a tarball with all available files for download and use
 with devhelp.
 
-Using the 2.6 API documentation of the GTK libs (including GLib, GDK and
+Using the 2.8 API documentation of the GTK libs (including GLib, GDK and
 Pango) has the advantages that you don't get confused by any newer API
 additions and you don't have to take care about whether you can use
 them or not.
-This is because Geany depends on GTK 2.6. API symbols from newer
+This is because Geany depends on GTK 2.8. API symbols from newer
 GTK/GLib versions should be avoided to keep the source code building
-against GTK 2.6.
+against GTK 2.8.
 
 Coding
 ------
@@ -120,8 +120,8 @@
   them down into smaller static functions where possible. This makes code
   much easier to read and maintain.
 * Use GLib types and functions - e.g. g_free instead of free.
-* Your code should build against GLib 2.6 and GTK 2.6. At least for the
-  moment, we want to keep the minimum requirement for GTK at 2.6 (of
+* Your code should build against GLib 2.8 and GTK 2.8. At least for the
+  moment, we want to keep the minimum requirement for GTK at 2.8 (of
   course, you can use the GTK_CHECK_VERSION macro to protect code using
   later versions).
 * We currently try to support the old GCC 2.9.x compiler,

Modified: trunk/README
===================================================================
--- trunk/README	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/README	2009-01-22 20:33:21 UTC (rev 3504)
@@ -28,7 +28,7 @@
 
 Requirements
 ------------
-For compiling Geany yourself, you will need the GTK (>= 2.6.0) libraries
+For compiling Geany yourself, you will need the GTK (>= 2.8.0) libraries
 and header files. You will also need its dependency libraries and header
 files, such as Pango, Glib and ATK. All these files are available at
 http://www.gtk.org.

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/configure.in	2009-01-22 20:33:21 UTC (rev 3504)
@@ -128,7 +128,7 @@
 
 
 # GTK checks
-gtk_modules="gtk+-2.0 >= 2.6.0"
+gtk_modules="gtk+-2.0 >= 2.8.0"
 PKG_CHECK_MODULES(GTK, [$gtk_modules])
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/doc/geany.html	2009-01-22 20:33:21 UTC (rev 3504)
@@ -6,7 +6,7 @@
 <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
 <title>Geany</title>
 <meta name="authors" content="Enrico Tröger  Nick Treleaven  Frank Lanitz" />
-<meta name="date" content="2009-01-17" />
+<meta name="date" content="2009-01-22" />
 <style type="text/css">
 
 /*
@@ -139,7 +139,7 @@
 <br />Nick Treleaven
 <br />Frank Lanitz</td></tr>
 <tr><th class="docinfo-name">Date:</th>
-<td>2009-01-17</td></tr>
+<td>2009-01-22</td></tr>
 <tr><th class="docinfo-name">Version:</th>
 <td>0.16</td></tr>
 </tbody>
@@ -457,7 +457,7 @@
 <h1><a class="toc-backref" href="#id14">Installation</a></h1>
 <div class="section" id="requirements">
 <h2><a class="toc-backref" href="#id15">Requirements</a></h2>
-<p>You will need the GTK (>= 2.6.0) libraries and their dependencies
+<p>You will need the GTK (>= 2.8.0) libraries and their dependencies
 (Pango, GLib and ATK). Your distro should provide packages for these,
 usually installed by default. For Windows, you can download an installer
 which bundles these libraries from the website.</p>
@@ -469,7 +469,7 @@
 </div>
 <div class="section" id="source-compilation">
 <h2><a class="toc-backref" href="#id17">Source compilation</a></h2>
-<p>For compiling Geany yourself, you will need the GTK (>= 2.6.0)
+<p>For compiling Geany yourself, you will need the GTK (>= 2.8.0)
 libraries and header files. You will also need the Pango, GLib and
 ATK libraries and header files. All these files are available at
 <a class="reference external" href="http://www.gtk.org">http://www.gtk.org</a>, but very often your distro will provide development
@@ -4669,7 +4669,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference external" href="geany.txt">View document source</a>.
-Generated on: 2009-01-17 18:42 UTC.
+Generated on: 2009-01-22 20:17 UTC.
 Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
 
 </div>

Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/doc/geany.txt	2009-01-22 20:33:21 UTC (rev 3504)
@@ -100,7 +100,7 @@
 Requirements
 ------------
 
-You will need the GTK (>= 2.6.0) libraries and their dependencies
+You will need the GTK (>= 2.8.0) libraries and their dependencies
 (Pango, GLib and ATK). Your distro should provide packages for these,
 usually installed by default. For Windows, you can download an installer
 which bundles these libraries from the website.
@@ -116,7 +116,7 @@
 Source compilation
 ------------------
 
-For compiling Geany yourself, you will need the GTK (>= 2.6.0)
+For compiling Geany yourself, you will need the GTK (>= 2.8.0)
 libraries and header files. You will also need the Pango, GLib and
 ATK libraries and header files. All these files are available at
 http://www.gtk.org, but very often your distro will provide development

Modified: trunk/geany.nsi
===================================================================
--- trunk/geany.nsi	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/geany.nsi	2009-01-22 20:33:21 UTC (rev 3504)
@@ -303,7 +303,7 @@
 !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format."
 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols."
 !ifdef INCLUDE_GTK
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "You need this files to run Geany. If you have already installed a GTK Runtime Environment (2.6 or higher), you can skip it."
+!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "You need this files to run Geany. If you have already installed a GTK Runtime Environment (2.8 or higher), you can skip it."
 !endif
 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'"
 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} "Create shortcuts for Geany on the desktop and in the Quicklaunch Bar"

Modified: trunk/src/geany.h
===================================================================
--- trunk/src/geany.h	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/src/geany.h	2009-01-22 20:33:21 UTC (rev 3504)
@@ -101,12 +101,6 @@
 };
 
 
-/* Useful for some variable argument list functions, e.g. in utils.h */
-#if ! GLIB_CHECK_VERSION(2, 8, 0)
-#define G_GNUC_NULL_TERMINATED
-#endif
-
-
 /* prototype is here so that all files can use it. */
 void geany_debug(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
 

Modified: trunk/src/notebook.c
===================================================================
--- trunk/src/notebook.c	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/src/notebook.c	2009-01-22 20:33:21 UTC (rev 3504)
@@ -58,12 +58,6 @@
 notebook_page_reordered_cb(GtkNotebook *notebook, GtkWidget *child, guint page_num,
 	gpointer user_data);
 
-#if ! GTK_CHECK_VERSION(2, 8, 0)
-static gboolean
-notebook_motion_notify_event_cb(GtkWidget *widget, GdkEventMotion *event,
-	gpointer user_data);
-#endif
-
 static void
 on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context,
                              gint x, gint y, GtkSelectionData *data, guint info,
@@ -248,24 +242,6 @@
 	/* Set up drag movement callback */
 	g_signal_connect(notebook, "drag-motion", G_CALLBACK(notebook_drag_motion_cb), NULL);
 
-	/* There is a bug on GTK 2.6 with drag reordering of notebook tabs.
-	 * Clicking (not dragging) on a notebook tab, then making a selection in the
-	 * Scintilla widget will cause a strange selection bug.
-	 * It seems there is a conflict; the drag cursor is shown,
-	 * and the selection is blocked; however, when releasing the
-	 * mouse button, the selection continues.
-	 * Bug is present with gtk+2.6.8, not gtk+2.8.x - ntrel */
-#if ! GTK_CHECK_VERSION(2, 8, 0)
-	/* handle higher gtk+ runtime than build environment */
-	if (gtk_check_version(2, 8, 0) != NULL) /* null means version ok */
-	{
-		/* workaround GTK+2.6 drag start bug when over sci widget: */
-		gtk_widget_add_events(notebook, GDK_POINTER_MOTION_MASK);
-		g_signal_connect(notebook, "motion-notify-event",
-			G_CALLBACK(notebook_motion_notify_event_cb), NULL);
-	}
-#endif
-
 	/* set up drag motion for moving notebook pages */
 	gtk_drag_dest_set(notebook, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
 		drag_targets, G_N_ELEMENTS(drag_targets), GDK_ACTION_MOVE);
@@ -275,37 +251,6 @@
 }
 
 
-#if ! GTK_CHECK_VERSION(2, 8, 0)
-/* This is used to disable tab DnD when the cursor is over the
- * Scintilla widget, and re-enable tab DnD when over the notebook tabs
- */
-static gboolean
-notebook_motion_notify_event_cb(GtkWidget *widget, GdkEventMotion *event,
-	gpointer user_data)
-{
-	static gboolean drag_enabled = TRUE; /* stores current state */
-	GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(main_widgets.notebook),
-			gtk_notebook_get_current_page(GTK_NOTEBOOK(main_widgets.notebook)));
-
-	if (page == NULL || event->x < 0 || event->y < 0) return FALSE;
-
-	if (event->window == page->window) /* cursor over sci widget */
-	{
-		if (drag_enabled) gtk_drag_source_unset(widget); /* disable */
-		drag_enabled = FALSE;
-	}
-	else /* assume cursor over notebook tab */
-	{
-		if (! drag_enabled)
-			gtk_drag_source_set(widget, GDK_BUTTON1_MASK,
-				drag_targets, G_N_ELEMENTS(drag_targets), GDK_ACTION_MOVE);
-		drag_enabled = TRUE;
-	}
-	return FALSE; /* propagate event */
-}
-#endif
-
-
 static void
 notebook_page_reordered_cb(GtkNotebook *notebook, GtkWidget *child, guint page_num,
 	gpointer user_data)

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/src/utils.c	2009-01-22 20:33:21 UTC (rev 3504)
@@ -1191,83 +1191,7 @@
 }
 
 
-#if ! GLIB_CHECK_VERSION(2, 8, 0)
-/* Taken from GLib SVN, 2007-03-10 */
 /**
- * g_mkdir_with_parents:
- * @pathname: a pathname in the GLib file name encoding
- * @mode: permissions to use for newly created directories
- *
- * Create a directory if it doesn't already exist. Create intermediate
- * parent directories as needed, too.
- *
- * Returns: 0 if the directory already exists, or was successfully
- * created. Returns -1 if an error occurred, with errno set.
- *
- * Since: 2.8
- */
-int
-g_mkdir_with_parents (const gchar *pathname,
-		      int          mode)
-{
-  gchar *fn, *p;
-
-  if (pathname == NULL || *pathname == '\0')
-    {
-      errno = EINVAL;
-      return -1;
-    }
-
-  fn = g_strdup (pathname);
-
-  if (g_path_is_absolute (fn))
-    p = (gchar *) g_path_skip_root (fn);
-  else
-    p = fn;
-
-  do
-    {
-      while (*p && !G_IS_DIR_SEPARATOR (*p))
-	p++;
-
-      if (!*p)
-	p = NULL;
-      else
-	*p = '\0';
-
-      if (!g_file_test (fn, G_FILE_TEST_EXISTS))
-	{
-	  if (g_mkdir (fn, mode) == -1)
-	    {
-	      int errno_save = errno;
-	      g_free (fn);
-	      errno = errno_save;
-	      return -1;
-	    }
-	}
-      else if (!g_file_test (fn, G_FILE_TEST_IS_DIR))
-	{
-	  g_free (fn);
-	  errno = ENOTDIR;
-	  return -1;
-	}
-      if (p)
-	{
-	  *p++ = G_DIR_SEPARATOR;
-	  while (*p && G_IS_DIR_SEPARATOR (*p))
-	    p++;
-	}
-    }
-  while (p);
-
-  g_free (fn);
-
-  return 0;
-}
-#endif
-
-
-/**
  *  Create a directory if it doesn't already exist.
  *  Create intermediate parent directories as needed, too.
  *  The permissions of the created directory are set 0700.

Modified: trunk/wscript
===================================================================
--- trunk/wscript	2009-01-22 20:32:04 UTC (rev 3503)
+++ trunk/wscript	2009-01-22 20:33:21 UTC (rev 3504)
@@ -173,7 +173,7 @@
 	# checked with cc not cxx
 	conf.check_tool('compiler_cxx intltool misc')
 
-	conf.check_cfg(package='gtk+-2.0', atleast_version='2.6.0', uselib_store='GTK',
+	conf.check_cfg(package='gtk+-2.0', atleast_version='2.8.0', uselib_store='GTK',
 		mandatory=True, args='--cflags --libs')
 
 	# GTK version check


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