aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <mmeeks@src.gnome.org>2000-09-14 07:40:42 +0800
committerMichael Meeks <mmeeks@src.gnome.org>2000-09-14 07:40:42 +0800
commit9964204c9c080650f79863a483a4c42886d55239 (patch)
tree3c0693385a73461319ab94b63fb15cbe80ae88e5
parent5678a57e33c55ab2622a3fbb823b42e4f80c31cc (diff)
downloadgsoc2013-evolution-9964204c9c080650f79863a483a4c42886d55239.tar
gsoc2013-evolution-9964204c9c080650f79863a483a4c42886d55239.tar.gz
gsoc2013-evolution-9964204c9c080650f79863a483a4c42886d55239.tar.bz2
gsoc2013-evolution-9964204c9c080650f79863a483a4c42886d55239.tar.lz
gsoc2013-evolution-9964204c9c080650f79863a483a4c42886d55239.tar.xz
gsoc2013-evolution-9964204c9c080650f79863a483a4c42886d55239.tar.zst
gsoc2013-evolution-9964204c9c080650f79863a483a4c42886d55239.zip
The Commit from hell that breaks all UI related stuff;
Anything UI related that breaks is now my fault; apologies in advance. svn path=/trunk/; revision=5415
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.am1
-rw-r--r--addressbook/ChangeLog4
-rw-r--r--addressbook/gui/component/addressbook.c153
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gui/calendar-commands.c155
-rw-r--r--calendar/gui/dialogs/task-editor.c28
-rw-r--r--calendar/gui/event-editor.c36
-rw-r--r--composer/ChangeLog4
-rw-r--r--composer/e-msg-composer.c16
-rw-r--r--composer/e-msg-composer.h4
-rw-r--r--configure.in15
-rw-r--r--doc/ChangeLog7
-rw-r--r--help/ChangeLog7
-rw-r--r--libical/src/libical/icalyacc.c28
-rw-r--r--mail/folder-browser-factory.c303
-rw-r--r--shell/ChangeLog26
-rw-r--r--shell/e-shell-view-menu.c309
-rw-r--r--shell/e-shell-view.c101
-rw-r--r--shell/e-shell-view.h11
-rw-r--r--shell/e-shell.c34
-rw-r--r--shell/e-shell.h16
-rw-r--r--shell/e-storage-set-view.c2
-rw-r--r--shell/main.c2
-rw-r--r--ui/evolution-addressbook.xml4
-rw-r--r--ui/evolution-calendar.xml2
-rw-r--r--ui/evolution-mail.xml2
-rw-r--r--ui/evolution.xml2
28 files changed, 500 insertions, 780 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f4271646a..5470702946 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-07 Michael Meeks <michael@helixcode.com>
+
+ * configure.in: Require Bonobo 0.19
+
2000-09-13 Christopher James Lahey <clahey@helixcode.com>
* configure.in: Added widgets/e-reflow/Makefile. Replaced
diff --git a/Makefile.am b/Makefile.am
index 0aa8f77438..3ab0d6962d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,6 +37,7 @@ SUBDIRS = \
calendar \
wombat \
art \
+ ui \
default_user \
tools \
po \
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 28a7e9e832..0b5ec88640 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-07 Michael Meeks <michael@helixcode.com>
+
+ * gui/component/addressbook.c: Radicaly update UI handler code.
+
2000-09-13 Christopher James Lahey <clahey@helixcode.com>
* gui/widgets/*, gui/minicard/*: Moved gui/minicard to
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index aca565e756..e7cc317c8e 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -73,20 +73,13 @@ static void change_view_type (AddressbookView *view, AddressbookViewType view_ty
static void
control_deactivate (BonoboControl *control, BonoboUIHandler *uih)
{
- /* how to remove a menu item */
- bonobo_ui_handler_menu_remove (uih, "/File/<Print Placeholder>/Print contacts...");
- bonobo_ui_handler_menu_remove (uih, "/File/<Print Placeholder>/separator1");
- bonobo_ui_handler_menu_remove (uih, "/File/TestSelectNames");
- bonobo_ui_handler_menu_remove (uih, "/View/<sep>");
- bonobo_ui_handler_menu_remove (uih, "/View/Toggle View");
- bonobo_ui_handler_menu_remove (uih, "/Actions/New Contact");
-#ifdef HAVE_LDAP
- bonobo_ui_handler_menu_remove (uih, "/Actions/New Directory Server");
-#endif
- bonobo_ui_handler_menu_remove (uih, "/<Component Placeholder>/Tools");
- bonobo_ui_handler_menu_remove (uih, "/<Component Placeholder>/Tools/Search");
- /* remove our toolbar */
- bonobo_ui_handler_dock_remove (uih, "/Toolbar");
+ Bonobo_UIContainer container = bonobo_ui_compat_get_container (uih);
+
+ g_return_if_fail (container != CORBA_OBJECT_NIL);
+
+ bonobo_ui_component_rm (
+ bonobo_ui_compat_get_component (uih),
+ container, "/", NULL);
}
static void
@@ -433,19 +426,6 @@ print_cb (BonoboUIHandler *uih, void *user_data, const char *path)
}
}
-static GnomeUIInfo gnome_toolbar [] = {
- GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new contact"), new_contact_cb, GNOME_STOCK_PIXMAP_NEW),
-
- GNOMEUIINFO_SEPARATOR,
-
- GNOMEUIINFO_ITEM_STOCK (N_("Find"), N_("Find a contact"), search_cb, GNOME_STOCK_PIXMAP_SEARCH),
- GNOMEUIINFO_ITEM_STOCK (N_("Print"), N_("Print contacts"), print_cb, GNOME_STOCK_PIXMAP_PRINT),
- GNOMEUIINFO_ITEM_STOCK (N_("Delete"), N_("Delete a contact"), delete_contact_cb, GNOME_STOCK_PIXMAP_TRASH),
- GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_END
-};
-
-
static void
search_entry_activated (GtkWidget* widget, gpointer user_data)
{
@@ -491,47 +471,38 @@ make_quick_search_widget (GtkSignalFunc start_search_func,
return search_vbox;
}
+BonoboUIVerb verbs [] = {
+ BONOBO_UI_VERB ("ContactsPrint", print_cb),
+ BONOBO_UI_VERB ("ViewAsTable", toggle_view_as_cb),
+ BONOBO_UI_VERB ("ViewNewContact", new_contact_cb),
+ BONOBO_UI_VERB ("ToolSearch", search_cb),
+
+ BONOBO_UI_VERB ("ContactNew", new_contact_cb),
+/* BONOBO_UI_VERB ("ContactFind", find_contact_cb),*/
+ BONOBO_UI_VERB ("ContactDelete", delete_contact_cb),
+
+ BONOBO_UI_VERB_END
+};
+
static void
control_activate (BonoboControl *control, BonoboUIHandler *uih,
AddressbookView *view)
{
Bonobo_UIHandler remote_uih;
- GtkWidget *toolbar, *toolbar_frame;
- BonoboControl *toolbar_control;
- GnomeDockItemBehavior behavior;
- GtkWidget *hbox = gtk_hbox_new (FALSE, 0);
+ char *fname;
+ xmlNode *ui;
+ Bonobo_UIContainer container;
+ BonoboUIComponent *component;
GtkWidget *quick_search_widget;
+ BonoboControl *search_control;
remote_uih = bonobo_control_get_remote_ui_handler (control);
bonobo_ui_handler_set_container (uih, remote_uih);
bonobo_object_release_unref (remote_uih, NULL);
- bonobo_ui_handler_menu_new_separator (uih, "/View/<sep>", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/File/<Print Placeholder>/Print contacts...",
- N_("_Print Contacts..."),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_STOCK,
- GNOME_STOCK_MENU_PRINT,
- 0, 0, print_cb,
- (gpointer) view);
-
- bonobo_ui_handler_menu_new_separator (uih, "/File/<Print Placeholder>/separator1", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/View/Toggle View",
- N_("As _Table"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0, toggle_view_as_cb,
- (gpointer)view);
-
- bonobo_ui_handler_menu_new_item (uih, "/Actions/New Contact",
- N_("_New Contact"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0, new_contact_cb,
- (gpointer)view);
+#warning FIXME; this needs to be sorted.
+#if 0
#ifdef HAVE_LDAP
bonobo_ui_handler_menu_new_item (uih, "/Actions/New Directory Server",
N_("N_ew Directory Server"),
@@ -540,58 +511,40 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
0, 0, new_server_cb,
(gpointer)view);
#endif
+#endif
- bonobo_ui_handler_menu_new_subtree (uih, "/<Component Placeholder>/Tools",
- _("_Tools"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0);
-
- bonobo_ui_handler_menu_new_item (uih, "/<Component Placeholder>/Tools/Search",
- N_("_Search for contacts"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_STOCK, GNOME_STOCK_MENU_SEARCH,
- 0, 0, search_cb,
- (gpointer)view);
-
- toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,
- GTK_TOOLBAR_BOTH);
-
- gnome_app_fill_toolbar_with_data (GTK_TOOLBAR (toolbar),
- gnome_toolbar,
- NULL, view);
+ component = bonobo_ui_compat_get_component (uih);
- gtk_box_pack_start (GTK_BOX (hbox), toolbar, FALSE, TRUE, 0);
-
-
- /* add the search_vbox to the hbox which will be our toolbar */
- quick_search_widget = make_quick_search_widget (
- search_entry_activated, view);
+ bonobo_ui_component_add_verb_list_with_data (
+ component, verbs, view);
- gtk_box_pack_start (GTK_BOX (hbox),
- quick_search_widget,
- FALSE, TRUE, 0);
+ container = bonobo_ui_compat_get_container (uih);
+ g_return_if_fail (container != CORBA_OBJECT_NIL);
+
+ bonobo_ui_container_freeze (container, NULL);
- gtk_widget_show_all (hbox);
+ fname = bonobo_ui_util_get_ui_fname ("evolution-addressbook.xml");
+ g_warning ("Attempting ui load from '%s'", fname);
+
+ ui = bonobo_ui_util_new_ui (component, fname, "evolution-addressbook");
+
+ bonobo_ui_component_set_tree (component, container, "/", ui, NULL);
- toolbar_frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (toolbar_frame), GTK_SHADOW_OUT);
- gtk_container_add (GTK_CONTAINER (toolbar_frame), hbox);
- gtk_widget_show (toolbar_frame);
+ g_free (fname);
+ xmlFreeNode (ui);
- gtk_widget_show_all (toolbar_frame);
+ quick_search_widget = make_quick_search_widget (
+ search_entry_activated, view);
+
+ gtk_widget_show_all (quick_search_widget);
+ search_control = bonobo_control_new (quick_search_widget);
- behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE;
- if (!gnome_preferences_get_toolbar_detachable ())
- behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
+ bonobo_ui_container_object_set (
+ container, "/Toolbar/QuickSearch",
+ bonobo_object_corba_objref (BONOBO_OBJECT (search_control)),
+ NULL);
- toolbar_control = bonobo_control_new (toolbar_frame);
- bonobo_ui_handler_dock_add (
- uih, "/Toolbar",
- bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)),
- behavior,
- GNOME_DOCK_TOP,
- 1, 1, 0);
+ bonobo_ui_container_thaw (container, NULL);
}
static void
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f497d96d65..ea084d444d 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-07 Michael Meeks <michael@helixcode.com>
+
+ * gui/calendar-commands.c: Re-write most UI handler code.
+
2000-09-13 Federico Mena Quintero <federico@helixcode.com>
* gui/calendar-model.c (obj_updated_cb): Removed an unused
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 40928530af..9f9b58aa7f 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -478,6 +478,8 @@ properties_cmd (BonoboUIHandler *uih, void *user_data, const char *path)
}
+#warning FIXME: reinstate this when radiobuttons are implemented
+#if 0
/* Note: if the order of these is changed, make sure you change the indices
used to access the widgets in calendar_control_activate(). */
static GnomeUIInfo gnome_toolbar_view_buttons [] = {
@@ -500,80 +502,42 @@ static GnomeUIInfo gnome_toolbar_view_buttons [] = {
#endif
GNOMEUIINFO_END
};
+#endif
-
-static GnomeUIInfo calendar_toolbar [] = {
- GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new appointment"),
- new_appointment_cb, GNOME_STOCK_PIXMAP_NEW),
-
- GNOMEUIINFO_SEPARATOR,
-
- GNOMEUIINFO_ITEM_STOCK (N_("Print"), N_("Print this calendar"), tb_print_cb, GNOME_STOCK_PIXMAP_PRINT),
-
- GNOMEUIINFO_SEPARATOR,
-
- GNOMEUIINFO_ITEM_STOCK (N_("Prev"), N_("Go back in time"), previous_clicked, GNOME_STOCK_PIXMAP_BACK),
- GNOMEUIINFO_ITEM_STOCK (N_("Today"), N_("Go to present time"), today_clicked, GNOME_STOCK_PIXMAP_HOME),
- GNOMEUIINFO_ITEM_STOCK (N_("Next"), N_("Go forward in time"), next_clicked, GNOME_STOCK_PIXMAP_FORWARD),
-
- GNOMEUIINFO_SEPARATOR,
-
- GNOMEUIINFO_ITEM_STOCK (N_("Go to"), N_("Go to a specific date"), goto_clicked, GNOME_STOCK_PIXMAP_JUMP_TO),
-
- GNOMEUIINFO_SEPARATOR,
-
- GNOMEUIINFO_RADIOLIST (gnome_toolbar_view_buttons),
-
- GNOMEUIINFO_END
+BonoboUIVerb verbs [] = {
+ BONOBO_UI_VERB ("CalendarNew", new_calendar_cmd),
+ BONOBO_UI_VERB ("CalendarOpen", open_calendar_cmd),
+ BONOBO_UI_VERB ("CalendarSaveAs", save_as_calendar_cmd),
+ BONOBO_UI_VERB ("CalendarPrint", file_print_cb),
+ BONOBO_UI_VERB ("EditNewAppointment", new_appointment_cb),
+ BONOBO_UI_VERB ("CalendarPreferences", properties_cmd),
+ BONOBO_UI_VERB ("AboutCalendar", about_calendar_cmd),
+
+ BONOBO_UI_VERB ("CalendarPrev", previous_clicked),
+ BONOBO_UI_VERB ("CalendarToday", today_clicked),
+ BONOBO_UI_VERB ("CalendarNext", next_clicked),
+ BONOBO_UI_VERB ("CalendarGoto", goto_clicked),
+
+ BONOBO_UI_VERB_END
};
-
-
-/* Performs signal connection as appropriate for interpreters or native bindings */
-static void
-do_ui_signal_connect (GnomeUIInfo *uiinfo, gchar *signal_name,
- GnomeUIBuilderData *uibdata)
-{
- if (uibdata->is_interp)
- gtk_signal_connect_full (GTK_OBJECT (uiinfo->widget),
- signal_name, NULL, uibdata->relay_func,
- uibdata->data ?
- uibdata->data : uiinfo->user_data,
- uibdata->destroy_func, FALSE, FALSE);
-
- else if (uiinfo->moreinfo)
- gtk_signal_connect (GTK_OBJECT (uiinfo->widget),
- signal_name, uiinfo->moreinfo, uibdata->data ?
- uibdata->data : uiinfo->user_data);
-}
-
-
void
calendar_control_activate (BonoboControl *control,
GnomeCalendar *cal)
{
- Bonobo_UIHandler remote_uih;
- GtkWidget *toolbar, *toolbar_frame;
- BonoboControl *toolbar_control;
- GnomeUIBuilderData uibdata;
+ Bonobo_UIHandler remote_uih;
BonoboUIHandler *uih;
- int behavior;
uih = bonobo_control_get_ui_handler (control);
g_assert (uih != NULL);
- uibdata.connect_func = do_ui_signal_connect;
- uibdata.data = cal;
- uibdata.is_interp = FALSE;
- uibdata.relay_func = NULL;
- uibdata.destroy_func = NULL;
-
g_print ("In calendar_control_activate\n");
remote_uih = bonobo_control_get_remote_ui_handler (control);
bonobo_ui_handler_set_container (uih, remote_uih);
bonobo_object_release_unref (remote_uih, NULL);
+#if 0
toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,
GTK_TOOLBAR_BOTH);
gnome_app_fill_toolbar_custom (GTK_TOOLBAR (toolbar),
@@ -614,52 +578,31 @@ calendar_control_activate (BonoboControl *control,
behavior,
GNOME_DOCK_TOP,
1, 1, 0);
-
- /* file menu */
- bonobo_ui_handler_menu_new_item (uih, "/File/New/Calendar", N_("New Ca_lendar"),
- N_("Create a new calendar"),
- -1, BONOBO_UI_HANDLER_PIXMAP_NONE,
- NULL, 0, 0, new_calendar_cmd, cal);
- bonobo_ui_handler_menu_new_item (uih, "/File/Open/Calendar", N_("Open Ca_lendar"),
- N_("Open a calendar"), -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0, open_calendar_cmd, cal);
- bonobo_ui_handler_menu_new_item (uih, "/File/Save Calendar As",
- N_("Save Calendar As"),
- N_("Save Calendar As"),
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0, save_as_calendar_cmd, cal);
- bonobo_ui_handler_menu_new_item (uih, "/File/Print", N_("Print..."),
- N_("Print this calendar"), -1,
- BONOBO_UI_HANDLER_PIXMAP_STOCK,
- GNOME_STOCK_PIXMAP_PRINT,
- 'p', GDK_CONTROL_MASK,
- file_print_cb, cal);
-
- /* edit menu */
- bonobo_ui_handler_menu_new_item (uih, "/Edit/New Appointment",
- N_("_New appointment..."), N_("Create a new appointment"),
- -1, BONOBO_UI_HANDLER_PIXMAP_STOCK,
- GNOME_STOCK_MENU_NEW, 0, 0,
- new_appointment_cb, cal);
-
- //bonobo_ui_handler_menu_new_separator (uih, "/Edit", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/Edit/Preferences",
- N_("Preferences"), N_("Preferences"),
- -1, BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0, properties_cmd, cal);
- /* help menu */
-
- bonobo_ui_handler_menu_new_item (uih,
- "/Help/About Calendar",
- N_("About Calendar"),
- N_("About Calendar"),
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0, about_calendar_cmd, cal);
-
+#endif
+
+ { /* FIXME: sweeten this whole function */
+ char *fname;
+ xmlNode *ui;
+ Bonobo_UIContainer container;
+ BonoboUIComponent *component;
+
+ component = bonobo_ui_compat_get_component (uih);
+ bonobo_ui_component_add_verb_list_with_data (
+ component, verbs, cal);
+
+ container = bonobo_ui_compat_get_container (uih);
+ g_return_if_fail (container != CORBA_OBJECT_NIL);
+
+ fname = bonobo_ui_util_get_ui_fname ("evolution-calendar.xml");
+ g_warning ("Attempting ui load from '%s'", fname);
+
+ ui = bonobo_ui_util_new_ui (component, fname, "evolution-calendar");
+
+ bonobo_ui_component_set_tree (component, container, "/", ui, NULL);
+
+ g_free (fname);
+ xmlFreeNode (ui);
+ }
}
@@ -671,7 +614,10 @@ calendar_control_deactivate (BonoboControl *control)
g_print ("In calendar_control_deactivate\n");
- bonobo_ui_handler_dock_remove (uih, "/Toolbar");
+ bonobo_ui_component_rm (
+ bonobo_ui_compat_get_component (uih),
+ bonobo_ui_compat_get_container (uih), "/", NULL);
+
bonobo_ui_handler_unset_container (uih);
}
@@ -692,6 +638,7 @@ new_calendar (char *full_name, char *geometry, gboolean hidden)
GtkWidget *toplevel;
int xpos, ypos, width, height;
+
toplevel = gnome_calendar_new ();
if (gnome_parse_geometry (geometry, &xpos, &ypos, &width, &height)) {
@@ -764,7 +711,7 @@ init_calendar (void)
am_pm_flag = gnome_config_get_bool ("/calendar/Calendar/AM PM flag=0");
week_starts_on_monday = gnome_config_get_bool ("/calendar/Calendar/Week starts on Monday=0");
- if (day_end < day_begin){
+ if (day_end < day_begin) {
day_begin = 8;
day_end = 17;
}
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 240d1a5010..08d76a14be 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -228,6 +228,7 @@ TaskEditor *
task_editor_construct (TaskEditor *tedit)
{
TaskEditorPrivate *priv;
+ GtkWidget *bonobo_win;
g_return_val_if_fail (tedit != NULL, NULL);
g_return_val_if_fail (IS_TASK_EDITOR (tedit), NULL);
@@ -257,7 +258,26 @@ task_editor_construct (TaskEditor *tedit)
goto error;
}
- bonobo_ui_handler_set_app (priv->uih, GNOME_APP (priv->app));
+ bonobo_win = bonobo_win_new ("event-editor-dialog", "Event Editor");
+
+ /* FIXME: The sucking bit */
+ {
+ GtkWidget *contents;
+
+ contents = gnome_dock_get_client_area (
+ GNOME_DOCK (GNOME_APP (priv->app)->dock));
+ if (!contents) {
+ g_message ("event_editor_construct(): Could not get contents");
+ goto error;
+ }
+ gtk_widget_ref (contents);
+ gtk_container_remove (GTK_CONTAINER (contents->parent), contents);
+ bonobo_win_set_contents (BONOBO_WIN (bonobo_win), contents);
+ gtk_widget_destroy (priv->app);
+ priv->app = GTK_WIDGET (bonobo_win);
+ }
+
+ bonobo_ui_handler_set_app (priv->uih, BONOBO_WIN (priv->app));
create_menu (tedit);
create_toolbar (tedit);
@@ -655,9 +675,11 @@ create_toolbar (TaskEditor *tedit)
bonobo_ui_handler_create_toolbar (priv->uih, "Toolbar");
+#warning This should be converted to xml.
+#if 0
/* Fetch the toolbar. What a pain in the ass. */
- dock_item = gnome_app_get_dock_item_by_name (GNOME_APP (priv->app), GNOME_APP_TOOLBAR_NAME);
+ dock_item = bonobo_win_get_dock_item_by_name (BONOBO_WIN (priv->app), BONOBO_WIN_TOOLBAR_NAME);
g_assert (dock_item != NULL);
toolbar_child = gnome_dock_item_get_child (dock_item);
@@ -665,7 +687,7 @@ create_toolbar (TaskEditor *tedit)
/* Turn off labels as GtkToolbar sucks */
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar_child), GTK_TOOLBAR_ICONS);
-
+#endif
list = bonobo_ui_handler_toolbar_parse_uiinfo_list_with_data (toolbar,
tedit);
bonobo_ui_handler_toolbar_add_list (priv->uih, "/Toolbar", list);
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
index 452399c836..3f6efd1bb0 100644
--- a/calendar/gui/event-editor.c
+++ b/calendar/gui/event-editor.c
@@ -1394,24 +1394,10 @@ create_toolbar (EventEditor *ee)
{
EventEditorPrivate *priv;
BonoboUIHandlerToolbarItem *list;
- GnomeDockItem *dock_item;
- GtkWidget *toolbar_child;
priv = ee->priv;
bonobo_ui_handler_create_toolbar (priv->uih, "Toolbar");
-
- /* Fetch the toolbar. What a pain in the ass. */
-
- dock_item = gnome_app_get_dock_item_by_name (GNOME_APP (priv->app), GNOME_APP_TOOLBAR_NAME);
- g_assert (dock_item != NULL);
-
- toolbar_child = gnome_dock_item_get_child (dock_item);
- g_assert (toolbar_child != NULL && GTK_IS_TOOLBAR (toolbar_child));
-
- /* Turn off labels as GtkToolbar sucks */
- gtk_toolbar_set_style (GTK_TOOLBAR (toolbar_child), GTK_TOOLBAR_ICONS);
-
list = bonobo_ui_handler_toolbar_parse_uiinfo_list_with_data (toolbar, ee);
bonobo_ui_handler_toolbar_add_list (priv->uih, "/Toolbar", list);
}
@@ -1446,6 +1432,7 @@ EventEditor *
event_editor_construct (EventEditor *ee)
{
EventEditorPrivate *priv;
+ GtkWidget *bonobo_win;
g_return_val_if_fail (ee != NULL, NULL);
g_return_val_if_fail (IS_EVENT_EDITOR (ee), NULL);
@@ -1468,6 +1455,24 @@ event_editor_construct (EventEditor *ee)
init_widgets (ee);
/* Construct the app */
+ bonobo_win = bonobo_win_new ("event-editor-dialog", "Event Editor");
+
+ /* FIXME: The sucking bit */
+ {
+ GtkWidget *contents;
+
+ contents = gnome_dock_get_client_area (
+ GNOME_DOCK (GNOME_APP (priv->app)->dock));
+ if (!contents) {
+ g_message ("event_editor_construct(): Could not get contents");
+ goto error;
+ }
+ gtk_widget_ref (contents);
+ gtk_container_remove (GTK_CONTAINER (contents->parent), contents);
+ bonobo_win_set_contents (BONOBO_WIN (bonobo_win), contents);
+ gtk_widget_destroy (priv->app);
+ priv->app = bonobo_win;
+ }
priv->uih = bonobo_ui_handler_new ();
if (!priv->uih) {
@@ -1475,7 +1480,7 @@ event_editor_construct (EventEditor *ee)
goto error;
}
- bonobo_ui_handler_set_app (priv->uih, GNOME_APP (priv->app));
+ bonobo_ui_handler_set_app (priv->uih, BONOBO_WIN (priv->app));
create_menu (ee);
create_toolbar (ee);
@@ -1791,7 +1796,6 @@ set_all_day (GtkWidget *toggle, EventEditor *ee)
e_date_edit_set_show_time (E_DATE_EDIT (priv->start_time), !all_day);
e_date_edit_set_show_time (E_DATE_EDIT (priv->end_time), !all_day);
-
e_date_edit_set_time (E_DATE_EDIT (priv->end_time), mktime (&end_tm));
}
diff --git a/composer/ChangeLog b/composer/ChangeLog
index e8449a78cb..da83b8e86c 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-12 Michael Meeks <michael@helixcode.com>
+
+ * e-msg-composer.c: Update for new UI handler.
+
2000-09-12 Larry Ewing <lewing@helixcode.com>
* e-msg-composer-attachment-bar.c (add_common): add a make sure
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 4fa523e8d3..f58bcc3128 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -84,8 +84,10 @@ create_editor (EMsgComposer *composer)
{
GtkWidget *control;
- control = bonobo_widget_new_control (HTML_EDITOR_CONTROL_ID,
- bonobo_object_corba_objref (BONOBO_OBJECT (composer->uih)));
+ control = bonobo_widget_new_control (
+ HTML_EDITOR_CONTROL_ID,
+ bonobo_ui_compat_get_container (composer->uih));
+
if (control == NULL) {
g_error ("Cannot activate `%s'. Did you build gtkhtml with Bonobo and OAF support?", HTML_EDITOR_CONTROL_ID);
return NULL;
@@ -1189,7 +1191,7 @@ class_init (EMsgComposerClass *klass)
widget_class->delete_event = delete_event;
- parent_class = gtk_type_class (gnome_app_get_type ());
+ parent_class = gtk_type_class (bonobo_win_get_type ());
signals[SEND] =
gtk_signal_new ("send",
@@ -1251,7 +1253,7 @@ e_msg_composer_get_type (void)
(GtkClassInitFunc) NULL,
};
- type = gtk_type_unique (gnome_app_get_type (), &info);
+ type = gtk_type_unique (bonobo_win_get_type (), &info);
}
return type;
@@ -1274,11 +1276,11 @@ e_msg_composer_construct (EMsgComposer *composer)
gtk_window_set_default_size (GTK_WINDOW (composer),
DEFAULT_WIDTH, DEFAULT_HEIGHT);
- gnome_app_construct (GNOME_APP (composer), "e-msg-composer",
+ bonobo_win_construct (BONOBO_WIN (composer), "e-msg-composer",
_("Compose a message"));
composer->uih = bonobo_ui_handler_new ();
- bonobo_ui_handler_set_app (composer->uih, GNOME_APP (composer));
+ bonobo_ui_handler_set_app (composer->uih, BONOBO_WIN (composer));
vbox = gtk_vbox_new (FALSE, 0);
@@ -1323,7 +1325,7 @@ e_msg_composer_construct (EMsgComposer *composer)
gtk_signal_connect (GTK_OBJECT (composer->attachment_bar), "changed",
GTK_SIGNAL_FUNC (attachment_bar_changed_cb), composer);
- gnome_app_set_contents (GNOME_APP (composer), vbox);
+ bonobo_win_set_contents (BONOBO_WIN (composer), vbox);
gtk_widget_show (vbox);
e_msg_composer_show_attachments (composer, FALSE);
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 8f8bf97c14..8903889260 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -47,7 +47,7 @@ typedef struct _EMsgComposer EMsgComposer;
typedef struct _EMsgComposerClass EMsgComposerClass;
struct _EMsgComposer {
- GnomeApp parent;
+ BonoboWin parent;
BonoboUIHandler *uih;
@@ -71,7 +71,7 @@ struct _EMsgComposer {
};
struct _EMsgComposerClass {
- GnomeAppClass parent_class;
+ BonoboWinClass parent_class;
void (* send) (EMsgComposer *composer);
void (* postpone) (EMsgComposer *composer);
diff --git a/configure.in b/configure.in
index 738686d35c..a5dd0b5b1c 100644
--- a/configure.in
+++ b/configure.in
@@ -210,11 +210,11 @@ AC_SUBST(GNOME_PRINT_CFLAGS)
dnl ******************************
dnl Check for Bonobo
dnl ******************************
-AC_MSG_CHECKING(for Bonobo >= 0.17)
+AC_MSG_CHECKING(for Bonobo >= 0.19)
if gnome-config --libs bonobox > /dev/null 2>&1; then
vers=`gnome-config --modversion bonobo | sed -e "s/bonobo-//" | \
awk 'BEGIN { FS = "."; } { printf "%d", $1 * 1000 + $2;}'`
- if test "$vers" -ge 17; then
+ if test "$vers" -ge 19; then
bonobo_ok=true
else
bonobo_ok=false
@@ -226,7 +226,7 @@ fi
if $bonobo_ok; then
AC_MSG_RESULT($vers found)
else
- AC_MSG_ERROR(Bonobo newer than 0.17 is required to compile Evolution)
+ AC_MSG_ERROR(Bonobo newer than 0.18 is required to compile Evolution)
fi
dnl ******************************
@@ -293,13 +293,13 @@ AC_SUBST(EXTRA_GNOME_LIBS)
AC_SUBST(EXTRA_GNOME_CFLAGS)
-BONOBO_GNOME_LIBS="`gnome-config --libs bonobox libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $UNICODE_LIBS $OAF_LIBS"
-BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobox libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $UNICODE_CFLAGS $OAF_CFLAGS"
+BONOBO_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $UNICODE_LIBS $OAF_LIBS"
+BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $UNICODE_CFLAGS $OAF_CFLAGS"
AC_SUBST(BONOBO_GNOME_LIBS)
AC_SUBST(BONOBO_GNOME_CFLAGS)
-BONOBO_HTML_GNOME_LIBS="`gnome-config --libs bonobox libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS $UNICODE_LIBS"
-BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobox libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS $UNICODE_CFLAGS"
+BONOBO_HTML_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS $UNICODE_LIBS"
+BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS $UNICODE_CFLAGS"
AC_SUBST(BONOBO_HTML_GNOME_LIBS)
AC_SUBST(BONOBO_HTML_GNOME_CFLAGS)
@@ -610,6 +610,7 @@ calendar/conduits/todo/Makefile
filter/Makefile
wombat/Makefile
art/Makefile
+ui/Makefile
default_user/Makefile
default_user/local/Makefile
default_user/local/Calendar/Makefile
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 15f46d074b..3eeeb169f4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -195,34 +195,27 @@
especially wrt HTML mail.
-<<<<<<< ChangeLog
2000-06-15 Aaron Weber <aaron@helixcode.com>
* C/usage-contact.sgml: Category stuff improved.
* C/usage-calendar.sgml: Now covers how to add an event properly.
-=======
-=======
-=======
2000-07-17 Federico Mena Quintero <federico@helixcode.com>
* Makefile.am (SUBDIRS): Added the devel directory.
->>>>>>> 1.15
2000-06-28 Peter Williams <peterw@curious-george.helixcode.com>
* C/Makefile.am (SGML_FILES): Don't depend on the newly-removed
devel-*.sgml files.
->>>>>>> 1.13
2000-06-16 Damon Chaplin <damon@helixcode.com>
* C/.cvsignore: added evolution-guide and evolution-guide.junk
so we don't get the '? doc/C/evolution-guide' messages each time we
do a cvs update.
->>>>>>> 1.12
2000-06-14 Aaron Weber <aaron@helixcode.com>
* C/usage-mainwindow.sgml: added sect on menubar, other minor changes.
diff --git a/help/ChangeLog b/help/ChangeLog
index 15f46d074b..3eeeb169f4 100644
--- a/help/ChangeLog
+++ b/help/ChangeLog
@@ -195,34 +195,27 @@
especially wrt HTML mail.
-<<<<<<< ChangeLog
2000-06-15 Aaron Weber <aaron@helixcode.com>
* C/usage-contact.sgml: Category stuff improved.
* C/usage-calendar.sgml: Now covers how to add an event properly.
-=======
-=======
-=======
2000-07-17 Federico Mena Quintero <federico@helixcode.com>
* Makefile.am (SUBDIRS): Added the devel directory.
->>>>>>> 1.15
2000-06-28 Peter Williams <peterw@curious-george.helixcode.com>
* C/Makefile.am (SGML_FILES): Don't depend on the newly-removed
devel-*.sgml files.
->>>>>>> 1.13
2000-06-16 Damon Chaplin <damon@helixcode.com>
* C/.cvsignore: added evolution-guide and evolution-guide.junk
so we don't get the '? doc/C/evolution-guide' messages each time we
do a cvs update.
->>>>>>> 1.12
2000-06-14 Aaron Weber <aaron@helixcode.com>
* C/usage-mainwindow.sgml: added sect on menubar, other minor changes.
diff --git a/libical/src/libical/icalyacc.c b/libical/src/libical/icalyacc.c
index 04999747db..9c8ba8b6fb 100644
--- a/libical/src/libical/icalyacc.c
+++ b/libical/src/libical/icalyacc.c
@@ -145,19 +145,20 @@
$Id$
$Locker$
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
+ (C) COPYRIGHT 1999 Eric Busboom
+ http://www.softwarestudio.org
+
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+
+ The original author is Eric Busboom
The original code is icalitip.y
@@ -1689,6 +1690,7 @@ void clear_recur()
skippos = 0;
icalrecurrencetype_clear(&recur);
+ recur.week_start = ICAL_MONDAY_WEEKDAY;
}
void copy_list(short* array, size_t size)
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index be5d7e1373..f38e38e048 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -41,10 +41,10 @@ register_ondemand (RuleContext *f, FilterRule *rule, gpointer data)
oc = g_new (struct fb_ondemand_closure, 1);
oc->rule = rule;
oc->fb = fb;
- oc->path = g_strdup_printf ("/<Component Placeholder>/Folder/Filter-%s", rule->name);
+ oc->path = g_strdup_printf ("/*Component Placeholder*/Folder/Filter-%s", rule->name);
if (fb->filter_menu_paths == NULL)
- bonobo_ui_handler_menu_new_separator (uih, "/<Component Placeholder>/Folder/separator1", -1);
+ bonobo_ui_handler_menu_new_separator (uih, "/*Component Placeholder*/Folder/separator1", -1);
text = g_strdup_printf (_("Run filter \"%s\""), rule->name);
fb->filter_menu_paths = g_slist_prepend (fb->filter_menu_paths, oc);
@@ -72,19 +72,53 @@ create_ondemand_hooks (FolderBrowser *fb, BonoboUIHandler *uih)
g_free (user);
}
-static void
-remove_ondemand_hooks (FolderBrowser *fb, BonoboUIHandler *uih)
-{
- GSList *iter;
- struct fb_ondemand_closure *oc;
+/*
+ * Add with 'folder_browser'
+ */
+BonoboUIVerb verbs [] = {
+ BONOBO_UI_VERB ("PrintMessage", print_msg),
- for (iter = fb->filter_menu_paths; iter; iter = iter->next) {
- oc = (struct fb_ondemand_closure *) iter->data;
+ /* Settings Menu */
+ BONOBO_UI_VERB ("SetMailFilter", filter_edit),
+ BONOBO_UI_VERB ("VFolderEdit", vfolder_edit_vfolders),
+ BONOBO_UI_VERB ("SetMailConfig", providers_config),
+ BONOBO_UI_VERB ("SetForgetPwd", forget_passwords),
- bonobo_ui_handler_menu_remove (uih, oc->path);
- }
-}
+ /* Message Menu */
+ BONOBO_UI_VERB ("MessageOpenNewWnd", view_message),
+ BONOBO_UI_VERB ("MessageEdit", edit_message),
+ BONOBO_UI_VERB ("MessagePrint", print_msg),
+ BONOBO_UI_VERB ("MessageReplySndr", reply_to_sender),
+ BONOBO_UI_VERB ("MessageReplyAll", reply_to_all),
+ BONOBO_UI_VERB ("MessageForward", forward_msg),
+ BONOBO_UI_VERB ("MessageDelete", delete_msg),
+ BONOBO_UI_VERB ("MessageMove", move_msg),
+ BONOBO_UI_VERB ("MessageCopy", copy_msg),
+
+ BONOBO_UI_VERB ("MessageVFolderSubj", vfolder_subject),
+ BONOBO_UI_VERB ("MessageVFolderSndr", vfolder_sender),
+ BONOBO_UI_VERB ("MessageVFolderRecip", vfolder_recipient),
+
+ BONOBO_UI_VERB ("MessageFilterSubj", filter_subject),
+ BONOBO_UI_VERB ("MessageFilderSndr", filter_sender),
+ BONOBO_UI_VERB ("MessageFilderRecip", filter_recipient),
+
+ /* Folder Menu */
+ BONOBO_UI_VERB ("FolderMarkAllRead", mark_all_seen),
+ BONOBO_UI_VERB ("FolderDeleteAll", mark_all_deleted),
+ BONOBO_UI_VERB ("FolderExpunge", expunge_folder),
+ BONOBO_UI_VERB ("FolderConfig", configure_folder),
+
+ /* Toolbar specific */
+ BONOBO_UI_VERB ("MailGet", send_receieve_mail),
+ BONOBO_UI_VERB ("MailCompose", compose_msg),
+ BONOBO_UI_VERB_END
+};
+
+
+#warning FIXME: some clever person added this recently
+#if 0
static void
add_button_to_toolbar (GtkToolbar *toolbar,
const char *label,
@@ -160,16 +194,15 @@ fill_toolbar (FolderBrowser *folder_browser,
gtk_toolbar_set_button_relief (toolbar, GTK_RELIEF_NONE);
gtk_widget_show_all (GTK_WIDGET (toolbar));
}
+#endif
static void
control_activate (BonoboControl *control, BonoboUIHandler *uih,
FolderBrowser *fb)
{
- Bonobo_UIHandler remote_uih;
- BonoboControl *toolbar_control;
- GnomeDockItemBehavior behavior;
- GtkWidget *toolbar, *toolbar_frame, *folder_browser;
- char *toolbar_name = g_strdup_printf ("/Toolbar%d", fb->serial);
+ GtkWidget *folder_browser;
+ Bonobo_UIHandler remote_uih;
+ BonoboUIComponent *component;
remote_uih = bonobo_control_get_remote_ui_handler (control);
bonobo_ui_handler_set_container (uih, remote_uih);
@@ -177,192 +210,36 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
folder_browser = bonobo_control_get_widget (control);
- /* File Menu */
- bonobo_ui_handler_menu_new_item (
- uih, "/File/<Print Placeholder>/Print message...",
- _("_Print Message"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_STOCK, GNOME_STOCK_MENU_PRINT,
- 0, 0, (void *) print_msg, folder_browser);
- bonobo_ui_handler_menu_new_separator (
- uih, "/File/<Print Placeholder>/separator1", -1);
-
- /* View Menu */
- bonobo_ui_handler_menu_new_separator (
- uih, "/View/separator1", -1);
- bonobo_ui_handler_menu_new_toggleitem (
- uih, "/View/Threaded", _("_Threaded Message List"),
- NULL, -1, 0, 0, NULL, NULL);
- bonobo_ui_handler_menu_set_toggle_state (
- uih, "/View/Threaded", mail_config_thread_list());
- bonobo_ui_handler_menu_set_callback (
- uih, "/View/Threaded", message_list_toggle_threads,
- FOLDER_BROWSER (folder_browser)->message_list, NULL);
-
- /* Settings Menu */
- bonobo_ui_handler_menu_new_item (
- uih, "/Settings/Mail Filters...",
- _("Mail _Filters..."), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- filter_edit, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/Settings/Virtual Folder Editor...",
- _("_Virtual Folder Editor..."), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- vfolder_edit_vfolders, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/Settings/Mail Configuration...",
- _("_Mail Configuration..."), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- providers_config, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/Settings/Forget Passwords",
- _("Forget _Passwords"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- forget_passwords, folder_browser);
-
- /* Message Menu */
- /* Keep in sync with right-click menu in message-list.c:on_right_click*/
- bonobo_ui_handler_menu_new_subtree (
- uih, "/<Component Placeholder>/Message",
- _("_Message"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Open in New Window",
- _("_Open in New Window"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 'o', GDK_CONTROL_MASK,
- view_message, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Edit Message",
- _("_Edit Message"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- edit_message, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Print Message",
- _("_Print Message"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) print_msg, folder_browser);
- bonobo_ui_handler_menu_new_separator (
- uih, "/<Component Placeholder>/Message/separator1", -1);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Reply to Sender",
- _("Reply to _Sender"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) reply_to_sender, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Reply to All",
- _("Reply to _All"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) reply_to_all, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Forward",
- _("_Forward"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) forward_msg, folder_browser);
- bonobo_ui_handler_menu_new_separator (
- uih, "/<Component Placeholder>/Message/separator2", -1);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Delete Message",
- _("_Delete Message"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) delete_msg, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Move Message",
- _("_Move Message"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) move_msg, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Copy Message",
- _("_Copy Message"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) copy_msg, folder_browser);
- bonobo_ui_handler_menu_new_separator (
- uih, "/<Component Placeholder>/Message/separator3", -1);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/VFolder on Subject",
- _("_VFolder on Subject"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) vfolder_subject, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/VFolder on Sender",
- _("VFolder on Se_nder"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) vfolder_sender, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/VFolder on Recipients",
- _("VFolder on _Recipients"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) vfolder_recipient, folder_browser);
- bonobo_ui_handler_menu_new_separator (
- uih, "/<Component Placeholder>/Message/separator4", -1);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Filter on Subject",
- _("_Filter on Subject"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) filter_subject, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Filter on Sender",
- _("Fi_lter on Sender"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) filter_sender, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Message/Filter on Recipients",
- _("Filter on Rec_ipients"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- (void *) filter_recipient, folder_browser);
+ component = bonobo_ui_compat_get_component (uih);
+ bonobo_ui_component_add_verb_list_with_data (
+ component, verbs, folder_browser);
- /* Folder Menu */
- bonobo_ui_handler_menu_new_subtree (
- uih, "/<Component Placeholder>/Folder",
- _("F_older"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Folder/Mark all as Read",
- _("_Mark all as Read"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- mark_all_seen, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Folder/Delete all",
- _("_Delete all"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- mark_all_deleted, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Folder/Expunge",
- _("_Expunge"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- expunge_folder, folder_browser);
- bonobo_ui_handler_menu_new_item (
- uih, "/<Component Placeholder>/Folder/Configure Folder",
- _("_Configure Folder"), NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
- configure_folder, folder_browser);
+#warning FIXME set View/Threaded state to mail_config_thread_list ()
+ bonobo_ui_component_add_verb (
+ component, "ViewThreaded",
+ (BonoboUIVerbFn) message_list_toggle_threads,
+ FOLDER_BROWSER (folder_browser)->message_list);
create_ondemand_hooks (fb, uih);
- toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,
- GTK_TOOLBAR_BOTH);
-
- fill_toolbar (FOLDER_BROWSER (folder_browser), GTK_TOOLBAR (toolbar));
-
- behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE |
- GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL;
- if (!gnome_preferences_get_toolbar_detachable ())
- behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
-
- toolbar_frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (toolbar_frame), GTK_SHADOW_OUT);
- gtk_container_add (GTK_CONTAINER (toolbar_frame), toolbar);
- gtk_widget_show (toolbar_frame);
-
- gtk_widget_show_all (toolbar_frame);
-
- toolbar_control = bonobo_control_new (toolbar_frame);
- bonobo_ui_handler_dock_add (uih, toolbar_name,
- bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)),
- behavior,
- GNOME_DOCK_TOP,
- 1, 1, 0);
- g_free (toolbar_name);
+ { /* FIXME: sweeten this whole function */
+ char *fname;
+ xmlNode *ui;
+ Bonobo_UIContainer container;
+
+ container = bonobo_ui_compat_get_container (uih);
+ g_return_if_fail (container != CORBA_OBJECT_NIL);
+
+ fname = bonobo_ui_util_get_ui_fname ("evolution-mail.xml");
+ g_warning ("Attempting ui load from '%s'", fname);
+
+ ui = bonobo_ui_util_new_ui (component, fname, "evolution-mail");
+
+ bonobo_ui_component_set_tree (component, container, "/", ui, NULL);
+
+ g_free (fname);
+ xmlFreeNode (ui);
+ }
}
static void
@@ -370,30 +247,10 @@ control_deactivate (BonoboControl *control,
BonoboUIHandler *uih,
FolderBrowser *fb)
{
- char *toolbar_name = g_strdup_printf ("/Toolbar%d", fb->serial);
-
- bonobo_ui_handler_menu_remove
- (uih, "/File/<Print Placeholder>/separator1");
- bonobo_ui_handler_menu_remove (
- uih, "/File/<Print Placeholder>/Print message...");
-
- bonobo_ui_handler_menu_remove (uih, "/View/separator1");
- bonobo_ui_handler_menu_remove (uih, "/View/Threaded");
-
- bonobo_ui_handler_menu_remove (uih, "/<Component Placeholder>/Folder");
-
- bonobo_ui_handler_menu_remove (uih, "/<Component Placeholder>/Message");
-
- bonobo_ui_handler_menu_remove (uih, "/Settings/Mail Filters...");
- bonobo_ui_handler_menu_remove (uih, "/Settings/Virtual Folder Editor...");
- bonobo_ui_handler_menu_remove (uih, "/Settings/Mail Configuration...");
- bonobo_ui_handler_menu_remove (uih, "/Settings/Forget Passwords");
-
- bonobo_ui_handler_dock_remove (uih, toolbar_name);
- g_free (toolbar_name);
-
- remove_ondemand_hooks (fb, uih);
- mail_do_sync_folder (fb->folder);
+ g_warning ("Mail control deactivate");
+ bonobo_ui_component_rm (
+ bonobo_ui_compat_get_component (uih),
+ bonobo_ui_compat_get_container (uih), "/", NULL);
}
static void
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 2324654892..45a345993d 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,29 @@
+2000-09-07 Michael Meeks <michael@helixcode.com>
+
+ * e-shell-view-menu.c: Re-hash pretty much the whole file
+
+ * ui.xml: Add.
+
+ * e-shell-view.c (e_shell_view_construct): connect unrealize & delete_event
+ to theit signals on the window (class_init): remove widget_class bits.
+
+2000-09-06 Michael Meeks <michael@helixcode.com>
+
+ * e-shell.c (view_destroy_cb, destroy, e_shell_new_view, e_shell_quit):
+ update to track object type change.
+
+ * e-shell.c (e_shell_restore_from_settings): ditto.
+
+ * main.c (idle_cb): ditto.
+
+ * e-shell-view.c (e_shell_view_new, e_shell_view_construct, setup_widgets):
+ updated for BonoboApp.
+ (progress_bar_timeout_cb, start_progress_bar, stop_progress_bar),
+ (shell_view_interface_set_message_cb, shell_view_interface_unset_message_cb):
+ emasculated for now.
+
+ * e-storage-set-view.c (popup_folder_menu): disable popup menu for now.
+
2000-09-13 Ettore Perazzoli <ettore@helixcode.com>
* e-shell-view.c (popdown_transient_folder_bar): New.
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index 6cf7fe826a..c736ddd907 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -32,6 +32,7 @@
#include "e-shell-constants.h"
#include "e-shell-view-menu.h"
+#include <bonobo.h>
/* EShellView callbacks. */
@@ -53,6 +54,7 @@ shortcut_bar_mode_changed_cb (EShellView *shell_view,
path = (const char *) data;
uih = e_shell_view_get_bonobo_ui_handler (shell_view);
+#warning FIXME: use node_set
bonobo_ui_handler_menu_set_toggle_state (uih, path, toggle_state);
}
@@ -73,6 +75,7 @@ folder_bar_mode_changed_cb (EShellView *shell_view,
path = (const char *) data;
uih = e_shell_view_get_bonobo_ui_handler (shell_view);
+#warning FIXME: use node_set
bonobo_ui_handler_menu_set_toggle_state (uih, path, toggle_state);
}
@@ -189,17 +192,19 @@ command_help (BonoboUIHandler *uih,
}
static void
-command_toggle_folder_bar (BonoboUIHandler *uih,
- void *data,
- const char *path)
+command_toggle_folder_bar (BonoboUIComponent *component,
+ const char *path,
+ Bonobo_UIComponent_EventType type,
+ const char *state,
+ gpointer user_data)
{
EShellView *shell_view;
EShellViewSubwindowMode mode;
gboolean show;
- shell_view = E_SHELL_VIEW (data);
+ shell_view = E_SHELL_VIEW (user_data);
- show = bonobo_ui_handler_menu_get_toggle_state (uih, path);
+ show = atoi (state);
if (show)
mode = E_SHELL_VIEW_SUBWINDOW_STICKY;
else
@@ -209,17 +214,20 @@ command_toggle_folder_bar (BonoboUIHandler *uih,
}
static void
-command_toggle_shortcut_bar (BonoboUIHandler *uih,
- void *data,
- const char *path)
+command_toggle_shortcut_bar (BonoboUIComponent *component,
+ const char *path,
+ Bonobo_UIComponent_EventType type,
+ const char *state,
+ gpointer user_data)
+
{
EShellView *shell_view;
EShellViewSubwindowMode mode;
gboolean show;
- shell_view = E_SHELL_VIEW (data);
+ shell_view = E_SHELL_VIEW (user_data);
- show = bonobo_ui_handler_menu_get_toggle_state (uih, path);
+ show = atoi (state);
if (show)
mode = E_SHELL_VIEW_SUBWINDOW_STICKY;
@@ -368,219 +376,53 @@ DEFINE_UNIMPLEMENTED (command_new_mail_message)
DEFINE_UNIMPLEMENTED (command_new_contact)
DEFINE_UNIMPLEMENTED (command_new_task_request)
-
-static void
-menu_create_file_new (BonoboUIHandler *uih,
- void *data)
-{
- bonobo_ui_handler_menu_new_subtree (uih, "/File/New",
- _("_New"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0);
-
- bonobo_ui_handler_menu_new_item (uih, "/File/New/View",
- _("_View"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 'v', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- command_new_view, data);
- bonobo_ui_handler_menu_new_item (uih, "/File/New/View",
- _("_Folder"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 'f', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- command_new_folder, data);
- bonobo_ui_handler_menu_new_item (uih, "/File/New/Evolution bar shortcut",
- _("Evolution bar _shortcut"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 's', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- command_new_shortcut, data);
-
- bonobo_ui_handler_menu_new_separator (uih, "/File/New/Separator1", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/File/New/Mail message",
- _("_Mail message (FIXME)"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 'm', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- command_new_mail_message, data);
- bonobo_ui_handler_menu_new_item (uih, "/File/New/Appointment",
- _("_Appointment (FIXME)"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 'a', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- command_new_shortcut, data);
- bonobo_ui_handler_menu_new_item (uih, "/File/New/Contact",
- _("_Contact (FIXME)"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 'c', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- command_new_contact, data);
- bonobo_ui_handler_menu_new_item (uih, "/File/New/Contact",
- _("_Task (FIXME)"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 't', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- command_new_task_request, data);
-}
+BonoboUIVerb new_verbs [] = {
+ BONOBO_UI_VERB ("NewView", command_new_view),
+ BONOBO_UI_VERB ("NewFolder", command_new_folder),
+ BONOBO_UI_VERB ("NewShortcut", command_new_shortcut),
+ BONOBO_UI_VERB ("NewMailMessage", command_new_mail_message),
-static void
-menu_create_file (BonoboUIHandler *uih,
- void *data)
-{
- bonobo_ui_handler_menu_new_subtree (uih, "/File",
- _("_File"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0);
-
- menu_create_file_new (uih, data);
-
- bonobo_ui_handler_menu_new_separator (uih, "/File/Separator1", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/File/Go to folder",
- _("_Go to Folder..."),
- _("Display a different folder"),
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_goto_folder, data);
-
- bonobo_ui_handler_menu_new_item (uih, "/File/Create new folder",
- _("_Create New Folder..."),
- _("Create a new folder"),
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_create_folder, data);
-
- bonobo_ui_handler_menu_new_placeholder (uih, "/File/<Print Placeholder>");
-
- bonobo_ui_handler_menu_new_separator (uih, "/File/Separator2", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/File/Exit",
- _("E_xit..."),
- _("Create a new folder"),
- -1,
- BONOBO_UI_HANDLER_PIXMAP_STOCK,
- GNOME_STOCK_MENU_EXIT,
- 0, 0,
- command_quit, data);
-}
+ BONOBO_UI_VERB ("NewAppointment", command_new_shortcut),
+ BONOBO_UI_VERB ("NewContact", command_new_contact),
+ BONOBO_UI_VERB ("NewTask", command_new_task_request),
-static void
-menu_create_edit (BonoboUIHandler *uih,
- void *data)
-{
- bonobo_ui_handler_menu_new_subtree (uih, "/Edit",
- _("_Edit"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0);
-}
+ BONOBO_UI_VERB_END
+};
-static void
-menu_create_view (BonoboUIHandler *uih,
- void *data)
-{
- bonobo_ui_handler_menu_new_subtree (uih, "/View",
- _("_View"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0);
-
- bonobo_ui_handler_menu_new_toggleitem (uih, "/View/Show shortcut bar",
- _("Show _Shortcut Bar"),
- _("Show the shortcut bar"),
- -1,
- 0, 0,
- command_toggle_shortcut_bar, data);
- bonobo_ui_handler_menu_new_toggleitem (uih, "/View/Show folder bar",
- _("Show _Folder Bar"),
- _("Show the folder bar"),
- -1,
- 0, 0,
- command_toggle_folder_bar, data);
-}
+BonoboUIVerb file_verbs [] = {
+ BONOBO_UI_VERB ("FileGoToFolder", command_goto_folder),
+ BONOBO_UI_VERB ("FileCreateFolder", command_create_folder),
+ BONOBO_UI_VERB ("FileExit", command_quit),
-static void
-menu_create_settings (BonoboUIHandler *uih,
- void *data)
-{
- bonobo_ui_handler_menu_new_subtree (uih, "/Settings",
- _("_Settings"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0);
-}
+ BONOBO_UI_VERB_END
+};
+
+BonoboUIVerb help_verbs [] = {
+ BONOBO_UI_VERB_DATA ("HelpIndex", command_help, "index.html"),
+ BONOBO_UI_VERB_DATA ("HelpGetStarted", command_help, "usage-mainwindow.html"),
+ BONOBO_UI_VERB_DATA ("HelpUsingMail", command_help, "usage-mail.html"),
+ BONOBO_UI_VERB_DATA ("HelpUsingCalender", command_help, "usage-calender.html"),
+ BONOBO_UI_VERB_DATA ("HelpUsingContact", command_help, "usage-contact.html"),
+
+ BONOBO_UI_VERB_END
+};
static void
-menu_create_help (BonoboUIHandler *uih,
- void *data)
+menu_do_misc (BonoboUIComponent *component,
+ EShellView *shell_view)
{
- bonobo_ui_handler_menu_new_subtree (uih, "/Help",
- _("_Help"),
- NULL, -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0);
-
- bonobo_ui_handler_menu_new_item (uih, "/Help/Help index",
- _("Help _Index"),
- NULL,
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_help, "index.html");
- bonobo_ui_handler_menu_new_item (uih, "/Help/Getting started",
- _("Getting _Started"),
- NULL,
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_help, "usage-mainwindow.html");
- bonobo_ui_handler_menu_new_item (uih, "/Help/Using the mailer",
- _("Using the _Mailer"),
- NULL,
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_help, "usage-mail.html");
- bonobo_ui_handler_menu_new_item (uih, "/Help/Using the calendar",
- _("Using the _Calendar"),
- NULL,
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_help, "usage-calendar.html");
- bonobo_ui_handler_menu_new_item (uih, "/Help/Using the contact manager",
- _("Using the C_ontact Manager"),
- NULL,
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_help, "usage-contact.html");
-
- bonobo_ui_handler_menu_new_separator (uih, "/Help/Separator1", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/Help/Submit bug report",
- _("_Submit Bug Report"),
- _("Submit bug report using Bug Buddy"),
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_run_bugbuddy, data);
-
- bonobo_ui_handler_menu_new_separator (uih, "/Help/Separator2", -1);
-
- bonobo_ui_handler_menu_new_item (uih, "/Help/About Evolution",
- _("_About Evolution..."),
- _("Show information about Evolution"),
- -1,
- BONOBO_UI_HANDLER_PIXMAP_NONE, NULL,
- 0, 0,
- command_about_box, data);
+ bonobo_ui_component_add_listener (
+ component, "ViewShortcutBar",
+ command_toggle_shortcut_bar, shell_view);
+ bonobo_ui_component_add_listener (
+ component, "ViewFolderBar",
+ command_toggle_folder_bar, shell_view);
+ bonobo_ui_component_add_verb (
+ component, "HelpSubmitBug",
+ (BonoboUIVerbFn) command_run_bugbuddy, shell_view);
+ bonobo_ui_component_add_verb (
+ component, "HelpAbout",
+ (BonoboUIVerbFn) command_about_box, shell_view);
}
@@ -592,20 +434,28 @@ void
e_shell_view_menu_setup (EShellView *shell_view)
{
BonoboUIHandler *uih;
+ Bonobo_UIContainer container;
+ BonoboUIComponent *component;
+ char *fname;
+ xmlNode *ui;
g_return_if_fail (shell_view != NULL);
g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
uih = e_shell_view_get_bonobo_ui_handler (shell_view);
- menu_create_file (uih, shell_view);
- menu_create_edit (uih, shell_view);
- menu_create_view (uih, shell_view);
- menu_create_settings (uih, shell_view);
+ component = bonobo_ui_compat_get_component (uih);
+
+ bonobo_ui_component_add_verb_list_with_data (
+ component, file_verbs, shell_view);
- bonobo_ui_handler_menu_new_placeholder (uih, "/<Component Placeholder>");
-
- menu_create_help (uih, shell_view);
+ bonobo_ui_component_add_verb_list_with_data (
+ component, new_verbs, shell_view);
+
+ bonobo_ui_component_add_verb_list_with_data (
+ component, help_verbs, shell_view);
+
+ menu_do_misc (component, shell_view);
gtk_signal_connect (GTK_OBJECT (shell_view), "shortcut_bar_mode_changed",
GTK_SIGNAL_FUNC (shortcut_bar_mode_changed_cb),
@@ -615,9 +465,20 @@ e_shell_view_menu_setup (EShellView *shell_view)
FOLDER_BAR_TOGGLE_PATH);
/* Initialize the toggles. Yeah, this is, well, yuck. */
-
folder_bar_mode_changed_cb (shell_view, e_shell_view_get_folder_bar_mode (shell_view),
FOLDER_BAR_TOGGLE_PATH);
shortcut_bar_mode_changed_cb (shell_view, e_shell_view_get_shortcut_bar_mode (shell_view),
SHORTCUT_BAR_TOGGLE_PATH);
+
+ container = bonobo_ui_compat_get_container (uih);
+ g_return_if_fail (container != CORBA_OBJECT_NIL);
+
+ fname = bonobo_ui_util_get_ui_fname ("evolution.xml");
+ g_warning ("Attempting ui load from '%s'", fname);
+
+ ui = bonobo_ui_util_new_ui (component, fname, "evolution");
+
+ bonobo_ui_component_set_tree (component, container, "/", ui, NULL);
+ g_free (fname);
+ xmlFreeNode (ui);
}
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index f2a568b9b9..8ac1aef4ec 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -53,8 +53,7 @@
#include <widgets/e-paned/e-hpaned.h>
-#define PARENT_TYPE gnome_app_get_type () /* Losing GnomeApp does not define GNOME_TYPE_APP. */
-static GnomeAppClass *parent_class = NULL;
+static BonoboWinClass *parent_class = NULL;
struct _EShellViewPrivate {
/* The shell. */
@@ -425,10 +424,13 @@ static void
setup_widgets (EShellView *shell_view)
{
EShellViewPrivate *priv;
+#if 0
GtkWidget *progress_bar;
+#endif
priv = shell_view->priv;
+#if 0
/* The application bar. */
priv->appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
@@ -440,6 +442,7 @@ setup_widgets (EShellView *shell_view)
gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (progress_bar), GTK_PROGRESS_LEFT_TO_RIGHT);
gtk_progress_bar_set_bar_style (GTK_PROGRESS_BAR (progress_bar), GTK_PROGRESS_CONTINUOUS);
+#endif
/* The shortcut bar. */
@@ -485,7 +488,7 @@ setup_widgets (EShellView *shell_view)
e_paned_add2 (E_PANED (priv->hpaned), priv->view_vbox);
e_paned_set_position (E_PANED (priv->hpaned), DEFAULT_SHORTCUT_BAR_WIDTH);
- gnome_app_set_contents (GNOME_APP (shell_view), priv->hpaned);
+ bonobo_win_set_contents (BONOBO_WIN (shell_view), priv->hpaned);
/* Show stuff. */
@@ -503,7 +506,9 @@ setup_widgets (EShellView *shell_view)
priv->folder_bar_mode = E_SHELL_VIEW_SUBWINDOW_STICKY;
/* FIXME: Session management and stuff? */
- gtk_window_set_default_size (GTK_WINDOW (shell_view), DEFAULT_WIDTH, DEFAULT_HEIGHT);
+ gtk_window_set_default_size (
+ GTK_WINDOW (shell_view),
+ DEFAULT_WIDTH, DEFAULT_HEIGHT);
}
@@ -519,10 +524,10 @@ setup_bonobo_ui_handler (EShellView *shell_view)
uih = bonobo_ui_handler_new ();
- bonobo_ui_handler_set_app (uih, GNOME_APP (shell_view));
+ bonobo_ui_handler_set_app (uih, BONOBO_WIN (shell_view));
bonobo_ui_handler_create_menubar (uih);
- /* bonobo_ui_handler_create_toolbar (uih, "Toolbar"); */
- bonobo_ui_handler_set_statusbar (uih, priv->appbar);
+ bonobo_ui_handler_create_toolbar (uih, "Toolbar");
+/* bonobo_ui_handler_set_statusbar (uih, priv->appbar);*/
priv->uih = uih;
}
@@ -571,9 +576,6 @@ destroy (GtkObject *object)
static void
unrealize (GtkWidget *widget)
{
- if (GTK_WIDGET_CLASS (parent_class)->unrealize)
- (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
-
/* We flush so that all the destroy window requests for foreign windows
* get sent over the X wire. Hopefully this will diminish the chance of
* hitting the CORBA (sync) vs. Xlib (async) race conditions. This is
@@ -587,13 +589,11 @@ static int
delete_event (GtkWidget *widget,
GdkEventAny *event)
{
- EShellView *shell_view;
EShell *shell;
- shell_view = E_SHELL_VIEW (widget);
-
- shell = e_shell_view_get_shell (shell_view);
+ shell = e_shell_view_get_shell (E_SHELL_VIEW (widget));
e_shell_quit (shell);
+
/* FIXME: Is this right, or should it be FALSE? */
return TRUE;
}
@@ -605,17 +605,12 @@ static void
class_init (EShellViewClass *klass)
{
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
object_class = (GtkObjectClass *) klass;
- widget_class = (GtkWidgetClass *) klass;
object_class->destroy = destroy;
- widget_class->unrealize = unrealize;
- widget_class->delete_event = delete_event;
-
- parent_class = gtk_type_class (gnome_app_get_type ());
+ parent_class = gtk_type_class (BONOBO_WIN_TYPE);
signals[SHORTCUT_BAR_MODE_CHANGED]
= gtk_signal_new ("shortcut_bar_mode_changed",
@@ -683,16 +678,19 @@ init (EShellView *shell_view)
static int
progress_bar_timeout_cb (void *data)
{
+#if 0
EShellView *shell_view;
EShellViewPrivate *priv;
GtkWidget *progress_bar;
+#warning FIXME: I broke it
shell_view = E_SHELL_VIEW (data);
priv = shell_view->priv;
progress_bar = GNOME_APPBAR (GNOME_APP (shell_view)->statusbar)->progress;
priv->progress_bar_value = ! priv->progress_bar_value;
gtk_progress_set_value (GTK_PROGRESS (progress_bar), priv->progress_bar_value);
+#endif
return TRUE;
}
@@ -700,9 +698,11 @@ progress_bar_timeout_cb (void *data)
static void
start_progress_bar (EShellView *shell_view)
{
+#if 0
EShellViewPrivate *priv;
GtkWidget *progress_bar;
+#warning FIXME: I broke it
priv = shell_view->priv;
progress_bar = GNOME_APPBAR (GNOME_APP (shell_view)->statusbar)->progress;
@@ -715,14 +715,17 @@ start_progress_bar (EShellView *shell_view)
gtk_progress_set_activity_mode (GTK_PROGRESS (progress_bar), TRUE);
gtk_progress_set_value (GTK_PROGRESS (progress_bar), priv->progress_bar_value);
+#endif
}
static void
stop_progress_bar (EShellView *shell_view)
{
+#if 0
EShellViewPrivate *priv;
GtkWidget *progress_bar;
+#warning FIXME: I broke it
priv = shell_view->priv;
progress_bar = GNOME_APPBAR (GNOME_APP (shell_view)->statusbar)->progress;
@@ -733,6 +736,7 @@ stop_progress_bar (EShellView *shell_view)
gtk_progress_set_activity_mode (GTK_PROGRESS (progress_bar), FALSE);
gtk_progress_set_value (GTK_PROGRESS (progress_bar), 0);
+#endif
}
@@ -744,9 +748,11 @@ shell_view_interface_set_message_cb (EvolutionShellView *shell_view,
gboolean busy,
void *data)
{
+#if 0
GnomeApp *app;
GnomeAppBar *app_bar;
+#warning FIXME: I broke it
app = GNOME_APP (data);
app_bar = GNOME_APPBAR (app->statusbar);
@@ -773,38 +779,58 @@ shell_view_interface_set_message_cb (EvolutionShellView *shell_view,
start_progress_bar (E_SHELL_VIEW (data));
else
stop_progress_bar (E_SHELL_VIEW (data));
+#endif
}
static void
shell_view_interface_unset_message_cb (EvolutionShellView *shell_view,
void *data)
{
+#if 0
GnomeApp *app;
GnomeAppBar *app_bar;
+#warning FIXME: I broke it
app = GNOME_APP (data);
app_bar = GNOME_APPBAR (app->statusbar);
gnome_appbar_set_status (app_bar, "");
stop_progress_bar (E_SHELL_VIEW (data));
+#endif
}
-void
+EShellView *
e_shell_view_construct (EShellView *shell_view,
- EShell *shell)
+ EShell *shell)
{
EShellViewPrivate *priv;
+ Bonobo_UIContainer container;
+ EShellView *view;
+ GtkObject *window;
- g_return_if_fail (shell_view != NULL);
- g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
- g_return_if_fail (shell != NULL);
- g_return_if_fail (E_IS_SHELL (shell));
+ g_return_val_if_fail (shell != NULL, NULL);
+ g_return_val_if_fail (shell_view != NULL, NULL);
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
+ g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
priv = shell_view->priv;
- gnome_app_construct (GNOME_APP (shell_view), "evolution", "Evolution");
+ view = E_SHELL_VIEW (bonobo_win_construct (
+ BONOBO_WIN (shell_view), "evolution", "Evolution"));
+
+ if (!view) {
+ gtk_object_unref (GTK_OBJECT (shell_view));
+ return NULL;
+ }
+
+ window = GTK_OBJECT (view);
+ gtk_signal_connect_after (window, "unrealize",
+ (GtkSignalFunc) unrealize, NULL);
+
+ gtk_signal_connect (window, "delete_event",
+ (GtkSignalFunc) delete_event, NULL);
priv->shell = shell;
@@ -814,9 +840,11 @@ e_shell_view_construct (EShellView *shell_view,
e_shell_view_menu_setup (shell_view);
e_shell_view_set_folder_bar_mode (shell_view, E_SHELL_VIEW_SUBWINDOW_HIDDEN);
+
+ return view;
}
-GtkWidget *
+EShellView *
e_shell_view_new (EShell *shell)
{
GtkWidget *new;
@@ -825,9 +853,8 @@ e_shell_view_new (EShell *shell)
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
new = gtk_type_new (e_shell_view_get_type ());
- e_shell_view_construct (E_SHELL_VIEW (new), shell);
- return new;
+ return e_shell_view_construct (E_SHELL_VIEW (new), shell);
}
@@ -885,9 +912,11 @@ update_window_icon (EShellView *shell_view,
}
if (icon_path == NULL) {
- gnome_window_icon_set_from_default (GTK_WINDOW (shell_view));
+ gnome_window_icon_set_from_default (
+ GTK_WINDOW (shell_view));
} else {
- gnome_window_icon_set_from_file (GTK_WINDOW (shell_view), icon_path);
+ gnome_window_icon_set_from_file (
+ GTK_WINDOW (shell_view), icon_path);
g_free (icon_path);
}
}
@@ -1044,7 +1073,6 @@ get_control_for_uri (EShellView *shell_view,
EFolderTypeRegistry *folder_type_registry;
EStorageSet *storage_set;
EFolder *folder;
- Bonobo_UIHandler corba_uih;
EvolutionShellComponentClient *handler_client;
Bonobo_Control corba_control;
Evolution_ShellComponent handler;
@@ -1094,8 +1122,9 @@ get_control_for_uri (EShellView *shell_view,
CORBA_exception_free (&ev);
- corba_uih = bonobo_object_corba_objref (BONOBO_OBJECT (priv->uih));
- control = bonobo_widget_new_control_from_objref (corba_control, corba_uih);
+ control = bonobo_widget_new_control_from_objref (
+ corba_control,
+ bonobo_ui_compat_get_container (priv->uih));
setup_evolution_shell_view_interface (shell_view, control);
@@ -1459,4 +1488,4 @@ e_shell_view_load_settings (EShellView *shell_view,
}
-E_MAKE_TYPE (e_shell_view, "EShellView", EShellView, class_init, init, PARENT_TYPE)
+E_MAKE_TYPE (e_shell_view, "EShellView", EShellView, class_init, init, BONOBO_WIN_TYPE)
diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h
index 69a0e5c22c..bd2b9a126e 100644
--- a/shell/e-shell-view.h
+++ b/shell/e-shell-view.h
@@ -28,8 +28,7 @@
#include <config.h>
#endif
-#include <libgnomeui/gnome-app.h>
-#include <bonobo/bonobo-ui-handler.h>
+#include <bonobo/bonobo-app.h>
#include "e-shell.h"
@@ -57,13 +56,13 @@ enum _EShellViewSubwindowMode {
typedef enum _EShellViewSubwindowMode EShellViewSubwindowMode;
struct _EShellView {
- GnomeApp parent;
+ BonoboWin parent;
EShellViewPrivate *priv;
};
struct _EShellViewClass {
- GnomeAppClass parent_class;
+ BonoboWinClass parent_class;
/* Signals. */
void (* shortcut_bar_mode_changed) (EShellView *shell_view, EShellViewSubwindowMode new_mode);
@@ -72,9 +71,9 @@ struct _EShellViewClass {
GtkType e_shell_view_get_type (void);
-void e_shell_view_construct (EShellView *shell_view,
+EShellView *e_shell_view_construct (EShellView *shell_view,
EShell *shell);
-GtkWidget *e_shell_view_new (EShell *shell);
+EShellView *e_shell_view_new (EShell *shell);
gboolean e_shell_view_display_uri (EShellView *shell_view,
const char *uri);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 87f19fb4db..0ddbd5248b 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -321,6 +321,8 @@ setup_local_storage (EShell *shell)
e_storage_set_add_storage (priv->storage_set, local_storage);
priv->local_storage = E_LOCAL_STORAGE (local_storage);
+ gtk_object_unref (GTK_OBJECT (local_storage));
+
return TRUE;
}
@@ -405,12 +407,13 @@ view_destroy_cb (GtkObject *object,
g_assert (E_IS_SHELL_VIEW (object));
shell = E_SHELL (data);
- shell->priv->views = g_list_remove (shell->priv->views, object);
+ shell->priv->views = g_list_remove (
+ shell->priv->views, object);
if (shell->priv->views == NULL) {
/* FIXME: This looks like a Bonobo bug to me. */
bonobo_object_ref (BONOBO_OBJECT (shell));
- gtk_signal_emit (GTK_OBJECT (shell), signals[NO_VIEWS_LEFT]);
+ gtk_signal_emit (GTK_OBJECT (shell), signals [NO_VIEWS_LEFT]);
bonobo_object_unref (BONOBO_OBJECT (shell));
}
}
@@ -450,8 +453,10 @@ destroy (GtkObject *object)
view = E_SHELL_VIEW (p->data);
- gtk_signal_disconnect_by_func (GTK_OBJECT (view),
- GTK_SIGNAL_FUNC (view_destroy_cb), shell);
+ gtk_signal_disconnect_by_func (
+ GTK_OBJECT (view),
+ GTK_SIGNAL_FUNC (view_destroy_cb), shell);
+
gtk_object_destroy (GTK_OBJECT (view));
}
@@ -640,20 +645,20 @@ e_shell_new (const char *local_directory)
*
* Create a new view for @uri.
*
- * Return value: The widget for the new view.
+ * Return value: The new view.
**/
-GtkWidget *
+EShellView *
e_shell_new_view (EShell *shell,
const char *uri)
{
- GtkWidget *view;
+ EShellView *view;
g_return_val_if_fail (shell != NULL, NULL);
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
view = e_shell_view_new (shell);
- gtk_widget_show (view);
+ gtk_widget_show (GTK_WIDGET (view));
gtk_signal_connect (GTK_OBJECT (view), "destroy",
GTK_SIGNAL_FUNC (view_destroy_cb), shell);
@@ -899,16 +904,16 @@ e_shell_restore_from_settings (EShell *shell)
retval = TRUE;
for (i = 0; i < num_views; i++) {
- GtkWidget *view_widget;
+ EShellView *view;
prefix = g_strdup_printf ("=%s/config/Shell=/Views/%d/",
priv->local_directory, i);
/* FIXME restore the URI here. There should be an
e_shell_view_new_from_configuration() thingie. */
- view_widget = e_shell_new_view (shell, NULL);
+ view = e_shell_new_view (shell, NULL);
- if (! e_shell_view_load_settings (E_SHELL_VIEW (view_widget), prefix))
+ if (! e_shell_view_load_settings (view, prefix))
retval = FALSE;
g_free (prefix);
@@ -941,9 +946,10 @@ e_shell_quit (EShell *shell)
EShellView *shell_view;
shell_view = E_SHELL_VIEW (p->data);
- gtk_signal_disconnect_by_func (GTK_OBJECT (shell_view),
- GTK_SIGNAL_FUNC (view_destroy_cb), shell);
- gtk_widget_destroy (GTK_WIDGET (shell_view));
+ gtk_signal_disconnect_by_func (
+ GTK_OBJECT (shell_view),
+ GTK_SIGNAL_FUNC (view_destroy_cb), shell);
+ gtk_object_destroy (GTK_OBJECT (shell_view));
}
g_list_free (priv->views);
diff --git a/shell/e-shell.h b/shell/e-shell.h
index ca63c4776d..b3a5d80c98 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -30,14 +30,19 @@
#include <bonobo/bonobo-object.h>
-#include "Evolution.h"
-#include "e-shortcuts.h"
-
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
+typedef struct _EShell EShell;
+typedef struct _EShellPrivate EShellPrivate;
+typedef struct _EShellClass EShellClass;
+
+#include "Evolution.h"
+#include "e-shortcuts.h"
+#include "e-shell-view.h"
+
#define E_TYPE_SHELL (e_shell_get_type ())
#define E_SHELL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SHELL, EShell))
#define E_SHELL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SHELL, EShellClass))
@@ -45,9 +50,6 @@ extern "C" {
#define E_IS_SHELL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_SHELL))
-typedef struct _EShell EShell;
-typedef struct _EShellPrivate EShellPrivate;
-typedef struct _EShellClass EShellClass;
struct _EShell {
BonoboObject parent;
@@ -68,7 +70,7 @@ void e_shell_construct (EShell *shell,
const char *local_directory);
EShell *e_shell_new (const char *local_directory);
-GtkWidget *e_shell_new_view (EShell *shell,
+EShellView *e_shell_new_view (EShell *shell,
const char *uri);
const char *e_shell_get_local_directory (EShell *shell);
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 9b11f57a94..f57cb6280c 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -237,6 +237,7 @@ popup_folder_menu (EStorageSetView *storage_set_view,
BonoboUIHandler *uih;
EFolder *folder;
+#if 0
priv = storage_set_view->priv;
uih = bonobo_ui_handler_new ();
@@ -265,6 +266,7 @@ popup_folder_menu (EStorageSetView *storage_set_view,
bonobo_ui_handler_do_popup_menu (uih);
bonobo_object_unref (BONOBO_OBJECT (uih));
+#endif
}
diff --git a/shell/main.c b/shell/main.c
index 44fa09d802..df3a571048 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -110,7 +110,7 @@ development_warning ()
static gint
idle_cb (gpointer data)
{
- GtkWidget *view;
+ EShellView *view;
char *evolution_directory;
evolution_directory = (char *) data;
diff --git a/ui/evolution-addressbook.xml b/ui/evolution-addressbook.xml
index 13f86d4874..dc3dd76fe5 100644
--- a/ui/evolution-addressbook.xml
+++ b/ui/evolution-addressbook.xml
@@ -36,7 +36,7 @@
</placeholder>
</menu>
- <dockitem name="Toolbar">
+ <dockitem name="Toolbar" relief="none">
<toolitem name="New" _label="New"
_decr="Create a new contact" verb="ContactNew"
pixtype="stock" pixname="New"/>
@@ -57,6 +57,8 @@
<toolitem type="separator"/>
+ <control name="QuickSearch"/>
+
</dockitem>
</Root> \ No newline at end of file
diff --git a/ui/evolution-calendar.xml b/ui/evolution-calendar.xml
index bbf73ef340..3832a1cf21 100644
--- a/ui/evolution-calendar.xml
+++ b/ui/evolution-calendar.xml
@@ -49,7 +49,7 @@
</submenu>
</menu>
- <dockitem name="Toolbar">
+ <dockitem name="Toolbar" relief="none">
<toolitem name="New" _label="New"
_decr="Create a new appointment" verb="EditNewAppointment"
pixtype="stock" pixname="New"/>
diff --git a/ui/evolution-mail.xml b/ui/evolution-mail.xml
index 656edda83f..6c84c86622 100644
--- a/ui/evolution-mail.xml
+++ b/ui/evolution-mail.xml
@@ -120,7 +120,7 @@
</placeholder>
</menu>
- <dockitem name="Toolbar">
+ <dockitem name="Toolbar" relief="none">
<toolitem name="MailGet" verb=""
_label="Get Mail" _descr="Send queued mail and retrieve new mail"
diff --git a/ui/evolution.xml b/ui/evolution.xml
index a3127f4874..2370610d7f 100644
--- a/ui/evolution.xml
+++ b/ui/evolution.xml
@@ -102,4 +102,6 @@
</submenu>
</menu>
+
+ <toolbar name="Toolbar" relief="none"/>
</Root> \ No newline at end of file