summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/caja-application.c6
-rw-r--r--src/caja-application.h2
-rw-r--r--src/caja-bookmarks-window.c33
-rw-r--r--src/caja-bookmarks-window.h7
-rw-r--r--src/caja-navigation-window-menus.c1
-rw-r--r--src/caja-navigation-window.c1
-rw-r--r--src/caja-spatial-window.c1
-rw-r--r--src/caja-window-bookmarks.c9
-rw-r--r--src/caja-window-menus.c17
-rw-r--r--src/caja-window.c2
-rw-r--r--src/caja-window.h1
-rw-r--r--src/file-manager/fm-properties-window.c23
12 files changed, 19 insertions, 84 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index 3c1c3f07..5881facd 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -69,7 +69,6 @@
#include <libcaja-private/caja-file-utilities.h>
#include <libcaja-private/caja-global-preferences.h>
#include <libcaja-private/caja-module.h>
-#include <libcaja-private/caja-undo-manager.h>
#include <libcaja-private/caja-desktop-link-monitor.h>
#include <libcaja-private/caja-directory-private.h>
#include <libcaja-private/caja-signaller.h>
@@ -291,9 +290,6 @@ smclient_quit_cb (EggSMClient *client,
static void
caja_application_init (CajaApplication *application)
{
- /* Create an undo manager */
- application->undo_manager = caja_undo_manager_new ();
-
application->unique_app = unique_app_new_with_commands ("org.mate.Caja", NULL,
"start_desktop", COMMAND_START_DESKTOP,
"stop_desktop", COMMAND_STOP_DESKTOP,
@@ -350,8 +346,6 @@ caja_application_finalize (GObject *object)
caja_bookmarks_exiting ();
- g_object_unref (application->undo_manager);
-
if (application->volume_monitor)
{
g_object_unref (application->volume_monitor);
diff --git a/src/caja-application.h b/src/caja-application.h
index c07cfe0e..5c5b94d0 100644
--- a/src/caja-application.h
+++ b/src/caja-application.h
@@ -31,7 +31,6 @@
#include <gio/gio.h>
#include <unique/unique.h>
#include <libegg/eggsmclient.h>
-#include <libcaja-private/caja-undo-manager.h>
#define CAJA_DESKTOP_ICON_VIEW_IID "OAFIID:Caja_File_Manager_Desktop_Icon_View"
@@ -65,7 +64,6 @@ typedef struct
GObject parent;
UniqueApp* unique_app;
EggSMClient* smclient;
- CajaUndoManager* undo_manager;
GVolumeMonitor* volume_monitor;
unsigned int automount_idle_id;
GDBusProxy* proxy;
diff --git a/src/caja-bookmarks-window.c b/src/caja-bookmarks-window.c
index 1a6659c6..49f66850 100644
--- a/src/caja-bookmarks-window.c
+++ b/src/caja-bookmarks-window.c
@@ -30,11 +30,9 @@
#include "caja-window.h"
#include "caja-navigation-window.h"
#include "caja-spatial-window.h"
-#include <libcaja-private/caja-undo.h>
#include <libcaja-private/caja-global-preferences.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-mate-extensions.h>
-#include <libcaja-private/caja-undo-signal-handlers.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
@@ -252,7 +250,7 @@ edit_bookmarks_dialog_reset_signals (gpointer data,
* Return value: A pointer to the new window.
**/
GtkWindow *
-create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
+create_bookmarks_window (CajaBookmarkList *list, CajaWindow *window_source)
{
GtkWidget *window;
GtkTreeViewColumn *col;
@@ -274,9 +272,9 @@ create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
remove_button = (GtkWidget *)gtk_builder_get_object (builder, "bookmark_delete_button");
jump_button = (GtkWidget *)gtk_builder_get_object (builder, "bookmark_jump_button");
- application = CAJA_WINDOW (undo_manager_source)->application;
+ application = window_source->application;
- if (CAJA_IS_NAVIGATION_WINDOW (undo_manager_source))
+ if (CAJA_IS_NAVIGATION_WINDOW (window_source))
{
parent_is_browser_window = TRUE;
}
@@ -286,13 +284,12 @@ create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
}
set_up_close_accelerator (window);
- caja_undo_share_undo_manager (G_OBJECT (window), undo_manager_source);
gtk_window_set_wmclass (GTK_WINDOW (window), "bookmarks", "Caja");
caja_bookmarks_window_restore_geometry (window);
- g_object_weak_ref (G_OBJECT (undo_manager_source), edit_bookmarks_dialog_reset_signals,
- undo_manager_source);
+ g_object_weak_ref (G_OBJECT (window_source), edit_bookmarks_dialog_reset_signals,
+ window_source);
bookmark_list_widget = GTK_TREE_VIEW (gtk_builder_get_object (builder, "bookmark_tree_view"));
@@ -336,7 +333,6 @@ create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
gtk_widget_show (name_field);
gtk_box_pack_start (GTK_BOX (gtk_builder_get_object (builder, "bookmark_name_placeholder")),
name_field, TRUE, TRUE, 0);
- caja_undo_editable_set_undo_key (GTK_EDITABLE (name_field), TRUE);
gtk_label_set_mnemonic_widget (
GTK_LABEL (gtk_builder_get_object (builder, "bookmark_name_label")),
@@ -346,7 +342,6 @@ create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
gtk_widget_show (uri_field);
gtk_box_pack_start (GTK_BOX (gtk_builder_get_object (builder, "bookmark_location_placeholder")),
uri_field, TRUE, TRUE, 0);
- caja_undo_editable_set_undo_key (GTK_EDITABLE (uri_field), TRUE);
gtk_label_set_mnemonic_widget (
GTK_LABEL (gtk_builder_get_object (builder, "bookmark_location_label")),
@@ -363,7 +358,7 @@ create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
G_CALLBACK (on_row_deleted), NULL);
row_activated_signal_id =
g_signal_connect (bookmark_list_widget, "row_activated",
- G_CALLBACK (on_row_activated), undo_manager_source);
+ G_CALLBACK (on_row_activated), window_source);
button_pressed_signal_id =
g_signal_connect (bookmark_list_widget, "button_press_event",
G_CALLBACK (on_button_pressed), NULL);
@@ -404,7 +399,7 @@ create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
G_CALLBACK (on_remove_button_clicked), NULL);
jump_button_signal_id =
g_signal_connect (jump_button, "clicked",
- G_CALLBACK (on_jump_button_clicked), undo_manager_source);
+ G_CALLBACK (on_jump_button_clicked), window_source);
gtk_tree_selection_set_mode (bookmark_selection, GTK_SELECTION_BROWSE);
@@ -417,7 +412,7 @@ create_bookmarks_window (CajaBookmarkList *list, GObject *undo_manager_source)
}
void
-edit_bookmarks_dialog_set_signals (GObject *undo_manager_source)
+edit_bookmarks_dialog_set_signals (CajaWindow *window)
{
g_signal_handler_disconnect (GTK_OBJECT (jump_button),
@@ -427,13 +422,13 @@ edit_bookmarks_dialog_set_signals (GObject *undo_manager_source)
jump_button_signal_id =
g_signal_connect (jump_button, "clicked",
- G_CALLBACK (on_jump_button_clicked), undo_manager_source);
+ G_CALLBACK (on_jump_button_clicked), window);
row_activated_signal_id =
g_signal_connect (bookmark_list_widget, "row_activated",
- G_CALLBACK (on_row_activated), undo_manager_source);
+ G_CALLBACK (on_row_activated), window);
- g_object_weak_ref (G_OBJECT (undo_manager_source), edit_bookmarks_dialog_reset_signals,
- undo_manager_source);
+ g_object_weak_ref (G_OBJECT (window), edit_bookmarks_dialog_reset_signals,
+ window);
}
static CajaBookmark *
@@ -962,10 +957,6 @@ on_window_hide_event (GtkWidget *widget,
{
caja_bookmarks_window_save_geometry (GTK_WINDOW (widget));
- /* Disable undo for entry widgets */
- caja_undo_unregister (G_OBJECT (name_field));
- caja_undo_unregister (G_OBJECT (uri_field));
-
/* restore_geometry only works after window is hidden */
g_idle_add (restore_geometry, widget);
}
diff --git a/src/caja-bookmarks-window.h b/src/caja-bookmarks-window.h
index 20e242c5..135df595 100644
--- a/src/caja-bookmarks-window.h
+++ b/src/caja-bookmarks-window.h
@@ -30,10 +30,11 @@
#include <gtk/gtk.h>
#include "caja-bookmark-list.h"
+#include "caja-window.h"
GtkWindow *create_bookmarks_window (CajaBookmarkList *bookmarks,
- GObject *undo_manager_source);
-void caja_bookmarks_window_save_geometry (GtkWindow *window);
-void edit_bookmarks_dialog_set_signals (GObject *undo_manager_source);
+ CajaWindow *window_source);
+void caja_bookmarks_window_save_geometry (GtkWindow *window);
+void edit_bookmarks_dialog_set_signals (CajaWindow *window);
#endif /* CAJA_BOOKMARKS_WINDOW_H */
diff --git a/src/caja-navigation-window-menus.c b/src/caja-navigation-window-menus.c
index 69caca50..5cc77308 100644
--- a/src/caja-navigation-window-menus.c
+++ b/src/caja-navigation-window-menus.c
@@ -54,7 +54,6 @@
#include <libcaja-private/caja-file-utilities.h>
#include <libcaja-private/caja-global-preferences.h>
#include <libcaja-private/caja-ui-utilities.h>
-#include <libcaja-private/caja-undo-manager.h>
#include <libcaja-private/caja-search-engine.h>
#include <libcaja-private/caja-signaller.h>
diff --git a/src/caja-navigation-window.c b/src/caja-navigation-window.c
index a3c2ae84..db9cf523 100644
--- a/src/caja-navigation-window.c
+++ b/src/caja-navigation-window.c
@@ -63,7 +63,6 @@
#include <libcaja-private/caja-sidebar.h>
#include <libcaja-private/caja-view-factory.h>
#include <libcaja-private/caja-clipboard.h>
-#include <libcaja-private/caja-undo.h>
#include <libcaja-private/caja-module.h>
#include <libcaja-private/caja-sidebar-provider.h>
#include <libcaja-private/caja-search-directory.h>
diff --git a/src/caja-spatial-window.c b/src/caja-spatial-window.c
index db023d0a..c5a1bac4 100644
--- a/src/caja-spatial-window.c
+++ b/src/caja-spatial-window.c
@@ -60,7 +60,6 @@
#include <libcaja-private/caja-metadata.h>
#include <libcaja-private/caja-mime-actions.h>
#include <libcaja-private/caja-program-choosing.h>
-#include <libcaja-private/caja-undo.h>
#include <libcaja-private/caja-search-directory.h>
#include <libcaja-private/caja-search-engine.h>
#include <libcaja-private/caja-signaller.h>
diff --git a/src/caja-window-bookmarks.c b/src/caja-window-bookmarks.c
index 02ce3a64..e2b6ec73 100644
--- a/src/caja-window-bookmarks.c
+++ b/src/caja-window-bookmarks.c
@@ -33,7 +33,6 @@
#include "caja-bookmarks-window.h"
#include "caja-window-bookmarks.h"
#include "caja-window-private.h"
-#include <libcaja-private/caja-undo-manager.h>
#include <eel/eel-debug.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-vfs-extensions.h>
@@ -102,18 +101,14 @@ show_bogus_bookmark_window (CajaWindow *window,
static GtkWindow *
get_or_create_bookmarks_window (CajaWindow *window)
{
- GObject *undo_manager_source;
-
- undo_manager_source = G_OBJECT (window);
-
if (bookmarks_window == NULL)
{
bookmarks_window = create_bookmarks_window (window->details->bookmark_list,
- undo_manager_source);
+ window);
}
else
{
- edit_bookmarks_dialog_set_signals (undo_manager_source);
+ edit_bookmarks_dialog_set_signals (window);
}
return bookmarks_window;
diff --git a/src/caja-window-menus.c b/src/caja-window-menus.c
index ca37ccbb..7608ad3b 100644
--- a/src/caja-window-menus.c
+++ b/src/caja-window-menus.c
@@ -49,7 +49,6 @@
#include <libcaja-private/caja-icon-names.h>
#include <libcaja-private/caja-ui-utilities.h>
#include <libcaja-private/caja-module.h>
-#include <libcaja-private/caja-undo-manager.h>
#include <libcaja-private/caja-search-directory.h>
#include <libcaja-private/caja-search-engine.h>
#include <libcaja-private/caja-signaller.h>
@@ -272,16 +271,6 @@ action_stop_callback (GtkAction *action,
caja_window_slot_stop_loading (slot);
}
-#ifdef TEXT_CHANGE_UNDO
-static void
-action_undo_callback (GtkAction *action,
- gpointer user_data)
-{
- caja_undo_manager_undo
- (CAJA_WINDOW (user_data)->application->undo_manager);
-}
-#endif
-
static void
action_home_callback (GtkAction *action,
gpointer user_data)
@@ -852,12 +841,6 @@ static const GtkActionEntry main_entries[] =
NULL, N_("Edit Caja preferences"),
G_CALLBACK (action_preferences_callback)
},
- #ifdef TEXT_CHANGE_UNDO
- /* name, stock id, label */ { "Undo", NULL, N_("_Undo"),
- "<control>Z", N_("Undo the last text change"),
- G_CALLBACK (action_undo_callback)
- },
- #endif
/* name, stock id, label */ { "Up", GTK_STOCK_GO_UP, N_("Open _Parent"),
"<alt>Up", N_("Open the parent folder"),
G_CALLBACK (action_up_callback)
diff --git a/src/caja-window.c b/src/caja-window.c
index 520787b0..29830511 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -62,7 +62,6 @@
#include <libcaja-private/caja-program-choosing.h>
#include <libcaja-private/caja-view-factory.h>
#include <libcaja-private/caja-clipboard.h>
-#include <libcaja-private/caja-undo.h>
#include <libcaja-private/caja-search-directory.h>
#include <libcaja-private/caja-signaller.h>
#include <math.h>
@@ -531,7 +530,6 @@ caja_window_constructed (GObject *self)
caja_window_initialize_bookmarks_menu (window);
caja_window_set_initial_window_geometry (window);
- caja_undo_manager_attach (window->application->undo_manager, G_OBJECT (window));
}
static void
diff --git a/src/caja-window.h b/src/caja-window.h
index 95fecc36..46b0fd44 100644
--- a/src/caja-window.h
+++ b/src/caja-window.h
@@ -30,6 +30,7 @@
#include <gtk/gtk.h>
#include <eel/eel-glib-extensions.h>
#include <libcaja-private/caja-bookmark.h>
+#include <libcaja-private/caja-entry.h>
#include <libcaja-private/caja-window-info.h>
#include <libcaja-private/caja-search-directory.h>
#include "caja-application.h"
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 88fc5e0d..7ec253c0 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -55,9 +55,7 @@
#include <libcaja-private/caja-link.h>
#include <libcaja-private/caja-metadata.h>
#include <libcaja-private/caja-module.h>
-#include <libcaja-private/caja-undo-signal-handlers.h>
#include <libcaja-private/caja-mime-actions.h>
-#include <libcaja-private/caja-undo.h>
#include <string.h>
#include <sys/stat.h>
#include <cairo.h>
@@ -616,20 +614,6 @@ set_name_field (FMPropertiesWindow *window, const gchar *original_name,
0, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (window->details->name_label), window->details->name_field);
- /* FIXME bugzilla.gnome.org 42151:
- * With this (and one place elsewhere in this file, not sure which is the
- * trouble-causer) code in place, bug 2151 happens (crash on quit). Since
- * we've removed Undo from Caja for now, I'm just ifdeffing out this
- * code rather than trying to fix 2151 now. Note that it might be possible
- * to fix 2151 without making Undo actually work, it's just not worth the
- * trouble.
- */
-#ifdef UNDO_ENABLED
- /* Set up name field for undo */
- caja_undo_set_up_caja_entry_for_undo ( CAJA_ENTRY (window->details->name_field));
- caja_undo_editable_set_undo_key (GTK_EDITABLE (window->details->name_field), TRUE);
-#endif
-
g_signal_connect_object (window->details->name_field, "focus_out_event",
G_CALLBACK (name_field_focus_out), window, 0);
g_signal_connect_object (window->details->name_field, "activate",
@@ -5384,13 +5368,6 @@ is_directory_ready_callback (CajaFile *file,
remove_pending (startup_data, FALSE, TRUE, TRUE);
-/* FIXME bugzilla.gnome.org 42151:
- * See comment elsewhere in this file about bug 2151.
- */
-#ifdef UNDO_ENABLED
- caja_undo_share_undo_manager (GTK_OBJECT (new_window),
- GTK_OBJECT (callback_data));
-#endif
gtk_window_present (GTK_WINDOW (new_window));
}
}