/pidgin/main: 12c9311ce6f0: Remove gtksourceundomanager.

Mark Doliner mark at kingant.net
Sun Feb 9 11:28:06 EST 2014


Changeset: 12c9311ce6f0317a3a6f340a12a056b43828cabd
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2014-02-09 08:28 -0800
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/12c9311ce6f0

Description:

Remove gtksourceundomanager.

Was only used by gtkimhtml, which is no more.

4 files changed, 1287 deletions(-)

diffstat:

 pidgin/Makefile.am            |     2 -
 pidgin/Makefile.mingw         |     1 -
 pidgin/gtksourceundomanager.c |  1197 -----------------------------------------
 pidgin/gtksourceundomanager.h |    87 --
 4 files changed, 0 insertions(+), 1287 deletions(-)

diffs (truncated from 1324 to 300 lines):

diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
--- a/pidgin/Makefile.am
+++ b/pidgin/Makefile.am
@@ -77,7 +77,6 @@ pidgin_SOURCES = \
 	gtksession.c \
 	gtksmiley.c \
 	gtksound.c \
-	gtksourceundomanager.c \
 	gtksourceview-marshal.c \
 	gtkstatus-icon-theme.c \
 	gtkstatusbox.c \
@@ -128,7 +127,6 @@ pidgin_headers = \
 	gtksession.h \
 	gtksmiley.h \
 	gtksound.h \
-	gtksourceundomanager.h \
 	gtksourceview-marshal.h \
 	gtkstatus-icon-theme.h \
 	gtkstatusbox.h \
diff --git a/pidgin/Makefile.mingw b/pidgin/Makefile.mingw
--- a/pidgin/Makefile.mingw
+++ b/pidgin/Makefile.mingw
@@ -92,7 +92,6 @@ PIDGIN_C_SRC =	\
 			gtkscrollbook.c \
 			gtksmiley.c \
 			gtksound.c \
-			gtksourceundomanager.c \
 			gtkstatus-icon-theme.c \
 			gtkstatusbox.c \
 			gtkthemes.c \
diff --git a/pidgin/gtksourceundomanager.c b/pidgin/gtksourceundomanager.c
deleted file mode 100644
--- a/pidgin/gtksourceundomanager.c
+++ /dev/null
@@ -1,1197 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gtksourceundomanager.c
- * This file is part of GtkSourceView
- *
- * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
- * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi
- * Copyright (C) 2002-2005  Paolo Maggi
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02111-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "gtksourceundomanager.h"
-#include "gtksourceview-marshal.h"
-
-
-#define DEFAULT_MAX_UNDO_LEVELS		25
-
-
-typedef struct _GtkSourceUndoAction  			GtkSourceUndoAction;
-typedef struct _GtkSourceUndoInsertAction		GtkSourceUndoInsertAction;
-typedef struct _GtkSourceUndoDeleteAction		GtkSourceUndoDeleteAction;
-typedef struct _GtkSourceUndoInsertAnchorAction GtkSourceUndoInsertAnchorAction;
-
-typedef enum {
-	GTK_SOURCE_UNDO_ACTION_INSERT,
-	GTK_SOURCE_UNDO_ACTION_DELETE,
-	GTK_SOURCE_UNDO_ACTION_INSERT_ANCHOR,
-} GtkSourceUndoActionType;
-
-/*
- * We use offsets instead of GtkTextIters because the last ones
- * require to much memory in this context without giving us any advantage.
- */
-
-struct _GtkSourceUndoInsertAction
-{
-	gint   pos;
-	gchar *text;
-	gint   length;
-	gint   chars;
-};
-
-struct _GtkSourceUndoDeleteAction
-{
-	gint   start;
-	gint   end;
-	gchar *text;
-	gboolean forward;
-};
-
-struct _GtkSourceUndoInsertAnchorAction
-{
-	gint pos;
-	GtkTextChildAnchor *anchor;
-};
-
-struct _GtkSourceUndoAction
-{
-	GtkSourceUndoActionType action_type;
-
-	union {
-		GtkSourceUndoInsertAction  insert;
-		GtkSourceUndoDeleteAction  delete;
-		GtkSourceUndoInsertAnchorAction insert_anchor;
-	} action;
-
-	gint order_in_group;
-
-	/* It is TRUE whether the action can be merged with the following action. */
-	guint mergeable : 1;
-
-	/* It is TRUE whether the action is marked as "modified".
-	 * An action is marked as "modified" if it changed the
-	 * state of the buffer from "not modified" to "modified". Only the first
-	 * action of a group can be marked as modified.
-	 * There can be a single action marked as "modified" in the actions list.
-	 */
-	guint modified  : 1;
-};
-
-struct _GtkSourceUndoManagerPrivate
-{
-	GtkTextBuffer	*document;
-
-	GList*		 actions;
-	gint 		 next_redo;
-
-	gint 		 actions_in_current_group;
-
-	gint		 running_not_undoable_actions;
-
-	gint		 num_of_groups;
-
-	gint		 max_undo_levels;
-
-	guint	 	 can_undo : 1;
-	guint		 can_redo : 1;
-
-	/* It is TRUE whether, while undoing an action of the current group (with order_in_group > 1),
-	 * the state of the buffer changed from "not modified" to "modified".
-	 */
-	guint	 	 modified_undoing_group : 1;
-
-	/* Pointer to the action (in the action list) marked as "modified".
-	 * It is NULL when no action is marked as "modified". */
-	GtkSourceUndoAction *modified_action;
-};
-
-enum {
-	CAN_UNDO,
-	CAN_REDO,
-	LAST_SIGNAL
-};
-
-static void gtk_source_undo_manager_class_init 			(GtkSourceUndoManagerClass 	*klass);
-static void gtk_source_undo_manager_init 			(GtkSourceUndoManager 		*um);
-static void gtk_source_undo_manager_finalize 			(GObject 			*object);
-
-static void gtk_source_undo_manager_insert_text_handler 	(GtkTextBuffer 			*buffer,
-							 	 GtkTextIter 			*pos,
-		                             		 	 const 	gchar 			*text,
-							 	 gint 				 length,
-							 	 GtkSourceUndoManager 		*um);
-static void gtk_source_undo_manager_insert_anchor_handler (GtkTextBuffer *buffer,
-			                   GtkTextIter            *pos,
-			                   GtkTextChildAnchor     *anchor,
-			                   GtkSourceUndoManager   *um);
-static void gtk_source_undo_manager_delete_range_handler 	(GtkTextBuffer 			*buffer,
-							 	 GtkTextIter 			*start,
-                        		      		 	 GtkTextIter 			*end,
-							 	 GtkSourceUndoManager 		*um);
-static void gtk_source_undo_manager_begin_user_action_handler 	(GtkTextBuffer 			*buffer,
-								 GtkSourceUndoManager 		*um);
-static void gtk_source_undo_manager_modified_changed_handler	(GtkTextBuffer                  *buffer,
-								 GtkSourceUndoManager           *um);
-
-static void gtk_source_undo_manager_free_action_list 		(GtkSourceUndoManager 		*um);
-
-static void gtk_source_undo_manager_add_action 			(GtkSourceUndoManager 		*um,
-		                                         	 const GtkSourceUndoAction 	*undo_action);
-static void gtk_source_undo_manager_free_first_n_actions 	(GtkSourceUndoManager 		*um,
-								 gint 				 n);
-static void gtk_source_undo_manager_check_list_size 		(GtkSourceUndoManager 		*um);
-
-static gboolean gtk_source_undo_manager_merge_action 		(GtkSourceUndoManager 		*um,
-		                                        	 const GtkSourceUndoAction 	*undo_action);
-
-static GObjectClass 	*parent_class 				= NULL;
-static guint 		undo_manager_signals [LAST_SIGNAL] 	= { 0 };
-
-GType
-gtk_source_undo_manager_get_type (void)
-{
-	static GType undo_manager_type = 0;
-
-  	if (undo_manager_type == 0)
-    	{
-      		static const GTypeInfo our_info =
-      		{
-        		sizeof (GtkSourceUndoManagerClass),
-        		NULL,		/* base_init */
-        		NULL,		/* base_finalize */
-        		(GClassInitFunc) gtk_source_undo_manager_class_init,
-        		NULL,           /* class_finalize */
-        		NULL,           /* class_data */
-        		sizeof (GtkSourceUndoManager),
-        		0,              /* n_preallocs */
-        		(GInstanceInitFunc) gtk_source_undo_manager_init,
-        		NULL		/* value_table */
-      		};
-
-      		undo_manager_type = g_type_register_static (G_TYPE_OBJECT,
-                					    "GtkSourceUndoManager",
-							    &our_info,
-							    0);
-    	}
-
-	return undo_manager_type;
-}
-
-static void
-gtk_source_undo_manager_class_init (GtkSourceUndoManagerClass *klass)
-{
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  	parent_class = g_type_class_peek_parent (klass);
-
-  	object_class->finalize = gtk_source_undo_manager_finalize;
-
-        klass->can_undo 	= NULL;
-	klass->can_redo 	= NULL;
-
-	undo_manager_signals[CAN_UNDO] =
-   		g_signal_new ("can_undo",
-			      G_OBJECT_CLASS_TYPE (object_class),
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (GtkSourceUndoManagerClass, can_undo),
-			      NULL, NULL,
-			      gtksourceview_marshal_VOID__BOOLEAN,
-			      G_TYPE_NONE,
-			      1,
-			      G_TYPE_BOOLEAN);
-
-	undo_manager_signals[CAN_REDO] =
-   		g_signal_new ("can_redo",
-			      G_OBJECT_CLASS_TYPE (object_class),
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (GtkSourceUndoManagerClass, can_redo),
-			      NULL, NULL,
-			      gtksourceview_marshal_VOID__BOOLEAN,
-			      G_TYPE_NONE,
-			      1,
-			      G_TYPE_BOOLEAN);
-}
-
-static void
-gtk_source_undo_manager_init (GtkSourceUndoManager *um)
-{
-	um->priv = g_new0 (GtkSourceUndoManagerPrivate, 1);
-
-	um->priv->actions = NULL;
-	um->priv->next_redo = 0;
-
-	um->priv->can_undo = FALSE;
-	um->priv->can_redo = FALSE;
-
-	um->priv->running_not_undoable_actions = 0;
-
-	um->priv->num_of_groups = 0;
-
-	um->priv->max_undo_levels = DEFAULT_MAX_UNDO_LEVELS;
-
-	um->priv->modified_action = NULL;
-
-	um->priv->modified_undoing_group = FALSE;
-}
-
-static void
-gtk_source_undo_manager_finalize (GObject *object)
-{
-	GtkSourceUndoManager *um;
-
-	g_return_if_fail (object != NULL);



More information about the Commits mailing list