aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-search-bar.h
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-08-15 00:04:33 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-08-15 00:04:33 +0800
commitf8473e11f76fef784b136614fb609424e6453911 (patch)
tree23fa33dfad68eebb5add677036a70f214fd887ab /widgets/misc/e-search-bar.h
parent9086989f207a11e7edb50177662539bd75da0370 (diff)
downloadgsoc2013-evolution-f8473e11f76fef784b136614fb609424e6453911.tar
gsoc2013-evolution-f8473e11f76fef784b136614fb609424e6453911.tar.gz
gsoc2013-evolution-f8473e11f76fef784b136614fb609424e6453911.tar.bz2
gsoc2013-evolution-f8473e11f76fef784b136614fb609424e6453911.tar.lz
gsoc2013-evolution-f8473e11f76fef784b136614fb609424e6453911.tar.xz
gsoc2013-evolution-f8473e11f76fef784b136614fb609424e6453911.tar.zst
gsoc2013-evolution-f8473e11f76fef784b136614fb609424e6453911.zip
*Please* add accessor functions instead of just object arguments!
2001-08-14 Federico Mena Quintero <federico@ximian.com> *Please* add accessor functions instead of just object arguments! * e-search-bar.c (e_search_bar_set_option_choice): New function. (e_search_bar_set_suboption_choice): New function. (e_search_bar_set_text): New function. (impl_set_arg): Use the functions above instead of setting things directly. (add_dropdown): If the item is a separator, set it as insensitive. (activate_by_subitems): Handle the translate field in the subitem structure. Also, allow the creation of separators by having NULL text strings in the subitems. (set_option): If the item is a separator, set it as insensitive. (set_option): Do not use the subitem_garbage hack. Do proper memory management instead. (e_search_bar_set_suboption): New function to change the suboption items in a search bar. * e-search-bar.h (ESearchBarSubitem): Added a `translate' field. This API sucks so much it is not funny. (ESearchBar): Removed the subitem_garbage hack. Please do proper memory management. svn path=/trunk/; revision=12014
Diffstat (limited to 'widgets/misc/e-search-bar.h')
-rw-r--r--widgets/misc/e-search-bar.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/widgets/misc/e-search-bar.h b/widgets/misc/e-search-bar.h
index 10c4eef8db..0694682e02 100644
--- a/widgets/misc/e-search-bar.h
+++ b/widgets/misc/e-search-bar.h
@@ -47,6 +47,7 @@ extern "C" {
typedef struct {
char *text;
int id;
+ gboolean translate; /* whether to translate the text */
} ESearchBarSubitem;
typedef struct {
@@ -76,7 +77,6 @@ struct _ESearchBar
GtkWidget *dropdown_menu;
GtkWidget *activate_button;
GtkWidget *entry_box;
- GList *subitem_garbage;
guint pending_change;
int option_choice;
@@ -100,6 +100,9 @@ void e_search_bar_set_menu (ESearchBar *search_bar, ESearchBarItem *menu
void e_search_bar_add_menu (ESearchBar *search_bar, ESearchBarItem *menu_item);
void e_search_bar_set_option (ESearchBar *search_bar, ESearchBarItem *option_items);
+void e_search_bar_set_suboption (ESearchBar *search_bar, int option_id,
+ ESearchBarSubitem *subitems);
+
void e_search_bar_construct (ESearchBar *search_bar,
ESearchBarItem *menu_items,
ESearchBarItem *option_items);
@@ -108,8 +111,13 @@ GtkWidget *e_search_bar_new (ESearchBarItem *menu_items,
void e_search_bar_set_menu_sensitive(ESearchBar *search_bar, int id, gboolean state);
+void e_search_bar_set_option_choice (ESearchBar *search_bar, int id);
int e_search_bar_get_option_choice (ESearchBar *search_bar);
+
+void e_search_bar_set_suboption_choice (ESearchBar *search_bar, int id);
int e_search_bar_get_suboption_choice (ESearchBar *search_bar);
+
+void e_search_bar_set_text (ESearchBar *search_bar, const char *text);
char *e_search_bar_get_text (ESearchBar *search_bar);
#ifdef __cplusplus