[nautilus] undo-manager: remove dead code



commit cf152f9ec75714af2b14be2750f9ea84daab361a
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Aug 21 10:18:38 2010 +0200

    undo-manager: remove dead code

 libnautilus-private/nautilus-undo-manager.c |  100 ---------------------------
 libnautilus-private/nautilus-undo-manager.h |   10 ---
 2 files changed, 0 insertions(+), 110 deletions(-)
---
diff --git a/libnautilus-private/nautilus-undo-manager.c b/libnautilus-private/nautilus-undo-manager.c
index ec773d9..04b6d51 100644
--- a/libnautilus-private/nautilus-undo-manager.c
+++ b/libnautilus-private/nautilus-undo-manager.c
@@ -52,9 +52,6 @@ enum {
 static guint signals[LAST_SIGNAL];
 
 typedef struct {
-#ifdef UIH
-	BonoboUIHandler *handler;
-#endif /* UIH */
 	char *path;
 	char *no_undo_menu_item_label;
 	char *no_undo_menu_item_hint;
@@ -192,103 +189,6 @@ nautilus_undo_manager_attach (NautilusUndoManager *manager, GObject *target)
 	nautilus_undo_attach_undo_manager (G_OBJECT (target), manager);
 }
 
-#ifdef UIH
-static void
-update_undo_menu_item (NautilusUndoManager *manager,
-		       UndoMenuHandlerConnection *connection)
-{
-	CORBA_Environment ev;
-	Nautilus_Undo_MenuItem *menu_item;
-
-	g_assert (NAUTILUS_IS_UNDO_MANAGER (manager));
-	g_assert (connection != NULL);
-	g_assert (BONOBO_IS_UI_HANDLER (connection->handler));
-	g_assert (connection->path != NULL);
-	g_assert (connection->no_undo_menu_item_label != NULL);
-	g_assert (connection->no_undo_menu_item_hint != NULL);
-	
-	CORBA_exception_init (&ev);
-
-	if (CORBA_Object_is_nil (manager->details->transaction, &ev)) {
-		menu_item = NULL;
-	} else {
-		if (manager->details->current_transaction_is_redo) {
-			menu_item = Nautilus_Undo_Transaction__get_redo_menu_item
-				(manager->details->transaction, &ev);
-		} else {
-			menu_item = Nautilus_Undo_Transaction__get_undo_menu_item
-				(manager->details->transaction, &ev);
-		}
-	}
-
-	bonobo_ui_handler_menu_set_sensitivity
-		(connection->handler, connection->path,
-		 menu_item != NULL);
-	bonobo_ui_handler_menu_set_label
-		(connection->handler, connection->path,
-		 menu_item == NULL
-		 ? connection->no_undo_menu_item_label
-		 : menu_item->label);
-	bonobo_ui_handler_menu_set_hint
-		(connection->handler, connection->path,
-		 menu_item == NULL
-		 ? connection->no_undo_menu_item_hint
-		 : menu_item->hint);
-	
-	CORBA_free (menu_item);
-	
-	CORBA_exception_free (&ev);
-}
-
-static void
-undo_menu_handler_connection_free (UndoMenuHandlerConnection *connection)
-{
-	g_assert (connection != NULL);
-	g_assert (BONOBO_IS_UI_HANDLER (connection->handler));
-	g_assert (connection->path != NULL);
-	g_assert (connection->no_undo_menu_item_label != NULL);
-	g_assert (connection->no_undo_menu_item_hint != NULL);
-
-	g_free (connection->path);
-	g_free (connection->no_undo_menu_item_label);
-	g_free (connection->no_undo_menu_item_hint);
-	g_free (connection);
-}
-
-static void
-undo_menu_handler_connection_free_cover (gpointer data)
-{
-	undo_menu_handler_connection_free (data);
-}
-
-void
-nautilus_undo_manager_set_up_bonobo_ui_handler_undo_item (NautilusUndoManager *manager,
-							  BonoboUIHandler *handler,
-							  const char *path,
-							  const char *no_undo_menu_item_label,
-							  const char *no_undo_menu_item_hint)
-{
-	UndoMenuHandlerConnection *connection;
-
-	connection = g_new (UndoMenuHandlerConnection, 1);
-	connection->handler = handler;
-	connection->path = g_strdup (path);
-	connection->no_undo_menu_item_label = g_strdup (no_undo_menu_item_label);
-	connection->no_undo_menu_item_hint = g_strdup (no_undo_menu_item_hint);
-
-	/* Set initial state of menu item. */
-	update_undo_menu_item (manager, connection);
-
-	/* Update it again whenever the changed signal is emitted. */
-	eel_gtk_signal_connect_full_while_alive
-		(GTK_OBJECT (manager), "changed",
-		 G_CALLBACK (update_undo_menu_item), NULL,
-		 connection, undo_menu_handler_connection_free_cover,
-		 FALSE, FALSE,
-		 GTK_OBJECT (handler));
-}
-#endif /* UIH */
-
 static void
 nautilus_undo_manager_class_init (NautilusUndoManagerClass *class)
 {
diff --git a/libnautilus-private/nautilus-undo-manager.h b/libnautilus-private/nautilus-undo-manager.h
index 5ae0efa..9307ce5 100644
--- a/libnautilus-private/nautilus-undo-manager.h
+++ b/libnautilus-private/nautilus-undo-manager.h
@@ -58,16 +58,6 @@ NautilusUndoManager *nautilus_undo_manager_new                                (v
 /* Undo operations. */
 void                 nautilus_undo_manager_undo                               (NautilusUndoManager *undo_manager);
 
-#ifdef UIH
-/* Connect the manager to a particular menu item. */
-void                 nautilus_undo_manager_set_up_bonobo_ui_handler_undo_item (NautilusUndoManager *manager,
-									       BonoboUIHandler     *handler,
-									       const char          *path,
-									       const char          *no_undo_menu_item_label,
-									       const char          *no_undo_menu_item_hint);
-
-#endif
-
 /* Attach the undo manager to a Gtk object so that object and the widgets inside it can participate in undo. */
 void                 nautilus_undo_manager_attach                             (NautilusUndoManager *manager,
 									       GObject             *object);



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