diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-02-25 15:03:46 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-02-25 15:03:46 +0800 |
commit | f446063c572a9278fa3ce8e6b359c541ace68814 (patch) | |
tree | 6838d63be3bf113b1cad1d5c139151e289d41566 /widgets/misc/e-search-bar.c | |
parent | bcc58d8bc72d02a6a54f52fda53f7f4f1d192d6a (diff) | |
download | gsoc2013-evolution-f446063c572a9278fa3ce8e6b359c541ace68814.tar.gz gsoc2013-evolution-f446063c572a9278fa3ce8e6b359c541ace68814.tar.zst gsoc2013-evolution-f446063c572a9278fa3ce8e6b359c541ace68814.zip |
Same as below.
2003-02-25 Jeffrey Stedfast <fejj@ximian.com>
* e-dateedit.c (on_date_popup_date_selected): Same as below.
* e-cell-date-edit.c (e_cell_date_edit_on_ok_clicked): Also
updated to use the new GDate API from glib 2.0
* test-calendar.c (on_selection_changed): Fixed to use glib 2.0's
GDate API.
* e-calendar-item.c (e_calendar_item_get_week_number): Port to
glib 2.0's GDate API.
(e_calendar_item_set_selection): Same.
* e-search-bar.c (append_xml_menu_item): Use
g_string_append_printf instead of g_string_sprintfa since the
latter is now deprecated.
(setup_bonobo_menus): Same.
* e-filter-bar.c (do_advanced): Use gtk_window_set_resizable()
* e-charset-picker.c: Fixes to make it build cleanly with
-DG_DISABLE_DEPRECATED
(add_charset): Escape _'s so we don't get underline weirdness due
to GtkLabel thinking the _ means to underline the next char.
(e_charset_picker_bonobo_ui_populate): Same here.
svn path=/trunk/; revision=20048
Diffstat (limited to 'widgets/misc/e-search-bar.c')
-rw-r--r-- | widgets/misc/e-search-bar.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 2b58d98421..9845f76320 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -25,7 +25,10 @@ * Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include <gtk/gtkdrawingarea.h> #include <gtk/gtkeventbox.h> @@ -490,16 +493,16 @@ append_xml_menu_item (GString *xml, const char *accelerator) { char *encoded_label; - + encoded_label = bonobo_ui_util_encode_str (label); - g_string_sprintfa (xml, "<menuitem name=\"%s\" verb=\"%s\" label=\"%s\"", - name, verb, encoded_label); + g_string_append_printf (xml, "<menuitem name=\"%s\" verb=\"%s\" label=\"%s\"", + name, verb, encoded_label); g_free (encoded_label); - + if (accelerator != NULL) - g_string_sprintfa (xml, " accel=\"%s\"", accelerator); - - g_string_sprintfa (xml, "/>"); + g_string_append_printf (xml, " accel=\"%s\"", accelerator); + + g_string_append (xml, "/>"); } static void @@ -509,37 +512,37 @@ setup_bonobo_menus (ESearchBar *esb) GSList *p; char *verb_name; char *encoded_title; - + xml = g_string_new (""); - + encoded_title = bonobo_ui_util_encode_str (_("_Search")); - g_string_sprintfa (xml, "<submenu name=\"Search\" label=\"%s\">", encoded_title); + g_string_append_printf (xml, "<submenu name=\"Search\" label=\"%s\">", encoded_title); g_free (encoded_title); - - g_string_sprintfa (xml, "<placeholder name=\"SearchBar\">"); - + + g_string_append (xml, "<placeholder name=\"SearchBar\">"); + append_xml_menu_item (xml, "FindNow", _("_Find Now"), "ESearchBar:FindNow", NULL); append_xml_menu_item (xml, "Clear", _("_Clear"), "ESearchBar:Clear", "*Control**Shift*b"); - + for (p = esb->menu_items; p != NULL; p = p->next) { const ESearchBarItem *item; - + item = (const ESearchBarItem *) p->data; - + verb_name = verb_name_from_id (item->id); bonobo_ui_component_add_verb (esb->ui_component, verb_name, search_verb_cb, esb); - + if (item->text == NULL) g_string_append (xml, "<separator/>"); else append_xml_menu_item (xml, verb_name, item->text, verb_name, NULL); - + g_free (verb_name); } - - g_string_sprintfa (xml, "</placeholder>"); - g_string_sprintfa (xml, "</submenu>"); - + + g_string_append (xml, "</placeholder>"); + g_string_append (xml, "</submenu>"); + bonobo_ui_component_set (esb->ui_component, "/menu/SearchPlaceholder", xml->str, NULL); g_string_free (xml, TRUE); |