aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-24 06:47:34 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-24 07:32:40 +0800
commitd2bf13d734424b12f3a92791624aa637b11c8500 (patch)
tree032675c74bd67ff8867cfed81ee6a5531683a308 /addressbook
parentd9126cd9470657460f623d55bb558a6868700c7e (diff)
downloadgsoc2013-evolution-d2bf13d734424b12f3a92791624aa637b11c8500.tar
gsoc2013-evolution-d2bf13d734424b12f3a92791624aa637b11c8500.tar.gz
gsoc2013-evolution-d2bf13d734424b12f3a92791624aa637b11c8500.tar.bz2
gsoc2013-evolution-d2bf13d734424b12f3a92791624aa637b11c8500.tar.lz
gsoc2013-evolution-d2bf13d734424b12f3a92791624aa637b11c8500.tar.xz
gsoc2013-evolution-d2bf13d734424b12f3a92791624aa637b11c8500.tar.zst
gsoc2013-evolution-d2bf13d734424b12f3a92791624aa637b11c8500.zip
EUrlEntry: Replace button with clickable inline icon.
Replace the big, bulky "open URL" button with a clickable icon directly in the text entry field. This saves precious vertical space, especially in the contact editor. Also remove e_url_entry_get_entry() since EUrlEntry now IS a GtkEntry.
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index a72d783095..8f7bc9e929 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2549,8 +2549,7 @@ init_simple_field (EContactEditor *editor,
gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)));
} else if (E_IS_URL_ENTRY (widget)) {
- changed_object = G_OBJECT (
- e_url_entry_get_entry (E_URL_ENTRY (widget)));
+ changed_object = G_OBJECT (widget);
g_signal_connect_swapped (
changed_object, "activate",
G_CALLBACK (entry_activated), editor);
@@ -2607,9 +2606,9 @@ fill_in_simple_field (EContactEditor *editor,
g_free (text);
} else if (E_IS_URL_ENTRY (widget)) {
- GtkWidget *entry = e_url_entry_get_entry (E_URL_ENTRY (widget));
- gchar *text = e_contact_get (contact, field_id);
- gtk_entry_set_text (GTK_ENTRY (entry), STRING_MAKE_NON_NULL (text));
+ gchar *text = e_contact_get (contact, field_id);
+ gtk_entry_set_text (
+ GTK_ENTRY (widget), STRING_MAKE_NON_NULL (text));
g_free (text);
} else if (E_IS_DATE_EDIT (widget)) {
@@ -2737,8 +2736,7 @@ extract_simple_field (EContactEditor *editor,
g_free (text);
} else if (E_IS_URL_ENTRY (widget)) {
- GtkWidget *entry = e_url_entry_get_entry (E_URL_ENTRY (widget));
- const gchar *text = gtk_entry_get_text (GTK_ENTRY (entry));
+ const gchar *text = gtk_entry_get_text (GTK_ENTRY (widget));
e_contact_set (contact, field_id, (gchar *) text);
} else if (E_IS_DATE_EDIT (widget)) {
@@ -2854,10 +2852,6 @@ sensitize_simple_field (GtkWidget *widget,
gtk_editable_set_editable (GTK_EDITABLE (widget), enabled);
else if (GTK_IS_TEXT_VIEW (widget))
gtk_text_view_set_editable (GTK_TEXT_VIEW (widget), enabled);
- else if (E_IS_URL_ENTRY (widget)) {
- GtkWidget *entry = e_url_entry_get_entry (E_URL_ENTRY (widget));
- gtk_editable_set_editable (GTK_EDITABLE (entry), enabled);
- }
else if (E_IS_DATE_EDIT (widget))
e_date_edit_set_editable (E_DATE_EDIT (widget), enabled);
else