diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-21 14:11:08 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-21 14:11:08 +0800 |
commit | ff377e0b7c6f38b61859868e8660ebed18fcd47c (patch) | |
tree | f21b4caf74c0ac18400e8b501edb989916830180 | |
parent | c520034c0b7243612535177882d8ebe5c7344c5d (diff) | |
download | gsoc2013-evolution-ff377e0b7c6f38b61859868e8660ebed18fcd47c.tar gsoc2013-evolution-ff377e0b7c6f38b61859868e8660ebed18fcd47c.tar.gz gsoc2013-evolution-ff377e0b7c6f38b61859868e8660ebed18fcd47c.tar.bz2 gsoc2013-evolution-ff377e0b7c6f38b61859868e8660ebed18fcd47c.tar.lz gsoc2013-evolution-ff377e0b7c6f38b61859868e8660ebed18fcd47c.tar.xz gsoc2013-evolution-ff377e0b7c6f38b61859868e8660ebed18fcd47c.tar.zst gsoc2013-evolution-ff377e0b7c6f38b61859868e8660ebed18fcd47c.zip |
Use an EEntry here instead of a GtkLabel. Fixes Ximian bug #7067.
2001-10-21 Christopher James Lahey <clahey@ximian.com>
* gui/component/select-names/e-select-names.c
(e_select_names_add_section, e_select_names_set_default): Use an
EEntry here instead of a GtkLabel. Fixes Ximian bug #7067.
svn path=/trunk/; revision=13841
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 56 |
2 files changed, 29 insertions, 33 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index a55bf61107..8e38ef89de 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2001-10-21 Christopher James Lahey <clahey@ximian.com> + + * gui/component/select-names/e-select-names.c + (e_select_names_add_section, e_select_names_set_default): Use an + EEntry here instead of a GtkLabel. Fixes Ximian bug #7067. + 2001-10-21 Jon Trowbridge <trow@ximian.com> * gui/component/addressbook.c (control_activate_cb): Call diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index a2930da626..e0ac9677fb 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -46,6 +46,7 @@ #include "e-select-names-table-model.h" #include <gal/widgets/e-categories-master-list-combo.h> #include <gal/widgets/e-unicode.h> +#include <gal/e-text/e-entry.h> #include <e-util/e-categories-master-list-wombat.h> static void e_select_names_init (ESelectNames *card); @@ -797,7 +798,7 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E child = g_new(ESelectNamesChild, 1); child->names = e_select_names; - child->title = g_strdup(_(name)); + child->title = e_utf8_from_locale_string(_(name)); e_select_names->child_count++; @@ -805,8 +806,21 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E button = gtk_button_new (); + label = e_entry_new (); + gtk_object_set(GTK_OBJECT(label), + "draw_background", FALSE, + "draw_borders", FALSE, + "editable", FALSE, + "text", "", + "use_ellipsis", TRUE, + "justification", GTK_JUSTIFY_CENTER, + NULL); + gtk_widget_set_usize (label, 40, 0); + label_text = g_strconcat (child->title, " ->", NULL); - label = gtk_label_new (label_text); + gtk_object_set (GTK_OBJECT (label), + "text", label_text, + NULL); g_free (label_text); gtk_container_add (GTK_CONTAINER (button), label); child->label = label; @@ -911,7 +925,9 @@ e_select_names_set_default (ESelectNames *e_select_names, if (e_select_names->def) { child = g_hash_table_lookup(e_select_names->children, e_select_names->def); if (child) - gtk_widget_restore_default_style(child->label); + gtk_object_set (GTK_OBJECT (E_ENTRY (child->label)->item), + "bold", FALSE, + NULL); } g_free(e_select_names->def); @@ -919,35 +935,9 @@ e_select_names_set_default (ESelectNames *e_select_names, if (e_select_names->def) { child = g_hash_table_lookup(e_select_names->children, e_select_names->def); - if (child) { - EFont *efont; - GdkFont *gdkfont; - GtkStyle *oldstyle; - - oldstyle = gtk_widget_get_style(child->label); - - efont = e_font_from_gdk_font(oldstyle->font); - gdkfont = e_font_to_gdk_font(efont, E_FONT_BOLD); - e_font_unref(efont); - - if (gdkfont != NULL) { - GtkStyle *style; - - style = gtk_style_copy(oldstyle); - - gdk_font_ref(gdkfont); - gdk_font_unref(style->font); - style->font = gdkfont; - - gtk_widget_set_style(child->label, style); - - } - gtk_style_unref(oldstyle); - } + if (child) + gtk_object_set (GTK_OBJECT (E_ENTRY (child->label)->item), + "bold", TRUE, + NULL); } } - - - - - |