From 7c8e6927c4930a02cca6b51ea1ffd7876467b0bbbce3f57ab01525d2f476e40d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 6 Dec 2008 11:46:10 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/evolution?expand=0&rev=55 --- bgo-332729-invalid-write-econfig.patch | 15 + bgo-562228-evo-mailbox-field.patch | 91 ++ bnc-435452-lose-attendees-busy-search.patch | 33 + bnc-439733-bogofilter-junk-training.patch | 96 ++ bnc-449888-handle-no-workspace.patch | 62 ++ evolution.changes | 22 + evolution.spec | 42 +- sp-meetingworkspace-ui.patch | 983 ++++++++++++++++++++ 8 files changed, 1341 insertions(+), 3 deletions(-) create mode 100644 bgo-332729-invalid-write-econfig.patch create mode 100644 bgo-562228-evo-mailbox-field.patch create mode 100644 bnc-435452-lose-attendees-busy-search.patch create mode 100644 bnc-439733-bogofilter-junk-training.patch create mode 100644 bnc-449888-handle-no-workspace.patch create mode 100644 sp-meetingworkspace-ui.patch diff --git a/bgo-332729-invalid-write-econfig.patch b/bgo-332729-invalid-write-econfig.patch new file mode 100644 index 0000000..912a345 --- /dev/null +++ b/bgo-332729-invalid-write-econfig.patch @@ -0,0 +1,15 @@ +Index: e-util/e-config.c +=================================================================== +--- e-util/e-config.c (revision 36811) ++++ e-util/e-config.c (working copy) +@@ -122,6 +122,10 @@ ep_finalise(GObject *o) + } + + while ( (wn = (struct _widget_node *)e_dlist_remhead(&p->widgets)) ) { ++ /* disconnect the gtk_widget_destroyed function from the widget */ ++ if (wn->widget) ++ g_signal_handlers_disconnect_matched (wn->widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, &wn->widget); ++ + g_free(wn); + } + diff --git a/bgo-562228-evo-mailbox-field.patch b/bgo-562228-evo-mailbox-field.patch new file mode 100644 index 0000000..90952f1 --- /dev/null +++ b/bgo-562228-evo-mailbox-field.patch @@ -0,0 +1,91 @@ +--- plugins/exchange-operations/exchange-account-setup.c 2008/12/02 05:51:59 36824 ++++ plugins/exchange-operations/exchange-account-setup.c 2008/12/02 12:23:33 36825 +@@ -613,6 +613,30 @@ + update_mailbox_param_in_url (target->account, E_ACCOUNT_TRANSPORT_URL, mailbox); + } + ++static void ++want_mailbox_toggled (GtkWidget *toggle, EConfig *config) ++{ ++ GtkWidget *entry; ++ ++ g_return_if_fail (toggle != NULL); ++ g_return_if_fail (config != NULL); ++ ++ entry = g_object_get_data (G_OBJECT (toggle), "mailbox-entry"); ++ if (entry) { ++ gboolean is_active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)); ++ EMConfigTargetAccount *target; ++ const char *mailbox; ++ ++ gtk_widget_set_sensitive (entry, is_active); ++ ++ target = (EMConfigTargetAccount *)config->target; ++ mailbox = gtk_entry_get_text (GTK_ENTRY (entry)); ++ ++ update_mailbox_param_in_url (target->account, E_ACCOUNT_SOURCE_URL, is_active ? mailbox : NULL); ++ update_mailbox_param_in_url (target->account, E_ACCOUNT_TRANSPORT_URL, is_active ? mailbox : NULL); ++ } ++} ++ + static char * + construct_owa_url (CamelURL *url) + { +@@ -645,8 +669,8 @@ + { + EMConfigTargetAccount *target_account; + const char *source_url; +- char *owa_url = NULL, *mailbox_name; +- GtkWidget *owa_entry, *mailbox_entry; ++ char *owa_url = NULL, *mailbox_name, *username; ++ GtkWidget *owa_entry, *mailbox_entry, *want_mailbox_check; + CamelURL *url; + int row; + GtkWidget *hbox, *label, *button; +@@ -679,6 +703,7 @@ + + owa_url = g_strdup (camel_url_get_param(url, "owa_url")); + mailbox_name = g_strdup (camel_url_get_param (url, "mailbox")); ++ username = g_strdup (url->user); + + /* if the host is null, then user+other info is dropped silently, force it to be kept */ + if (url->host == NULL) { +@@ -740,6 +765,19 @@ + owa_editor_entry_changed (owa_entry, data->config); + + row++; ++ want_mailbox_check = gtk_check_button_new_with_mnemonic (_("S_pecify the mailbox name")); ++ gtk_widget_show (want_mailbox_check); ++ gtk_table_attach (GTK_TABLE (data->parent), want_mailbox_check, 1, 2, row, row+1, GTK_FILL, GTK_FILL, 0, 0); ++ if (!username || !*username || !mailbox_name || !*mailbox_name || ++ g_ascii_strcasecmp (username, mailbox_name) == 0 || ++ (strchr (username, '/') && g_ascii_strcasecmp (strchr (username, '/') + 1, mailbox_name) == 0)) { ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (want_mailbox_check), FALSE); ++ } else { ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (want_mailbox_check), TRUE); ++ } ++ g_signal_connect (want_mailbox_check, "toggled", G_CALLBACK (want_mailbox_toggled), data->config); ++ ++ row++; + label = gtk_label_new_with_mnemonic (_("_Mailbox:")); + gtk_widget_show (label); + +@@ -750,14 +788,18 @@ + + gtk_label_set_mnemonic_widget (GTK_LABEL (label), mailbox_entry); + ++ gtk_widget_set_sensitive (mailbox_entry, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (want_mailbox_check))); ++ + g_signal_connect (mailbox_entry, "changed", G_CALLBACK (mailbox_editor_entry_changed), data->config); + g_object_set_data (G_OBJECT (button), "mailbox-entry", mailbox_entry); ++ g_object_set_data (G_OBJECT (want_mailbox_check), "mailbox-entry", mailbox_entry); + + gtk_table_attach (GTK_TABLE (data->parent), label, 0, 1, row, row+1, 0, 0, 0, 0); + gtk_table_attach (GTK_TABLE (data->parent), mailbox_entry, 1, 2, row, row+1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0); + + g_free (owa_url); + g_free (mailbox_name); ++ g_free (username); + + return hbox; + } diff --git a/bnc-435452-lose-attendees-busy-search.patch b/bnc-435452-lose-attendees-busy-search.patch new file mode 100644 index 0000000..9e8dd27 --- /dev/null +++ b/bnc-435452-lose-attendees-busy-search.patch @@ -0,0 +1,33 @@ +--- calendar/gui/e-meeting-list-view.c ++++ calendar/gui/e-meeting-list-view.c +@@ -471,6 +471,21 @@ status_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *tex + } + + static void ++ense_update (GtkWidget *w, gpointer data1, gpointer user_data) ++{ ++ gtk_cell_editable_editing_done ((GtkCellEditable *)w); ++} ++ ++static void ++editing_started_cb (GtkCellRenderer *renderer, ++ GtkCellEditable *editable, ++ gchar *path, ++ gpointer user_data) ++{ ++ g_signal_connect (editable, "updated", G_CALLBACK(ense_update), NULL); ++} ++ ++static void + build_table (EMeetingListView *lview) + { + GtkCellRenderer *renderer; +@@ -501,6 +516,8 @@ build_table (EMeetingListView *lview) + g_object_set_data (G_OBJECT (col), "mtg-store-col", GINT_TO_POINTER (E_MEETING_STORE_ATTENDEE_COL)); + g_signal_connect (renderer, "cell_edited", G_CALLBACK (attendee_edited_cb), view); + g_signal_connect (renderer, "editing-canceled", G_CALLBACK (attendee_editing_canceled_cb), view); ++ g_signal_connect (renderer, "editing-started", G_CALLBACK (editing_started_cb), view); ++ + g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_ATTENDEE_COL), renderer); + + renderer = e_cell_renderer_combo_new (); diff --git a/bnc-439733-bogofilter-junk-training.patch b/bnc-439733-bogofilter-junk-training.patch new file mode 100644 index 0000000..99fc555 --- /dev/null +++ b/bnc-439733-bogofilter-junk-training.patch @@ -0,0 +1,96 @@ +--- plugins/bogo-junk-plugin/Makefile.am ++++ plugins/bogo-junk-plugin/Makefile.am +@@ -1,5 +1,6 @@ + INCLUDES = \ + -I$(top_srcdir) \ ++ -DWELCOME_MESSAGE=\""$(privdatadir)/default/C/mail/local/Inbox"\" \ + $(EVOLUTION_MAIL_CFLAGS) + + @EVO_PLUGIN_RULE@ +--- plugins/bogo-junk-plugin/bf-junk-filter.c ++++ plugins/bogo-junk-plugin/bf-junk-filter.c +@@ -40,6 +40,8 @@ + #include "mail/em-config.h" + #include + #include ++#include ++#include + #include + #include + #include +@@ -69,6 +71,7 @@ void *em_junk_bf_validate_binary (EPlugin *ep, EMJunkHookTarget *target); + void em_junk_bf_report_junk (EPlugin *ep, EMJunkHookTarget *target); + void em_junk_bf_report_non_junk (EPlugin *ep, EMJunkHookTarget *target); + void em_junk_bf_commit_reports (EPlugin *ep, EMJunkHookTarget *target); ++static gint pipe_to_bogofilter (CamelMimeMessage *msg, gchar **argv, GError **error); + + /* eplugin stuff */ + int e_plugin_lib_enable (EPluginLib *ep, int enable); +@@ -78,6 +81,37 @@ int e_plugin_lib_enable (EPluginLib *ep, int enable); + + static gboolean em_junk_bf_unicode = TRUE; + ++static void ++init_db () ++{ ++ CamelStream *stream = camel_stream_fs_new_with_name (WELCOME_MESSAGE, O_RDONLY, 0); ++ CamelMimeParser *parser = camel_mime_parser_new (); ++ CamelMimeMessage *msg = camel_mime_message_new (); ++ gchar *argv[] = { ++ em_junk_bf_binary, ++ "-n", ++ NULL, ++ NULL ++ }; ++ ++ camel_mime_parser_init_with_stream (parser, stream); ++ camel_mime_parser_scan_from (parser, FALSE); ++ camel_object_unref (stream); ++ ++ camel_mime_part_construct_from_parser ((CamelMimePart *) msg, parser); ++ camel_object_unref (parser); ++ ++ d(fprintf (stderr, "Initing the bogofilter DB with Welcome message\n")); ++ ++ if (em_junk_bf_unicode) { ++ argv[2] = "--unicode=yes"; ++ } ++ ++ pipe_to_bogofilter (msg, argv, NULL); ++ camel_object_unref (msg); ++ ++} ++ + static gint + pipe_to_bogofilter (CamelMimeMessage *msg, gchar **argv, GError **error) + { +@@ -88,7 +122,9 @@ pipe_to_bogofilter (CamelMimeMessage *msg, gchar **argv, GError **error) + gint status; + gint waitres; + gint res; ++ static gboolean only_once = FALSE; + ++retry: + if (camel_debug_start ("junk")) { + int i; + +@@ -153,8 +189,17 @@ pipe_to_bogofilter (CamelMimeMessage *msg, gchar **argv, GError **error) + res = BOGOFILTER_ERROR; + } + +- if (res < 0 || res > 2) ++ if (res < 0 || res > 2) { ++ if (!only_once) { ++ /* Create wordlist.db */ ++ only_once = TRUE; ++ init_db(); ++ ++ goto retry; ++ } + g_set_error (error, EM_JUNK_ERROR, res, _("Pipe to Bogofilter failed, error code: %d."), res); ++ ++ } + + return res; + } + diff --git a/bnc-449888-handle-no-workspace.patch b/bnc-449888-handle-no-workspace.patch new file mode 100644 index 0000000..0fd11ca --- /dev/null +++ b/bnc-449888-handle-no-workspace.patch @@ -0,0 +1,62 @@ +diff --git a/plugins/sharepoint-account-setup/SharepointAccount.cs b/plugins/sharepoint-account-setup/SharepointAccount.cs +index 61959ac..a9fad5f 100644 +--- a/plugins/sharepoint-account-setup/SharepointAccount.cs ++++ b/plugins/sharepoint-account-setup/SharepointAccount.cs +@@ -85,6 +85,44 @@ namespace Sharepoint + } + } + ++ private static FileInfo [] GetWorkSpaces () ++ { ++ int tries = 0; ++ ++ TryAgain: ++ try ++ { ++ tries = tries + 1; ++ FileInfo [] workspaces = deskIceDaemon.EnumerateWorkspaces (); ++ ++ return workspaces; ++ } ++ catch (Exception ex) ++ { ++ if (tries > 5) ++ { ++ Console.WriteLine ("Three tries exceeded"); ++ Console.WriteLine ("Could not create the account"); ++ Console.WriteLine (ex.Message); ++ return null; ++ } ++ ++ NoWorkspacesException nwex = new NoWorkspacesException (); ++ if (ex.Message.Contains (nwex.Message)) { ++ Console.WriteLine ("No workspaces found"); ++ Console.WriteLine ("Sleeping for 4 seconds"); ++ System.Threading.Thread.Sleep (1000 * 4); ++ ++ goto TryAgain; ++ } else { ++ Console.WriteLine ("Error while getting workspace. Please try again after a minute"); ++ Console.WriteLine (ex.Message); ++ } ++ } ++ ++ return null; ++ } ++ + private static void SetupFolders () + { + Console.WriteLine ("Getting folders "); +@@ -97,7 +135,11 @@ namespace Sharepoint + return; + } + +- FileInfo [] workspaces = deskIceDaemon.EnumerateWorkspaces (); ++ FileInfo [] workspaces = GetWorkSpaces (); ++ ++ if (workspaces == null) ++ return; ++ + foreach (FileInfo workspace in workspaces) + { + Folder[] folders = null; diff --git a/evolution.changes b/evolution.changes index 0d3f019..21e5890 100644 --- a/evolution.changes +++ b/evolution.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Thu Dec 4 12:13:42 CET 2008 - abharath@suse.de + +- Patches added + + bgo#332729 - bgo-332729-invalid-write-econfig.patch - invalid + write with outspring from e-config.c + + bgo#562228 - bgo-562228-evo-mailbox-field.patch - Login to + exchange fails if "mailbox" is filled manually in + the config wizard. + + bnc#435452 - bnc-435452-lose-attendees-busy-search.patch - + Adding People to Meeting Loses Attendee if Add or + Busy Search Selected. + + bnc#439733 - bnc-439733-bogofilter-junk-training.patch - + Checking for junk before training. + + bnc#449888 - bnc-449888-handle-no-workspace.patch - Evolution + should handle 'no workspace found' exception. + + sp-meetingworkspace-ui.patch - Implement an UI for creating + meeting workspace. FATE id: 304465 + +- sp-tasks-setup.diff: Uncomment this patch now as dice dependency + patches have been checked in. + ------------------------------------------------------------------- Mon Nov 24 10:00:30 IST 2008 - msuman@suse.de diff --git a/evolution.spec b/evolution.spec index 0909d60..3c08e81 100644 --- a/evolution.spec +++ b/evolution.spec @@ -58,7 +58,7 @@ Group: Productivity/Networking/Email/Clients # This should be updated upon major version changes; it should match BASE_VERSION as defined in configure.in. %define evolution_base_version 2.24 Version: 2.24.1.1 -Release: 4 +Release: 5 Summary: The Integrated GNOME Mail, Calendar, and Address Book Suite Source0: %{name}-%{version}.tar.bz2 Source1: summerdance-about2.png @@ -116,6 +116,18 @@ Patch34: bnc-446286-message-tracking-status.patch Patch35: bnc-210959-evo-accept-ics.patch # PATCH-FIX-UPSTREAM sp-tasks-setup.diff pchenthill@suse.de -- Patch needs to upstreamed. Patch36: sp-tasks-setup.diff +# PATCH-FIX-UPSTREAM bgo-332729-invalid-write-econfig.patch bgo332729 -- Fix has been submitted upstream. +Patch37: bgo-332729-invalid-write-econfig.patch +# PATCH-FIX-UPSTREAM bgo-562228-evo-mailbox-field.patch bgo562228 -- Fix has been submitted upstream. +Patch38: bgo-562228-evo-mailbox-field.patch +# PATCH-FIX-UPSTREAM bnc-435452-lose-attendees-busy-search.patch bnc435452 sragavan@novell.com -- Patch yet to be pushed upstream. +Patch39: bnc-435452-lose-attendees-busy-search.patch +# PATCH-FIX-UPSTREAM bnc-439733-bogofilter-junk-training.patch bnc439733 sragavan@novell.com -- Patch yet to be pushed upstream. +Patch40: bnc-439733-bogofilter-junk-training.patch +# PATCH-FIX-UPSTREAM sp-meetingworkspace-ui.patch pchenthill@suse.de -- Patch needs to upstreamed. +Patch41: sp-meetingworkspace-ui.patch +# PATCH-FIX-UPSTREAM bnc-449888-handle-no-workspace.patch bnc449888 pchenthill@suse.de -- Patch needs to upstreamed. +Patch42: bnc-449888-handle-no-workspace.patch # PATCH-FIX-UPSTREAM evo-core-mapi-changes.diff msuman@suse.de -- Fix is upstream since 2.25.3 Patch100: evo-core-mapi-changes.diff Url: http://gnome.org/projects/evolution/ @@ -373,7 +385,13 @@ Authors: %patch33 %patch34 %patch35 -#%patch36 -p1 +%patch36 -p1 +%patch37 +%patch38 +%patch39 +%patch40 +%patch41 -p1 +%patch42 -p1 %patch100 -p1 %build @@ -488,7 +506,25 @@ fi %{_libdir}/evolution/*/conduits %changelog -* Sun Nov 23 2008 msuman@suse.de +* Thu Dec 04 2008 abharath@suse.de +- Patches added + + bgo#332729 - bgo-332729-invalid-write-econfig.patch - invalid + write with outspring from e-config.c + + bgo#562228 - bgo-562228-evo-mailbox-field.patch - Login to + exchange fails if "mailbox" is filled manually in + the config wizard. + + bnc#435452 - bnc-435452-lose-attendees-busy-search.patch - + Adding People to Meeting Loses Attendee if Add or + Busy Search Selected. + + bnc#439733 - bnc-439733-bogofilter-junk-training.patch - + Checking for junk before training. + + bnc#449888 - bnc-449888-handle-no-workspace.patch - Evolution + should handle 'no workspace found' exception. + + sp-meetingworkspace-ui.patch - Implement an UI for creating + meeting workspace. FATE id: 304465 +- sp-tasks-setup.diff: Uncomment this patch now as dice dependency + patches have been checked in. +* Mon Nov 24 2008 msuman@suse.de - sp-tasks-setup.diff: Comment this patch for now as it breaks the build. - Restore the alphabetical order of the BuildRequires list diff --git a/sp-meetingworkspace-ui.patch b/sp-meetingworkspace-ui.patch new file mode 100644 index 0000000..b696839 --- /dev/null +++ b/sp-meetingworkspace-ui.patch @@ -0,0 +1,983 @@ +diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c +index 16bdb97..5818165 100644 +--- a/calendar/gui/dialogs/comp-editor.c ++++ b/calendar/gui/dialogs/comp-editor.c +@@ -63,6 +63,7 @@ + #include "../e-cal-popup.h" + #include "../calendar-config-keys.h" + #include "cal-attachment-select-file.h" ++#include "../e-cal-event.h" + + #include "e-attachment-bar.h" + #include "misc/e-expander.h" +@@ -104,7 +105,7 @@ struct _CompEditorPrivate { + + /* Manages menus and toolbars */ + GtkUIManager *manager; +- ++ GtkWidget *vbox; + gchar *summary; + + guint32 attachment_bar_visible : 1; +@@ -2179,29 +2180,28 @@ setup_widgets (CompEditor *editor) + CompEditorPrivate *priv; + GtkWidget *expander_hbox; + GtkWidget *widget; +- GtkWidget *vbox; + + priv = editor->priv; + + /* Useful vbox */ +- vbox = gtk_vbox_new (FALSE, 0); +- gtk_container_add (GTK_CONTAINER (editor), vbox); +- gtk_widget_show (vbox); ++ priv->vbox = gtk_vbox_new (FALSE, 0); ++ gtk_container_add (GTK_CONTAINER (editor), priv->vbox); ++ gtk_widget_show (priv->vbox); + + /* Main Menu */ + widget = comp_editor_get_managed_widget (editor, "/main-menu"); +- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0); ++ gtk_box_pack_start (GTK_BOX (priv->vbox), widget, FALSE, FALSE, 0); + gtk_widget_show (widget); + + /* Main Toolbar */ + widget = comp_editor_get_managed_widget (editor, "/main-toolbar"); +- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0); ++ gtk_box_pack_start (GTK_BOX (priv->vbox), widget, FALSE, FALSE, 0); + gtk_widget_show (widget); + + /* Notebook */ + widget = gtk_notebook_new (); + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE); +- gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 0); ++ gtk_box_pack_start (GTK_BOX (priv->vbox), widget, TRUE, TRUE, 0); + gtk_widget_show (widget); + priv->notebook = GTK_NOTEBOOK (widget); + +@@ -2254,7 +2254,7 @@ setup_widgets (CompEditor *editor) + atk_object_set_description (gtk_widget_get_accessible (priv->attachment_expander), _("Press space key to toggle attachment bar")); + gtk_container_add (GTK_CONTAINER (priv->attachment_expander), priv->attachment_scrolled_window); + +- gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_expander, FALSE, FALSE, 4); ++ gtk_box_pack_start (GTK_BOX (priv->vbox), priv->attachment_expander, FALSE, FALSE, 4); + gtk_widget_show (priv->attachment_expander); + e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), FALSE); + g_signal_connect_after (priv->attachment_expander, "activate", +@@ -2495,6 +2495,22 @@ comp_editor_get_ui_manager (CompEditor *editor) + return editor->priv->manager; + } + ++GtkWidget * ++comp_editor_get_vbox (CompEditor *editor) ++{ ++ g_return_val_if_fail (IS_COMP_EDITOR (editor), NULL); ++ ++ return editor->priv->vbox; ++} ++ ++GtkNotebook * ++comp_editor_get_notebook (CompEditor *editor) ++{ ++ g_return_val_if_fail (IS_COMP_EDITOR (editor), NULL); ++ ++ return editor->priv->notebook; ++} ++ + GtkAction * + comp_editor_get_action (CompEditor *editor, + const gchar *action_name) +@@ -2670,9 +2686,15 @@ comp_editor_append_page (CompEditor *editor, + + priv->pages = g_list_append (priv->pages, page); + +- if (add) ++ if (add){ + gtk_notebook_append_page (priv->notebook, page_widget, label_widget); + ++ ECalEvent *ec_event = e_cal_event_peek (); ++ ECalEventTargetCompEditor *target; ++ target = e_cal_event_target_comp_editor (ec_event, editor); ++ e_event_emit ((EEvent *) ec_event, "editor.append", (EEventTarget *) target); ++ } ++ + /* Listen for things happening on the page */ + g_signal_connect_swapped ( + page, "dates_changed", +diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c +index 5f7f14c..e7a681a 100644 +--- a/calendar/gui/dialogs/event-editor.c ++++ b/calendar/gui/dialogs/event-editor.c +@@ -38,6 +38,7 @@ + #include + #include + ++#include "../e-cal-event.h" + #include "event-page.h" + #include "recurrence-page.h" + #include "schedule-page.h" +@@ -65,7 +66,7 @@ static const gchar *ui = + "" + " " + " " +-" " ++" " + " " + " " + " " +@@ -102,6 +103,17 @@ static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMet + + G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR) + ++ ++CompEditorPage* ++event_editor_get_event_page (CompEditor *editor) ++{ ++ EventEditorPrivate *priv; ++ ++ priv = EVENT_EDITOR_GET_PRIVATE (editor); ++ ++ return priv->event_page; ++} ++ + static void + create_schedule_page (CompEditor *editor) + { +@@ -290,6 +302,7 @@ event_editor_constructor (GType type, + gtk_action_group_set_visible (action_group, is_meeting); + + priv->event_page = event_page_new (priv->model, editor); ++ + g_object_ref_sink (priv->event_page); + comp_editor_append_page ( + editor, COMP_EDITOR_PAGE (priv->event_page), +@@ -330,6 +343,11 @@ event_editor_constructor (GType type, + event_page_set_meeting (priv->event_page, TRUE); + priv->meeting_shown=TRUE; + } ++ ++ ECalEvent *ec_event = e_cal_event_peek (); ++ ECalEventTargetCompEditor *target; ++ target = e_cal_event_target_comp_editor (ec_event, editor); ++ e_event_emit ((EEvent *) ec_event, "editor.inited", (EEventTarget *) target); + + return object; + } +@@ -492,7 +510,6 @@ event_editor_init (EventEditor *ee) + } + + /* Hide send options. */ +- action = comp_editor_get_action (editor, "send-options"); + gtk_action_set_visible (action, FALSE); + + g_signal_connect ( +diff --git a/calendar/gui/dialogs/event-editor.h b/calendar/gui/dialogs/event-editor.h +index c050b92..7e804d1 100644 +--- a/calendar/gui/dialogs/event-editor.h ++++ b/calendar/gui/dialogs/event-editor.h +@@ -68,6 +68,7 @@ GType event_editor_get_type (void); + CompEditor * event_editor_new (ECal *client, + CompEditorFlags flags); + void event_editor_show_meeting (EventEditor *ee); ++CompEditorPage* event_editor_get_event_page (CompEditor *editor); + + G_END_DECLS + +diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c +index 4a36f8c..ae33090 100644 +--- a/calendar/gui/dialogs/event-page.c ++++ b/calendar/gui/dialogs/event-page.c +@@ -700,6 +700,26 @@ create_image_event_box (const char *image_text, const char *tip_text) + return box; + } + ++GtkWidget * ++event_page_get_toplevel_widget (CompEditorPage *page) ++{ ++ EventPagePrivate *priv; ++ ++ priv = EVENT_PAGE_GET_PRIVATE (page); ++ ++ return priv->main; ++} ++ ++GtkWidget * ++get_event_page_widget (EventPage *epage) ++{ ++ EventPagePrivate *priv; ++ ++ priv = EVENT_PAGE_GET_PRIVATE (epage); ++ ++ return priv->hour_selector; ++} ++ + static void + sensitize_widgets (EventPage *epage) + { +diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h +index 7c868f1..6c47ae5 100644 +--- a/calendar/gui/dialogs/event-page.h ++++ b/calendar/gui/dialogs/event-page.h +@@ -109,6 +109,8 @@ ENameSelector * event_page_get_name_selector (EventPage *epage); + void event_page_add_attendee (EventPage *epage, + EMeetingAttendee *attendee); + ++GtkWidget * get_event_page_widget (EventPage *epage); ++ + G_END_DECLS + + #endif +diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c +index 6e295ab..a30ce49 100644 +--- a/calendar/gui/e-cal-event.c ++++ b/calendar/gui/e-cal-event.c +@@ -103,6 +103,16 @@ e_cal_event_target_new_component (ECalEvent *ece, struct _CalendarComponent *com + return t; + } + ++ECalEventTargetCompEditor * ++e_cal_event_target_comp_editor (ECalEvent *ec_event, struct _CompEditor *editor) ++{ ++ ECalEventTargetCompEditor *t = e_event_target_new (&ec_event->event, E_CAL_EVENT_TARGET_COMP_EDITOR, sizeof (*t)); ++ ++ t->editor = g_object_ref (editor); ++ ++ return t; ++} ++ + /* ********************************************************************** */ + + static void *eceh_parent_class; +@@ -112,11 +122,18 @@ static const EEventHookTargetMask eceh_component_masks[] = { + { NULL }, + }; + ++static const EEventHookTargetMask eceh_compeditor_masks[] = { ++ { "inited", E_CAL_EVENT_COMPEDITOR_INITED }, ++ { NULL }, ++}; ++ + static const EEventHookTargetMap eceh_targets[] = { + { "component", E_CAL_EVENT_TARGET_COMPONENT, eceh_component_masks }, ++ { "compeditor", E_CAL_EVENT_TARGET_COMP_EDITOR, eceh_compeditor_masks }, + { NULL }, + }; + ++ + static void + eceh_finalize (GObject *o) + { +diff --git a/calendar/gui/e-cal-event.h b/calendar/gui/e-cal-event.h +index 4fbaa39..f131cb9 100644 +--- a/calendar/gui/e-cal-event.h ++++ b/calendar/gui/e-cal-event.h +@@ -38,6 +38,7 @@ typedef struct _ECalEventClass ECalEventClass; + + enum _e_cal_event_target_t { + E_CAL_EVENT_TARGET_COMPONENT, ++ E_CAL_EVENT_TARGET_COMP_EDITOR, + }; + + /* Flags that describe TARGET_COMPONENT */ +@@ -45,6 +46,11 @@ enum { + E_CAL_EVENT_COMPONENT_MIGRATION = 1 << 0, + }; + ++ ++enum { ++ E_CAL_EVENT_COMPEDITOR_INITED = 1 << 0, ++}; ++ + typedef struct _ECalEventTargetComponent ECalEventTargetComponent; + + struct _ECalEventTargetComponent { +@@ -53,6 +59,14 @@ struct _ECalEventTargetComponent { + struct _CalendarComponent *component; + }; + ++ ++typedef struct _ECalEventTargetCompEditor ECalEventTargetCompEditor; ++ ++struct _ECalEventTargetCompEditor { ++ EEventTarget target; ++ struct _CompEditor *editor; ++}; ++ + struct _ECalEvent { + EEvent event; + +@@ -66,6 +80,7 @@ struct _ECalEventClass { + GType e_cal_event_get_type (void); + ECalEvent* e_cal_event_peek (void); + ECalEventTargetComponent* e_cal_event_target_new_component (ECalEvent *ece, struct _CalendarComponent *component, guint32 flags); ++ECalEventTargetCompEditor * e_cal_event_target_comp_editor (ECalEvent *ec_event, struct _CompEditor *editor); + + /* ********************************************************************** */ + +diff --git a/configure.in b/configure.in +index 13a5b2d..d147adf 100644 +--- a/configure.in 2008-12-04 07:44:04.865124000 +0100 ++++ b/configure.in 2008-12-04 07:49:16.324346000 +0100 +new file mode 100644 +index 0000000..f101059 +@@ -918,3 +918,7 @@ if test "x${enable_mono}" = "xyes"; then + AC_SUBST(ICE_DESKTOP_LIBS) + MONO_BASED_PLUGINS="$MONO_BASED_PLUGINS sharepoint-account-setup" ++ SHAREPOINT_FEATURES=sharepoint-features ++ PKG_CHECK_MODULES(DBUS, dbus-glib-1) ++ AC_SUBST(DBUS_CFLAGS) ++ AC_SUBST(DBUS_LIBS) + fi +@@ -1752,7 +1756,7 @@ AC_ARG_ENABLE([plugins], + dnl Add any new plugins here + plugins_base_always="calendar-file calendar-http calendar-weather itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup webdav-account-setup" + +-plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN $MONO_BASED_PLUGINS" ++plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $SHAREPOINT_FEATURES $EXCHANGE_PLUGIN $MONO_PLUGIN $MONO_BASED_PLUGINS" + all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono" + + plugins_standard_always="bbdb subject-thread save-calendar select-one-source copy-tool mail-to-task mark-calendar-offline audio-inline mailing-list-actions default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face backup-restore email-custom-header templates pst-import" +@@ -2098,6 +2102,7 @@ plugins/face/Makefile + plugins/external-editor/Makefile + plugins/webdav-account-setup/Makefile + plugins/sharepoint-account-setup/Makefile ++plugins/sharepoint-features/Makefile + smime/Makefile + smime/lib/Makefile + smime/gui/Makefile +diff --git a/plugins/sharepoint-features/Makefile.am b/plugins/sharepoint-features/Makefile.am +--- /dev/null ++++ b/plugins/sharepoint-features/Makefile.am +@@ -0,0 +1,40 @@ ++INCLUDES = \ ++ -I$(top_srcdir) \ ++ -I$(top_builddir)/shell \ ++ -I$(top_srcdir)/widgets \ ++ -I$(top_srcdir)/widgets/misc \ ++ -I$(top_builddir)/calendar/gui \ ++ -I$(top_builddir)/calendar/gui/dialogs \ ++ $(EVOLUTION_CALENDAR_CFLAGS) \ ++ -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ ++ -DCONNECTOR_GLADEDIR=\""$(gladedir)"\" \ ++ $(SOURCE_SEL_CFLAGS) ++ ++ ++@EVO_PLUGIN_RULE@ ++ ++plugin_DATA = \ ++ org-gnome-sharepoint-features.eplug ++ ++plugin_LTLIBRARIES = liborg-gnome-sharepoint-features.la ++ ++liborg_gnome_sharepoint_features_la_SOURCES = \ ++ meeting-workspace.c ++ ++liborg_gnome_sharepoint_features_la_LIBADD = \ ++ $(top_builddir)/e-util/libeutil.la \ ++ $(top_builddir)/calendar/gui/libevolution-calendar.la \ ++ $(top_builddir)/widgets/misc/libemiscwidgets.la \ ++ $(NO_UNDEFINED_REQUIRED_LIBS) \ ++ $(EVOLUTION_CALENDAR_LIBS) ++liborg_gnome_sharepoint_features_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED) ++ ++glade_DATA = meetingworkspaces.glade ++ ++EXTRA_DIST = \ ++ org-gnome-sharepoint-features.eplug.xml \ ++ $(glade_DATA) ++ ++BUILT_SOURCES = org-gnome-sharepoint-features.eplug ++ ++CLEANFILES = $(BUILT_SOURCES) +diff --git a/plugins/sharepoint-features/meetingworkspaces.glade b/plugins/sharepoint-features/meetingworkspaces.glade +new file mode 100644 +index 0000000..d2c1106 +--- /dev/null ++++ b/plugins/sharepoint-features/meetingworkspaces.glade +@@ -0,0 +1,324 @@ ++ ++ ++ ++ ++ ++ ++ True ++ Meeting Workspace ++ GTK_WINDOW_TOPLEVEL ++ GTK_WIN_POS_NONE ++ False ++ True ++ False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True ++ False ++ True ++ ++ ++ ++ True ++ False ++ 0 ++ ++ ++ ++ True ++ GTK_BUTTONBOX_END ++ ++ ++ ++ True ++ True ++ True ++ gtk-cancel ++ True ++ GTK_RELIEF_NORMAL ++ True ++ -6 ++ ++ ++ ++ ++ ++ True ++ True ++ True ++ gtk-ok ++ True ++ GTK_RELIEF_NORMAL ++ True ++ -5 ++ ++ ++ ++ ++ 0 ++ False ++ True ++ GTK_PACK_END ++ ++ ++ ++ ++ ++ 12 ++ True ++ False ++ 12 ++ ++ ++ ++ True ++ True ++ C_reate meeting workspace ++ True ++ GTK_RELIEF_NORMAL ++ True ++ False ++ False ++ True ++ ++ ++ 0 ++ False ++ False ++ ++ ++ ++ ++ ++ 12 ++ True ++ 2 ++ 2 ++ False ++ 12 ++ 12 ++ ++ ++ ++ True ++ T_itle: ++ True ++ False ++ GTK_JUSTIFY_LEFT ++ False ++ False ++ 0 ++ 0.5 ++ 0 ++ 0 ++ title-entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 ++ ++ ++ ++ ++ ++ 0 ++ 1 ++ 0 ++ 1 ++ fill ++ ++ ++ ++ ++ ++ ++ True ++ T_emplate: ++ True ++ False ++ GTK_JUSTIFY_LEFT ++ False ++ False ++ 0 ++ 0.5 ++ 0 ++ 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 ++ ++ ++ ++ ++ ++ 0 ++ 1 ++ 1 ++ 2 ++ fill ++ ++ ++ ++ ++ ++ ++ True ++ True ++ True ++ True ++ 0 ++ ++ True ++ ++ False ++ ++ ++ ++ ++ ++ 1 ++ 2 ++ 0 ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ Basic Meeting Workspace ++Blank Meeting Workspace ++Decision Meeting Workspace ++Social Meeting Workspace ++Multipage Meeting Workspace ++ False ++ True ++ True ++ ++ ++ ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ fill ++ fill ++ ++ ++ ++ ++ 0 ++ True ++ True ++ ++ ++ ++ ++ ++ True ++ True ++ _Link to existing workspace ++ True ++ GTK_RELIEF_NORMAL ++ True ++ False ++ False ++ True ++ create-radio ++ ++ ++ 0 ++ False ++ False ++ ++ ++ ++ ++ ++ 12 ++ True ++ False ++ 12 ++ ++ ++ ++ True ++ Wo_rkspaces: ++ True ++ False ++ GTK_JUSTIFY_LEFT ++ False ++ False ++ 0.5 ++ 0.5 ++ 0 ++ 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 ++ ++ ++ ++ ++ ++ 0 ++ False ++ False ++ ++ ++ ++ ++ ++ True ++ False ++ True ++ True ++ ++ ++ ++ ++ ++ 0 ++ True ++ True ++ ++ ++ ++ ++ 0 ++ True ++ True ++ ++ ++ ++ ++ 0 ++ True ++ True ++ ++ ++ ++ ++ ++ True ++ True ++ ++ ++ 0 ++ False ++ False ++ ++ ++ ++ ++ ++ ++ +diff --git a/plugins/sharepoint-features/org-gnome-sharepoint-features.eplug.xml b/plugins/sharepoint-features/org-gnome-sharepoint-features.eplug.xml +new file mode 100644 +index 0000000..d59db73 +--- /dev/null ++++ b/plugins/sharepoint-features/org-gnome-sharepoint-features.eplug.xml +@@ -0,0 +1,20 @@ ++ ++ ++ ++ <_description>Plugin to create or link to a meeting workspace ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/plugins/sharepoint-features/meeting-workspace.c b/plugins/sharepoint-features/meeting-workspace.c +new file mode 100644 +index 0000000..791a87b +--- /dev/null ++++ b/plugins/sharepoint-features/meeting-workspace.c +@@ -0,0 +1,230 @@ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static void action_meeting_workspace (GtkAction *action, EventEditor *editor); ++void org_gnome_meeting_workspace (EPlugin *ep, ECalEventTargetCompEditor *target); ++ ++static const gchar *ui = ++"" ++" " ++" " ++" " ++""; ++ ++static GtkActionEntry meeting_entries[] = { ++ { "meeting-workspace", ++ "stock_people", ++ N_("Meeting Workspace"), ++ NULL, ++ N_("Create or Link to Meeting Workspaces"), ++ G_CALLBACK (action_meeting_workspace) } ++}; ++ ++typedef struct { ++ GtkWidget *dialog; ++ GtkWidget *title_entry; ++ GtkWidget *template_label; ++ GtkWidget *template_combo; ++ GtkWidget *create_radio; ++ GtkWidget *link_radio; ++ GtkWidget *workspace_label; ++ GtkWidget *workspace_combo; ++ GtkWidget *statusbar; ++ gboolean got_workspaces; ++ guint contextid; ++ ++ EventEditor *editor; ++} MeetingWorkspaceWidget; ++ ++static DBusGProxy * ++get_dice_dbus_proxy () ++{ ++ GError *err = NULL; ++ DBusGConnection *conn = dbus_g_bus_get (DBUS_BUS_SESSION, &err); ++ if (!conn) { ++ g_printerr ("Failed to connect: %s\n", err->message); ++ g_error_free (err); ++ return NULL; ++ } ++ ++ return dbus_g_proxy_new_for_name (conn, "Novell.ICEDesktop.Daemon", "/Novell/ICEDesktop/Daemon", ++ "Novell.ICEDesktop.Daemon"); ++} ++ ++static MeetingWorkspaceWidget * ++setup_widgets (void) ++{ ++ char *gladefile; ++ GladeXML *xml; ++ MeetingWorkspaceWidget *mws; ++ ++ gladefile = g_build_filename (EVOLUTION_GLADEDIR, "meetingworkspaces.glade", NULL); ++ xml = glade_xml_new (gladefile, NULL, NULL); ++#define GW(name) glade_xml_get_widget (xml, name) ++ ++ mws = g_new0 (MeetingWorkspaceWidget, 1); ++ mws->dialog = GW("meeting-workspace-dialog"); ++ mws->title_entry = GW("title-entry"); ++ mws->template_label = GW("template-label"); ++ mws->template_combo = GW("template-combo"); ++ mws->create_radio = GW("create-radio"); ++ mws->link_radio = GW("link-radio"); ++ mws->workspace_label = GW("workspaces-label"); ++ mws->workspace_combo = GW("workspaces-combo"); ++ mws->statusbar = GW("statusbar"); ++ ++ return mws; ++} ++ ++static void ++create_toggled_cb (GtkToggleButton *create_radio, gpointer user_data) ++{ ++ gboolean active; ++ MeetingWorkspaceWidget *mws = user_data; ++ ++ active = gtk_toggle_button_get_active (create_radio); ++ ++ gtk_entry_set_editable ((GtkEntry *)mws->title_entry, active); ++ gtk_widget_set_sensitive (mws->template_combo, active); ++} ++ ++static void ++link_toggled_cb (GtkToggleButton *link_radio, gpointer user_data) ++{ ++ gboolean active; ++ MeetingWorkspaceWidget *mws = user_data; ++ ++ active = gtk_toggle_button_get_active (link_radio); ++ gtk_widget_set_sensitive (mws->workspace_combo, active); ++ ++ if (active && !mws->got_workspaces) { ++ gtk_statusbar_push ((GtkStatusbar *)mws->statusbar, mws->contextid, ++ _("Loading Meeting workspaces...")); ++ ++ // Get the meeting workspaces and set them ++ ++ mws->got_workspaces = TRUE; ++ } ++} ++ ++static void ++release_memory (MeetingWorkspaceWidget *mws) ++{ ++ ++} ++ ++static void ++dialog_response_cb (GtkDialog *dialog, int response_id, gpointer user_data) ++{ ++ MeetingWorkspaceWidget *mws = user_data; ++ ++ if (response_id == GTK_RESPONSE_OK) { ++ gboolean active; ++ const char *workspace_url = NULL; ++ ECalComponent *comp; ++ ++ active = gtk_toggle_button_get_active ((GtkToggleButton *) mws->link_radio); ++ ++ if (active) { ++ // Get the workspace from combo box selection ++ } else { ++ // Create the meeting workspace ++ const char *title; ++ ++ title = gtk_entry_get_text ((GtkEntry *) mws->title_entry); ++ ++ if (!title || !*title) { ++ gtk_statusbar_push ((GtkStatusbar *) mws->statusbar, mws->contextid, ++ _("Please set a title and press OK.")); ++ return; ++ } ++ ++ gtk_statusbar_push ((GtkStatusbar *) mws->statusbar, mws->contextid, ++ _("Creating Meeting Workspace. Please wait...")); ++ // Create Meeting Workspace ++ } ++ ++ // Set the workspace url to component ++ comp = comp_editor_get_comp ((CompEditor *) mws->editor); ++ } ++ ++ gtk_widget_destroy (mws->dialog); ++ release_memory (mws); ++} ++ ++static void ++init_widgets (MeetingWorkspaceWidget *mws) ++{ ++ g_signal_connect((mws->create_radio), "toggled", ++ G_CALLBACK (create_toggled_cb), mws); ++ ++ g_signal_connect((mws->link_radio), "toggled", ++ G_CALLBACK (link_toggled_cb), mws); ++ ++ g_signal_connect((mws->dialog), "response", ++ G_CALLBACK (dialog_response_cb), mws); ++ ++ gtk_widget_set_sensitive (mws->workspace_combo, FALSE); ++ ++ gtk_combo_box_set_active ((GtkComboBox *) mws->template_combo, 0); ++ ++ mws->contextid = gtk_statusbar_get_context_id ((GtkStatusbar *)mws->statusbar, "Meeting workspace status"); ++} ++ ++static void ++action_meeting_workspace (GtkAction *action, EventEditor *editor) ++{ ++ MeetingWorkspaceWidget *mws; ++ ++ mws = setup_widgets (); ++ init_widgets (mws); ++ mws->editor = editor; ++ ++ gtk_dialog_run ((GtkDialog *) mws->dialog); ++ g_print ("Clicked meeting workspace \n"); ++} ++ ++void ++org_gnome_meeting_workspace (EPlugin *ep, ECalEventTargetCompEditor *target) ++{ ++ GtkActionGroup *action_group; ++ GtkUIManager *manager; ++ GError *error = NULL; ++ CompEditor *editor = target->editor; ++ CompEditorFlags flags; ++ ECal *client; ++ const char *uri; ++ ++ client = comp_editor_get_client (editor); ++ uri = e_cal_get_uri (client); ++ flags = comp_editor_get_flags (editor); ++ ++ if (!g_str_has_prefix (uri, "sharepoint://")) ++ return; ++ ++ if (!(flags & COMP_EDITOR_MEETING && flags & COMP_EDITOR_NEW_ITEM)) ++ return; ++ ++ action_group = comp_editor_get_action_group (editor, "coordinated"); ++ gtk_action_group_add_actions (action_group, meeting_entries, ++ G_N_ELEMENTS (meeting_entries), editor); ++ ++ manager = comp_editor_get_ui_manager (editor); ++ gtk_ui_manager_add_ui_from_string (manager, ui, -1, &error); ++ if (error != NULL) { ++ g_critical ("%s: %s", G_STRFUNC, error->message); ++ g_error_free (error); ++ } ++}