diff options
author | Darin Adler <darin@src.gnome.org> | 2000-10-18 21:43:35 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2000-10-18 21:43:35 +0000 |
commit | e5483a3a3c4bff78a57b7621f1b3832949426948 (patch) | |
tree | 73f023c34c5f81416ee8d48f1e6dbad2db6f6070 /libnautilus-extensions | |
parent | 14dbbeaddfad425cca25f49648754957ad4e973d (diff) | |
download | nautilus-e5483a3a3c4bff78a57b7621f1b3832949426948.tar.gz |
Use calls by new names.
* components/notes/nautilus-notes.c: (make_notes_view):
* src/nautilus-location-bar.c: (nautilus_location_bar_new):
* src/nautilus-simple-search-bar.c:
(nautilus_simple_search_bar_new):
Use calls by new names.
* libnautilus-extensions/nautilus-undo-signal-handlers.c:
(editable_key_press_event), (nautilus_undo_editable_set_undo_key):
Disabled the undo-key part of undo also. The old code was actually
harmless because it got the name of the signal wrong, but it's
better to have it disabled.
* src/nautilus-shell-ui.xml: Added a comment that points out the
2nd place where undo has been disabled.
* libnautilus/nautilus-clipboard.h:
* libnautilus/nautilus-clipboard.c: (cut_callback),
(copy_callback), (paste_callback), (clear_callback),
(set_paste_sensitive_if_clipboard_contains_data),
(focus_changed_callback), (target_destroy_callback),
(nautilus_clipboard_set_up_editable), (first_focus_callback),
(control_destroyed_callback),
(nautilus_clipboard_set_up_editable_in_control),
(disconnect_set_up_in_control_handlers):
Some minor cleanup of the clipboard code. Includes bug fixes for
items that are already in focus when the clipboard is hooked up
(should never happen), and a fix for code that was using
gtk_signal_disconnect on something that was connected with
gtk_signal_connect_while_alive (doesn't work). Also got rid of
misguided code that was copying a Bonobo_UIContainer with memcpy
(since Bonobo_UIContainer is just a pointer).
* src/Makefile.am:
* src/nautilus-window-private.h:
Changed source file name from nautilus-service-menu to
nautilus-service-ui, since it does a toolbar item, not just a
menu.
* src/nautilus-window-service-ui.c:
* src/nautilus-window-service-ui.h:
A second cut at the service UI code. It no longer leaks a UI
component.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_get_ui_container): Use our own pointer to the UI
container instead of asking the shell UI for its container.
Diffstat (limited to 'libnautilus-extensions')
-rw-r--r-- | libnautilus-extensions/nautilus-undo-signal-handlers.c | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/libnautilus-extensions/nautilus-undo-signal-handlers.c b/libnautilus-extensions/nautilus-undo-signal-handlers.c index 1af3b1c82..f7c9f3e6b 100644 --- a/libnautilus-extensions/nautilus-undo-signal-handlers.c +++ b/libnautilus-extensions/nautilus-undo-signal-handlers.c @@ -284,23 +284,35 @@ restore_editable_from_undo_snapshot_callback (GtkObject *target, gpointer callba * Allow the use of ctrl-z from within widget. */ -static void +/* Undo is disabled until we have a better implementation. + * Both here and in nautilus-shell-ui.xml. + */ + +#ifdef UNDO_ENABLED + +/* FIXME: This needs a return value of gboolean. */ +static void 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; - } - break; - - default: - break; + /* Undo */ + case 'z': + if ((event->state & GDK_CONTROL_MASK) != 0) { + nautilus_undo (GTK_OBJECT (editable)); + /* FIXME: Need to stop the signal to prevent + * re-handling the same event. + */ + return; + } + break; + + default: + break; } } +#endif + /* editable_set_undo_key * * Allow the use of ctrl-z from within widget. This should only be @@ -310,16 +322,18 @@ editable_key_press_event (GtkEditable *editable, GdkEventKey *event, gpointer us void nautilus_undo_editable_set_undo_key (GtkEditable *editable, gboolean value) { +#ifdef UNDO_ENABLED if (value) { /* Connect to entry signals */ gtk_signal_connect (GTK_OBJECT (editable), - "key-press-event", - GTK_SIGNAL_FUNC (editable_key_press_event), - NULL); - } - else { + "key_press_event", + GTK_SIGNAL_FUNC (editable_key_press_event), + NULL); + } else { + /* FIXME: This warns if the handler is already connected. */ gtk_signal_disconnect_by_func (GTK_OBJECT (editable), - GTK_SIGNAL_FUNC (editable_key_press_event), - NULL); - } + GTK_SIGNAL_FUNC (editable_key_press_event), + NULL); + } +#endif } |