[gtksourceview] UndoManager: simplify use of g_queue_insert_before()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] UndoManager: simplify use of g_queue_insert_before()
- Date: Wed, 26 Nov 2014 10:19:19 +0000 (UTC)
commit da48829adc339a6751be29f102d0c6cdc687e61a
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Nov 10 20:41:20 2014 +0100
UndoManager: simplify use of g_queue_insert_before()
Requires a recent GLib.
README | 2 +-
configure.ac | 2 +-
gtksourceview/gtksourceundomanagerdefault.c | 14 +++-----------
3 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/README b/README
index b85c98d..0e3da5c 100644
--- a/README
+++ b/README
@@ -29,7 +29,7 @@ the GNU Lesser General Public License.
Installation
============
-GtkSourceView requires GLib >= 2.38, GTK+ >= 3.15.0 and libxml2 >= 2.6.
+GtkSourceView requires GLib >= 2.43.1, GTK+ >= 3.15.0 and libxml2 >= 2.6.
Simple install procedure:
diff --git a/configure.ac b/configure.ac
index e54ecd4..1b0a8f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,7 @@ GSV_LT_VERSION="$GSV_LT_CURRENT:$GSV_LT_REVISION:$GSV_LT_AGE"
AC_SUBST(GSV_LT_VERSION)
# Dependencies
-GLIB_REQUIRED_VERSION=2.38
+GLIB_REQUIRED_VERSION=2.43.1
GTK_REQUIRED_VERSION=3.15.0
LIBXML_REQUIRED_VERSION=2.6.0
GLADE_UI_REQUIRED=3.9
diff --git a/gtksourceview/gtksourceundomanagerdefault.c b/gtksourceview/gtksourceundomanagerdefault.c
index 8880311..7e2b238 100644
--- a/gtksourceview/gtksourceundomanagerdefault.c
+++ b/gtksourceview/gtksourceundomanagerdefault.c
@@ -380,17 +380,9 @@ insert_new_action_group (GtkSourceUndoManagerDefault *manager)
{
ActionGroup *group = action_group_new ();
- if (manager->priv->location != NULL)
- {
- g_queue_insert_before (manager->priv->action_groups,
- manager->priv->location,
- group);
- }
- else
- {
- g_queue_push_tail (manager->priv->action_groups,
- group);
- }
+ g_queue_insert_before (manager->priv->action_groups,
+ manager->priv->location,
+ group);
if (manager->priv->has_saved_location &&
manager->priv->saved_location == manager->priv->location)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]