[epiphany/gnome-3-18] Revert "location-entry: Encode URI before copy/paste"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-18] Revert "location-entry: Encode URI before copy/paste"
- Date: Tue, 9 Feb 2016 01:36:10 +0000 (UTC)
commit 434df10bbef3fa7fef7a2d334a8e70276be5381d
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Feb 8 19:35:56 2016 -0600
Revert "location-entry: Encode URI before copy/paste"
This reverts commit 6a36029a1212d047861d4a00425a2558f086bbc5.
lib/widgets/ephy-location-entry.c | 43 -------------------------------------
1 files changed, 0 insertions(+), 43 deletions(-)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index fa2e863..629be35 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -210,58 +210,15 @@ ephy_location_entry_get_preferred_width (GtkWidget *widget,
}
static void
-ephy_location_entry_copy_clipboard (GtkEntry *entry)
-{
- char *text;
- gint start;
- gint end;
-
- if (!gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end))
- return;
-
- text = gtk_editable_get_chars (GTK_EDITABLE (entry), start, end);
-
- if (start == 0)
- {
- char *tmp = text;
- text = g_uri_escape_string (tmp,
- G_URI_RESERVED_CHARS_ALLOWED_IN_PATH,
- FALSE /* allow_utf8 */);
- g_free (tmp);
- }
-
- gtk_clipboard_set_text (gtk_widget_get_clipboard (GTK_WIDGET (entry),
- GDK_SELECTION_CLIPBOARD),
- text, -1);
- g_free (text);
-}
-
-static void
-ephy_location_entry_cut_clipboard (GtkEntry *entry)
-{
- if (!gtk_editable_get_editable (GTK_EDITABLE (entry)))
- {
- gtk_widget_error_bell (GTK_WIDGET (entry));
- return;
- }
-
- ephy_location_entry_copy_clipboard (entry);
- gtk_editable_delete_selection (GTK_EDITABLE (entry));
-}
-
-static void
ephy_location_entry_class_init (EphyLocationEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- GtkEntryClass *entry_class = GTK_ENTRY_CLASS (klass);
object_class->get_property = ephy_location_entry_get_property;
object_class->set_property = ephy_location_entry_set_property;
object_class->finalize = ephy_location_entry_finalize;
widget_class->get_preferred_width = ephy_location_entry_get_preferred_width;
- entry_class->copy_clipboard = ephy_location_entry_copy_clipboard;
- entry_class->cut_clipboard = ephy_location_entry_cut_clipboard;
/**
* EphyLocationEntry:location:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]