[nautilus/gtk3-happyness: 8/20] undo-signal-handlers: remove commented out obsolete code



commit c7281d8c1a60f6a74ee3cb20457e50486a5acb67
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Sep 29 12:55:54 2010 +0200

    undo-signal-handlers: remove commented out obsolete code

 .../nautilus-undo-signal-handlers.c                |   60 --------------------
 .../nautilus-undo-signal-handlers.h                |    2 -
 2 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/libnautilus-private/nautilus-undo-signal-handlers.c b/libnautilus-private/nautilus-undo-signal-handlers.c
index b2c52c0..7eab1e4 100644
--- a/libnautilus-private/nautilus-undo-signal-handlers.c
+++ b/libnautilus-private/nautilus-undo-signal-handlers.c
@@ -268,63 +268,3 @@ restore_editable_from_undo_snapshot_callback (GObject *target, gpointer callback
 	/* Reset the registered flag so we get a new item for future editing. */
 	data->undo_registered = FALSE;
 }
-
-
-/* editable_set_undo_key
- *
- * Allow the use of ctrl-z from within widget.
- */
-
-/* Undo is disabled until we have a better implementation.
- * Both here and in nautilus-shell-ui.xml.
- */
-
-/* FIXME bugzilla.gnome.org 43515: Undo doesn't work */
-#ifdef UNDO_ENABLED
-
-static gboolean
-editable_key_press_event (GtkEditable *editable, GdkEventKey *event, gpointer user_data)
-{	
-	switch (event->keyval) {
-	/* Undo */
-	case 'z':
-		if ((event->state & GDK_CONTROL_MASK) != 0) {
-			nautilus_undo (GTK_OBJECT (editable));
-			return TRUE;
-		}
-		break;
-		
-	default:
-		break;
-	}
-
-	return FALSE;
-}
-
-#endif
-
-/* editable_set_undo_key
- *
- * Allow the use of ctrl-z from within widget.  This should only be 
- * set if there is no menu bar to use to undo the widget.
- */
- 
-void 
-nautilus_undo_editable_set_undo_key (GtkEditable *editable, gboolean value)
-{
-/* FIXME bugzilla.gnome.org 43515: Undo doesn't work */
-#ifdef UNDO_ENABLED
-	if (value) {
-		/* Connect to entry signals */
-		g_signal_connect (editable, "key_press_event",
-				  G_CALLBACK (editable_key_press_event), NULL);
-	} else {
-		/* FIXME bugzilla.gnome.org 45092: Warns if the handler
-		 * is not already connected. We could use object data
-		 * to prevent that little problem.
-		 */
-		g_signal_disconnect_by_func (editable, 
-					     G_CALLBACK (editable_key_press_event), NULL);
-	}
-#endif
-}
diff --git a/libnautilus-private/nautilus-undo-signal-handlers.h b/libnautilus-private/nautilus-undo-signal-handlers.h
index 06ef67e..afd1b6e 100644
--- a/libnautilus-private/nautilus-undo-signal-handlers.h
+++ b/libnautilus-private/nautilus-undo-signal-handlers.h
@@ -31,7 +31,5 @@ void nautilus_undo_set_up_nautilus_entry_for_undo 	(NautilusEntry	*entry);
 void nautilus_undo_tear_down_nautilus_entry_for_undo 	(NautilusEntry	*entry);
 void nautilus_undo_set_up_editable_for_undo 		(GtkEditable 	*editable);
 void nautilus_undo_tear_down_editable_for_undo 		(GtkEditable 	*editable);
-void nautilus_undo_editable_set_undo_key 		(GtkEditable 	*editable, 
-							 gboolean 	value);
 
 #endif /* NAUTILUS_UNDO_SIGNAL_HANDLERS_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]