diff options
author | jacob berkman <jacob@ximian.com> | 2001-08-23 06:12:12 +0800 |
---|---|---|
committer | Jacob Berkman <jberkman@src.gnome.org> | 2001-08-23 06:12:12 +0800 |
commit | 1b92eea9f43d08e724c831ae6807b39b2ba73f4e (patch) | |
tree | cafac7e13ddfb43eec207a590c3470855e3eabca /addressbook/gui/contact-editor | |
parent | 4f1770b14e5b30ca1808e1fa1c1258afe35abee1 (diff) | |
download | gsoc2013-evolution-1b92eea9f43d08e724c831ae6807b39b2ba73f4e.tar gsoc2013-evolution-1b92eea9f43d08e724c831ae6807b39b2ba73f4e.tar.gz gsoc2013-evolution-1b92eea9f43d08e724c831ae6807b39b2ba73f4e.tar.bz2 gsoc2013-evolution-1b92eea9f43d08e724c831ae6807b39b2ba73f4e.tar.lz gsoc2013-evolution-1b92eea9f43d08e724c831ae6807b39b2ba73f4e.tar.xz gsoc2013-evolution-1b92eea9f43d08e724c831ae6807b39b2ba73f4e.tar.zst gsoc2013-evolution-1b92eea9f43d08e724c831ae6807b39b2ba73f4e.zip |
emit an event from our event source (contact_editor_cb): emit a destroy
2001-08-22 jacob berkman <jacob@ximian.com>
* gui/component/e-address-popup.c (emit_event): emit an event from
our event source
(contact_editor_cb): emit a destroy event so our control frame can
be destroyed.
(edit_contact_info_cb): emit a hide event so our control frame can
be hidden
(e_address_popup_cardify):
(add_contacts_cb): emit the destroy event
(e_address_popup_factory_new_control): don't unref our object at
widget destroy time as that was really really broken
(e_address_popup_factory_new_control): create an event source and
aggregate ourself with it
* gui/contact-editor/e-contact-editor.c (enable_writable_fields):
display a nicer warning when we can't find a widget for a given
field
(e_contact_editor_raise): only raise if there is a window
* gui/contact-editor/contact-editor.glade: name some widgets that
got unnamed, and set the first entry as defaultable
* gui/contact-editor/e-contact-editor.c: envelope printing is
disabled in 1.0 2001-08-22 jacob berkman <jacob@ximian.com>
* mail-display.c: rework how the e-card-popup thing has its life
managed. we now hide the window on the Hide event and destroy it
on the Destroy event emitted from its event source
svn path=/trunk/; revision=12402
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r-- | addressbook/gui/contact-editor/contact-editor.glade | 5 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 32 |
2 files changed, 28 insertions, 9 deletions
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade index bb8bf2cd74..88d74a2a77 100644 --- a/addressbook/gui/contact-editor/contact-editor.glade +++ b/addressbook/gui/contact-editor/contact-editor.glade @@ -698,6 +698,7 @@ <widget> <class>GtkEntry</class> <name>entry-fullname</name> + <can_default>True</can_default> <has_default>True</has_default> <can_focus>True</can_focus> <has_focus>True</has_focus> @@ -1603,7 +1604,7 @@ <widget> <class>GtkLabel</class> - <name>label21</name> + <name>accellabel-fileas</name> <label>File A_s:</label> <justify>GTK_JUSTIFY_CENTER</justify> <wrap>False</wrap> @@ -1630,7 +1631,7 @@ <widget> <class>GtkLabel</class> - <name>label22</name> + <name>accellabel-web</name> <label>_Web page address:</label> <justify>GTK_JUSTIFY_CENTER</justify> <wrap>False</wrap> diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 68ef1f6a6d..843f1ab355 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1055,8 +1055,9 @@ EPixmap pixmaps[] = { E_PIXMAP ("/commands/ContactEditorSaveAs", "save-as-16.png"), E_PIXMAP ("/commands/ContactEditorDelete", "evolution-trash-mini.png"), E_PIXMAP ("/commands/ContactEditorPrint", "print.xpm"), +#if 0 /* Envelope printing is disabled for Evolution 1.0. */ E_PIXMAP ("/commands/ContactEditorPrintEnvelope", "print.xpm"), - +#endif E_PIXMAP ("/Toolbar/ContactEditorSave", "buttons/save-24.png"), E_PIXMAP ("/Toolbar/ContactEditorDelete", "buttons/delete-message.png"), E_PIXMAP ("/Toolbar/ContactEditorPrint", "buttons/print.png"), @@ -1341,6 +1342,9 @@ e_contact_editor_new (EBook *book, { EContactEditor *ce; + g_return_val_if_fail (E_IS_BOOK (book), NULL); + g_return_val_if_fail (E_IS_CARD (card), NULL); + ce = E_CONTACT_EDITOR (gtk_type_new (E_CONTACT_EDITOR_TYPE)); gtk_object_set (GTK_OBJECT (ce), @@ -2185,11 +2189,23 @@ enable_writable_fields(EContactEditor *editor) /* handle the label next to the dropdown widgets */ for (i = 0; i < num_widget_field_mappings; i ++) { - gboolean enabled = g_hash_table_lookup (supported_hash, - e_card_simple_get_ecard_field (simple, - widget_field_mappings[i].field_id)) != NULL; - gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui, - widget_field_mappings[i].widget_name), enabled); + gboolean enabled; + GtkWidget *w; + const char *field; + + w = glade_xml_get_widget(editor->gui, widget_field_mappings[i].widget_name); + if (!w) { + g_warning (_("Could not find widget for a field: `%s'"), + widget_field_mappings[i].widget_name); + continue; + } + + field = e_card_simple_get_ecard_field (simple, + widget_field_mappings[i].field_id); + + enabled = (g_hash_table_lookup (supported_hash, field) != NULL); + + gtk_widget_set_sensitive (w, enabled); } g_hash_table_destroy (dropdown_hash); @@ -2464,7 +2480,9 @@ extract_info(EContactEditor *editor) void e_contact_editor_raise (EContactEditor *editor) { - gdk_window_raise (GTK_WIDGET (editor->app)->window); + /* FIXME: perhaps we should raise at realize time */ + if (GTK_WIDGET (editor->app)->window) + gdk_window_raise (GTK_WIDGET (editor->app)->window); } /** |