[nautilus] clipboard: remove unused code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] clipboard: remove unused code
- Date: Tue, 24 Apr 2012 16:22:49 +0000 (UTC)
commit 1dd26d2019af0806399f9d9ab007122e67023a13
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Apr 24 12:11:13 2012 -0400
clipboard: remove unused code
libnautilus-private/nautilus-clipboard.c | 87 ------------------------------
libnautilus-private/nautilus-clipboard.h | 2 -
2 files changed, 0 insertions(+), 89 deletions(-)
---
diff --git a/libnautilus-private/nautilus-clipboard.c b/libnautilus-private/nautilus-clipboard.c
index 6291f51..15fc3fb 100644
--- a/libnautilus-private/nautilus-clipboard.c
+++ b/libnautilus-private/nautilus-clipboard.c
@@ -94,14 +94,6 @@ editable_select_all_callback (gpointer target)
}
static void
-text_view_select_all_callback (gpointer target)
-{
- g_assert (GTK_IS_TEXT_VIEW (target));
-
- g_signal_emit_by_name (target, "select-all", TRUE);
-}
-
-static void
action_cut_callback (GtkAction *action,
gpointer callback_data)
{
@@ -238,72 +230,6 @@ editable_disconnect_callbacks (GObject *object,
}
static void
-text_buffer_update_sensitivity (GtkTextBuffer *buffer,
- TargetCallbackData *target_data)
-{
- g_assert (GTK_IS_TEXT_BUFFER (buffer));
- g_assert (target_data != NULL);
-
- if (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)) {
- set_clipboard_menu_items_sensitive (target_data->action_group);
- } else {
- set_clipboard_menu_items_insensitive (target_data->action_group);
- }
-}
-
-static void
-text_buffer_delete_range (GtkTextBuffer *buffer,
- GtkTextIter *iter1,
- GtkTextIter *iter2,
- TargetCallbackData *target_data)
-{
- text_buffer_update_sensitivity (buffer, target_data);
-}
-
-static void
-text_buffer_mark_set (GtkTextBuffer *buffer,
- GtkTextIter *iter,
- GtkTextMark *mark,
- TargetCallbackData *target_data)
-{
- /* anonymous marks with NULL names refer to cursor moves */
- if (gtk_text_mark_get_name (mark) != NULL) {
- text_buffer_update_sensitivity (buffer, target_data);
- }
-}
-
-static void
-text_view_connect_callbacks (GObject *object,
- TargetCallbackData *target_data)
-{
- GtkTextBuffer *buffer;
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (object));
- g_assert (buffer);
-
- g_signal_connect_after (buffer, "mark-set",
- G_CALLBACK (text_buffer_mark_set), target_data);
- g_signal_connect_after (buffer, "delete-range",
- G_CALLBACK (text_buffer_delete_range), target_data);
- text_buffer_update_sensitivity (buffer, target_data);
-}
-
-static void
-text_view_disconnect_callbacks (GObject *object,
- TargetCallbackData *target_data)
-{
- GtkTextBuffer *buffer;
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (object));
- g_assert (buffer);
-
- g_signal_handlers_disconnect_matched (buffer,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- target_data);
-}
-
-static void
merge_in_clipboard_menu_items (GObject *widget_as_object,
TargetCallbackData *target_data)
{
@@ -531,19 +457,6 @@ nautilus_clipboard_set_up_editable (GtkEditable *target,
editable_disconnect_callbacks);
}
-void
-nautilus_clipboard_set_up_text_view (GtkTextView *target,
- GtkUIManager *ui_manager)
-{
- g_return_if_fail (GTK_IS_TEXT_VIEW (target));
- g_return_if_fail (GTK_IS_UI_MANAGER (ui_manager));
-
- nautilus_clipboard_real_set_up (target, ui_manager, TRUE,
- text_view_select_all_callback,
- text_view_connect_callbacks,
- text_view_disconnect_callbacks);
-}
-
static GList *
convert_lines_to_str_list (char **lines, gboolean *cut)
{
diff --git a/libnautilus-private/nautilus-clipboard.h b/libnautilus-private/nautilus-clipboard.h
index 6c48344..3a75ff9 100644
--- a/libnautilus-private/nautilus-clipboard.h
+++ b/libnautilus-private/nautilus-clipboard.h
@@ -40,8 +40,6 @@
void nautilus_clipboard_set_up_editable (GtkEditable *target,
GtkUIManager *ui_manager,
gboolean shares_selection_changes);
-void nautilus_clipboard_set_up_text_view (GtkTextView *target,
- GtkUIManager *ui_manager);
void nautilus_clipboard_clear_if_colliding_uris (GtkWidget *widget,
const GList *item_uris,
GdkAtom copied_files_atom);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]