diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-03-16 06:51:13 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-03-16 06:51:13 +0800 |
commit | c85ad2279bcfc8e85e6c6b5824e851da92173582 (patch) | |
tree | c0e77b54e2ed6a5fece1ff5469f7bd048636a329 /calendar/gui | |
parent | 95c4e2623b6f22473ee4a304d485400728ed8b09 (diff) | |
download | gsoc2013-evolution-c85ad2279bcfc8e85e6c6b5824e851da92173582.tar.gz gsoc2013-evolution-c85ad2279bcfc8e85e6c6b5824e851da92173582.tar.zst gsoc2013-evolution-c85ad2279bcfc8e85e6c6b5824e851da92173582.zip |
[Start implementing the new Search Bar design.]
* e-search-bar.c (init): Init various members to NULL.
(set_dropdown): Removed.
(add_dropdown): Removed.
(set_menu): New.
(add_menu_items): New.
(set_option): No need to setup the dropdown size here anymore.
(verb_cb): Function implementing the search menu verbs.
(update_bonobo_menus): New.
(e_search_bar_set_ui_component): New.
* e-search-bar.h: Remove the dropdown button stuff from struct
ESearchBar. Add `uic' and `items' members.
* e-filter-bar.c (e_filter_bar_new): Get a @uic arg.
* folder-browser-factory.c (control_activate): Set the UI
component on the search bar.
* gui/tasks-control.c (tasks_control_activate): Call
`e_tasks_set_ui_component()' here to give it the
BonoboUIComponent.
(tasks_control_deactivate): Likewise, call it here to unset the
BonoboUIComponent.
* gui/e-tasks.c (e_tasks_set_ui_component): New.
* gui/calendar-commands.c (calendar_control_activate): Call
gnome_calendar_set_ui_component() here.
(calendar_control_deactivate): ...And here, with a NULL
BonoboUIComponent.
* gui/gnome-cal.c (gnome_calendar_set_ui_component): New.
* gui/component/addressbook.c (control_activate): Call
`e_search_bar_set_ui_component()' to set the BonoboUIComponent for
the search bar.
* gui/component/GNOME_Evolution_Addressbook.oaf.in: Add an icon
for the LDAP sources configuration control.
svn path=/trunk/; revision=16178
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/calendar-commands.c | 7 | ||||
-rw-r--r-- | calendar/gui/calendar-commands.h | 4 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 15 | ||||
-rw-r--r-- | calendar/gui/e-tasks.h | 5 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 13 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.h | 4 | ||||
-rw-r--r-- | calendar/gui/tasks-control.c | 9 |
7 files changed, 49 insertions, 8 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 8eb6a540e8..4165760231 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -686,6 +686,8 @@ calendar_control_activate (BonoboControl *control, uic = bonobo_control_get_ui_component (control); g_assert (uic != NULL); + gnome_calendar_set_ui_component (gcal, uic); + remote_uih = bonobo_control_get_remote_ui_container (control); bonobo_ui_component_set_container (uic, remote_uih); bonobo_object_release_unref (remote_uih, NULL); @@ -735,10 +737,13 @@ void calendar_control_deactivate (BonoboControl *control, GnomeCalendar *gcal) { FocusData *focus; + BonoboUIComponent *uic; - BonoboUIComponent *uic = bonobo_control_get_ui_component (control); + uic = bonobo_control_get_ui_component (control); g_assert (uic != NULL); + gnome_calendar_set_ui_component (gcal, uic); + focus = gtk_object_get_data (GTK_OBJECT (control), "focus_data"); g_assert (focus != NULL); diff --git a/calendar/gui/calendar-commands.h b/calendar/gui/calendar-commands.h index 14a86365d9..0a20ba6c69 100644 --- a/calendar/gui/calendar-commands.h +++ b/calendar/gui/calendar-commands.h @@ -25,9 +25,11 @@ #ifndef CALENDAR_COMMANDS_H #define CALENDAR_COMMANDS_H -#include <bonobo/bonobo-control.h> #include "gnome-cal.h" +#include <bonobo/bonobo-control.h> +#include <bonobo/bonobo-ui-component.h> + /* This tells all the calendars to reload the config settings. */ void update_all_config_settings (void); diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index b9443a2875..d98bdfea9c 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -125,8 +125,6 @@ e_tasks_init (ETasks *tasks) priv->query = NULL; priv->view_instance = NULL; priv->view_menus = NULL; - - setup_widgets (tasks); } /* Callback used when the selection changes in the table. */ @@ -244,6 +242,8 @@ e_tasks_construct (ETasks *tasks) priv = tasks->priv; + setup_widgets (tasks); + priv->client = cal_client_new (); if (!priv->client) return NULL; @@ -281,6 +281,17 @@ e_tasks_new (void) } +void +e_tasks_set_ui_component (ETasks *tasks, + BonoboUIComponent *ui_component) +{ + g_return_if_fail (E_IS_TASKS (tasks)); + g_return_if_fail (ui_component == NULL || BONOBO_IS_UI_COMPONENT (ui_component)); + + e_search_bar_set_ui_component (E_SEARCH_BAR (tasks->priv->search_bar), ui_component); +} + + static void e_tasks_destroy (GtkObject *object) { diff --git a/calendar/gui/e-tasks.h b/calendar/gui/e-tasks.h index 102369b682..b88e495dcc 100644 --- a/calendar/gui/e-tasks.h +++ b/calendar/gui/e-tasks.h @@ -56,10 +56,13 @@ struct _ETasksClass { GtkType e_tasks_get_type (void); -GtkWidget *e_tasks_construct (ETasks *tasks); +GtkWidget *e_tasks_construct (ETasks *tasks); GtkWidget *e_tasks_new (void); +void e_tasks_set_ui_component (ETasks *tasks, + BonoboUIComponent *ui_component); + gboolean e_tasks_open (ETasks *tasks, char *file); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 9ff815211e..165f79c70a 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -910,7 +910,6 @@ gnome_calendar_init (GnomeCalendar *gcal) priv->current_view_type = GNOME_CAL_DAY_VIEW; priv->range_selected = FALSE; - setup_widgets (gcal); priv->dn_query = NULL; priv->sexp = g_strdup ("#t"); /* Match all */ @@ -1683,6 +1682,8 @@ gnome_calendar_construct (GnomeCalendar *gcal) priv = gcal->priv; + setup_widgets (gcal); + /* * Calendar Folder Client. */ @@ -1747,6 +1748,16 @@ gnome_calendar_new (void) return GTK_WIDGET (gcal); } +void +gnome_calendar_set_ui_component (GnomeCalendar *gcal, + BonoboUIComponent *ui_component) +{ + g_return_if_fail (GNOME_IS_CALENDAR (gcal)); + g_return_if_fail (ui_component == NULL || BONOBO_IS_UI_COMPONENT (ui_component)); + + e_search_bar_set_ui_component (E_SEARCH_BAR (gcal->priv->search_bar), ui_component); +} + /** * gnome_calendar_get_cal_client: * @gcal: A calendar view. diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h index 2c4eaaf0af..8a888420dc 100644 --- a/calendar/gui/gnome-cal.h +++ b/calendar/gui/gnome-cal.h @@ -31,6 +31,7 @@ #include <bonobo/bonobo-ui-component.h> #include <widgets/misc/e-calendar.h> #include <cal-client/cal-client.h> + #include "e-calendar-table.h" BEGIN_GNOME_DECLS @@ -82,6 +83,9 @@ GtkWidget *gnome_calendar_construct (GnomeCalendar *gcal); GtkWidget *gnome_calendar_new (void); +void gnome_calendar_set_ui_component (GnomeCalendar *cal, + BonoboUIComponent *ui_component); + ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal); CalClient *gnome_calendar_get_cal_client (GnomeCalendar *gcal); diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c index 6ae2a45565..53e3eb239f 100644 --- a/calendar/gui/tasks-control.c +++ b/calendar/gui/tasks-control.c @@ -101,7 +101,7 @@ static void tasks_control_print_preview_cmd (BonoboUIComponent *uic, BonoboControl * -tasks_control_new (void) +tasks_control_new (void) { BonoboControl *control; GtkWidget *tasks; @@ -109,11 +109,11 @@ tasks_control_new (void) tasks = e_tasks_new (); if (!tasks) return NULL; - gtk_widget_show (tasks); control = bonobo_control_new (tasks); if (!control) { + gtk_widget_destroy (tasks); g_message ("control_factory_fn(): could not create the control!"); return NULL; } @@ -303,6 +303,8 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks) uic = bonobo_control_get_ui_component (control); g_assert (uic != NULL); + e_tasks_set_ui_component (tasks, uic); + remote_uih = bonobo_control_get_remote_ui_container (control); bonobo_ui_component_set_container (uic, remote_uih); bonobo_object_release_unref (remote_uih, NULL); @@ -347,8 +349,11 @@ static void tasks_control_deactivate (BonoboControl *control, ETasks *tasks) { BonoboUIComponent *uic = bonobo_control_get_ui_component (control); + g_assert (uic != NULL); + e_tasks_set_ui_component (tasks, NULL); + e_tasks_discard_view_menus (tasks); /* Stop monitoring the "selection_changed" signal */ |