aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-02-11 04:51:10 +0800
committerChris Toshok <toshok@src.gnome.org>2003-02-11 04:51:10 +0800
commit36d90739a4c2a3babf0497c0e474e2383d639a5d (patch)
tree60abb248591ff5a50c80d5616f8b7bf3f9b6520d /addressbook
parent0701addc195c6315474346c9bd062dc7dc84f80c (diff)
downloadgsoc2013-evolution-36d90739a4c2a3babf0497c0e474e2383d639a5d.tar.gz
gsoc2013-evolution-36d90739a4c2a3babf0497c0e474e2383d639a5d.tar.zst
gsoc2013-evolution-36d90739a4c2a3babf0497c0e474e2383d639a5d.zip
[ fixes bug #33066 ] new function (set_entry_changed_signals): call
2003-02-10 Chris Toshok <toshok@ximian.com> [ fixes bug #33066 ] * gui/contact-editor/e-contact-editor.c (set_urlentry_changed_signal_field): new function (set_entry_changed_signals): call set_urlentry_changed_signal_field for entry-web, entry-caluri, and entry-fburl. (fill_in_field): add handling for EUrlEntry's. (extract_field): same. (enable_widget): same. (e_contact_editor_create_date): show the widget. (e_contact_editor_create_web): same, create a url entry. (set_urlentry_changed_signal_field): new function * gui/contact-editor/contact-editor.glade: entry-web, entry-caluri, and entry-fburl are all custom widgets now. svn path=/trunk/; revision=19879
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog18
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade72
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c48
3 files changed, 92 insertions, 46 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 3492049fee..2c008605b4 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,21 @@
+2003-02-10 Chris Toshok <toshok@ximian.com>
+
+ [ fixes bug #33066 ]
+ * gui/contact-editor/e-contact-editor.c
+ (set_urlentry_changed_signal_field): new function
+ (set_entry_changed_signals): call
+ set_urlentry_changed_signal_field for entry-web, entry-caluri, and
+ entry-fburl.
+ (fill_in_field): add handling for EUrlEntry's.
+ (extract_field): same.
+ (enable_widget): same.
+ (e_contact_editor_create_date): show the widget.
+ (e_contact_editor_create_web): same, create a url entry.
+ (set_urlentry_changed_signal_field): new function
+
+ * gui/contact-editor/contact-editor.glade: entry-web,
+ entry-caluri, and entry-fburl are all custom widgets now.
+
2003-02-10 Ettore Perazzoli <ettore@ximian.com>
* backend/ebook/Makefile.am: Install load-pine-addressbook and
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade
index c574310f2b..7f9f83a970 100644
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ b/addressbook/gui/contact-editor/contact-editor.glade
@@ -685,27 +685,6 @@
</child>
<child>
- <widget class="GtkEntry" id="entry-web">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
<widget class="GtkHSeparator" id="hseparator5">
<property name="visible">True</property>
</widget>
@@ -1435,6 +1414,24 @@
<property name="y_options">fill</property>
</packing>
</child>
+
+ <child>
+ <widget class="Custom" id="entry-web">
+ <property name="visible">True</property>
+ <property name="creation_function">e_contact_editor_create_web</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Sat, 08 Feb 2003 09:14:46 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="tab_expand">False</property>
@@ -2179,44 +2176,37 @@ of that information here.</property>
</child>
<child>
- <widget class="GtkEntry" id="entry-caluri">
+ <widget class="Custom" id="entry-caluri">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ <property name="creation_function">e_contact_editor_create_web</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Mon, 10 Feb 2003 20:37:57 GMT</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
- <property name="y_options"></property>
+ <property name="y_options">fill</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-fburl">
+ <widget class="Custom" id="entry-fburl">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ <property name="creation_function">e_contact_editor_create_web</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Mon, 10 Feb 2003 20:38:00 GMT</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
</packing>
</child>
</widget>
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 1b726c04e3..038ca7825d 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -52,6 +52,7 @@
#include "addressbook/gui/widgets/e-addressbook-util.h"
#include "e-util/e-gui-utils.h"
#include "widgets/misc/e-dateedit.h"
+#include "widgets/misc/e-url-entry.h"
#include "shell/evolution-shell-component-utils.h"
#include "e-card-merging.h"
@@ -644,6 +645,17 @@ set_entry_changed_signal_field(EContactEditor *editor, char *id)
}
static void
+set_urlentry_changed_signal_field (EContactEditor *editor, char *id)
+{
+ GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
+ if (widget && E_IS_URL_ENTRY(widget)) {
+ GtkWidget *entry = e_url_entry_get_entry (E_URL_ENTRY (widget));
+ g_signal_connect (entry, "changed",
+ G_CALLBACK (field_changed), editor);
+ }
+}
+
+static void
set_entry_changed_signals(EContactEditor *editor)
{
GtkWidget *widget;
@@ -673,7 +685,10 @@ set_entry_changed_signals(EContactEditor *editor)
G_CALLBACK (company_entry_changed), editor);
}
- set_entry_changed_signal_field(editor, "entry-web");
+ set_urlentry_changed_signal_field (editor, "entry-web");
+ set_urlentry_changed_signal_field (editor, "entry-caluri");
+ set_urlentry_changed_signal_field (editor, "entry-fburl");
+
set_entry_changed_signal_field(editor, "entry-categories");
set_entry_changed_signal_field(editor, "entry-jobtitle");
set_entry_changed_signal_field(editor, "entry-file-as");
@@ -701,10 +716,6 @@ set_entry_changed_signals(EContactEditor *editor)
g_signal_connect (widget, "changed",
G_CALLBACK (widget_changed), editor);
}
-
- set_entry_changed_signal_field(editor, "entry-caluri");
- set_entry_changed_signal_field(editor, "entry-fburl");
-
}
static void
@@ -2131,6 +2142,10 @@ static void
fill_in_field(EContactEditor *editor, char *id, char *value)
{
GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
+
+ if (widget && E_IS_URL_ENTRY (widget))
+ widget = e_url_entry_get_entry (E_URL_ENTRY (widget));
+
if (widget && GTK_IS_EDITABLE(widget)) {
int position = 0;
GtkEditable *editable = GTK_EDITABLE(widget);
@@ -2498,6 +2513,9 @@ extract_field(EContactEditor *editor, ECard *card, char *editable_id, char *key)
{
GtkWidget *widget = glade_xml_get_widget(editor->gui, editable_id);
+ if (widget && E_IS_URL_ENTRY (widget))
+ widget = e_url_entry_get_entry (E_URL_ENTRY (widget));
+
if (widget && GTK_IS_EDITABLE (widget)) {
GtkEditable *editable = GTK_EDITABLE(widget);
char *string = gtk_editable_get_chars(editable, 0, -1);
@@ -2650,6 +2668,22 @@ e_contact_editor_create_date(gchar *name,
TRUE);
e_date_edit_set_show_time (E_DATE_EDIT (widget), FALSE);
e_date_edit_set_time (E_DATE_EDIT (widget), -1);
+ gtk_widget_show (widget);
+ return widget;
+}
+
+GtkWidget *
+e_contact_editor_create_web(gchar *name,
+ gchar *string1, gchar *string2,
+ gint int1, gint int2);
+
+GtkWidget *
+e_contact_editor_create_web(gchar *name,
+ gchar *string1, gchar *string2,
+ gint int1, gint int2)
+{
+ GtkWidget *widget = e_url_entry_new ();
+ gtk_widget_show (widget);
return widget;
}
@@ -2667,6 +2701,10 @@ enable_widget (GtkWidget *widget, gboolean enabled)
enabled);
gtk_widget_set_sensitive (GTK_COMBO (widget)->button, enabled);
}
+ else if (E_IS_URL_ENTRY (widget)) {
+ GtkWidget *e = e_url_entry_get_entry (E_URL_ENTRY (widget));
+ gtk_editable_set_editable (GTK_EDITABLE (e), enabled);
+ }
else if (E_IS_DATE_EDIT (widget)) {
e_date_edit_set_editable (E_DATE_EDIT (widget), enabled);
}