...
 
Commits (301)
Evolution 3.16.5 2015-08-10
---------------------------
Bug Fixes:
Bug 724017 - Crash in e_addressbook_view_delete_selection() (Milan Crha)
Bug 746276 - e_client_cache_get_client_sync() gets stuck (Milan Crha)
Bug 751225 - Spell check selection changes font settings to initial settings (Tomas Popela)
Bug 752637 - Delete single instance of recurring event deletes all instances (Milan Crha)
Bug 753029 - Correct "Security Information" dialog size requests (Milan Crha)
Bug 752997 - Crash when replying to the message (Tomas Popela)
Bug 753059 - Crash in spell check dialog when clicking replace buttons with no suggestion selected (Tomas Popela)
Bug 752994 - Google authentication method overwritten for GOA books (Milan Crha)
Bug 347846 - GalA11yETableColumnHeader: implement AtkComponent (Mike Gorse)
Miscellaneous:
EHTMLEditorSelection - Copy&pasting quoted content in plain text composer preserves formatting (Tomas Popela)
EHTMLEditorSelection - Wrapping of a block can leave the block unwrapped (Tomas Popela)
EHTMLEditorSelection - Wrong block format detected in HTML mode (Tomas Popela)
EHTMLEditorSelection - Warning emitted when going through element with font size set in increment (Tomas Popela)
EHTMLEditorView - Pasting content from message source into plain text composer preserves formatting (Tomas Popela)
EHTMLEditorView - Undoing the 'Wrap Lines' action doesn't work (Tomas Popela)
EHTMLEditorView - Lines of text appended after the signature are sent on one line (Tomas Popela)
EHTMLEditorView - Don't try to wrap the already wrapped blocks (Tomas Popela)
Do not create Contacts source for GMail accounts (Milan Crha)
All-day event covers two days in the mini-calendar (Milan Crha)
EBufferTagger::markup_text: Use character offset when tagging links (Milan Crha)
Do not install tests as writable and executable for everyone (Milan Crha)
Correct categories_icon_theme_hack() function (Milan Crha)
Evolution 3.16.4 2015-07-13
---------------------------
Bug Fixes:
Bug 750560 - EFilterInput is storing multiple values instead of one (Milan Crha)
Bug 750487 - Fix some wrong header guards found by clang (Ting-Wei Lan)
Bug 750299 - Hyperlinks create duplicate text, then deleting the duplicate makes the hyperlink blow up to the whole line (Tomas Popela)
Bug 750661 - Invalid cast from 'WebKitDOMHTMLElement' to 'WebKitDOMCharacterData' (Tomas Popela)
Bug 676974 - Use window's alert sink when preview panel is hidden (Milan Crha)
Bug 750710 - Text colour in composer is sometimes grey (Tomas Popela)
Bug 677495 - [a11y] Message list not emitting selection-changed signal (Milan Crha)
Bug 540157 - Deletes personal S/MIME certificates without proper password (Milan Crha)
Bug 750753 - Attach popup menus to their parent widgets (Jonas Ådahl)
Bug 329869 - All-day event in list view ends on following day (Milan Crha)
Bug 587476 - Hide appointment icons in the Month view (Milan Crha)
Bug 231967 - Use contact's FBURL to fetch Free/Busy information (Milan Crha)
Bug 471791 - Move away from g_asserts to g_ret* (Milan Crha)
Bug 747290 - Workaround crash under refresh_folders_exec(), g_str_hash() (Milan Crha)
Bug 701483 - Inline GPG decryption sometimes hides the decrypted text (Milan Crha)
Bug 750615 - Using Ctrl+Z in plain text composer messes up content (Tomas Popela)
Bug 751381 - Include libgweather/gweather.h in weather sources (Milan Crha)
Bug 510970 - [itip] Let user select calendar even when meeting found (Milan Crha)
Bug 751424 - [WeekView] Location added to Summary with inline editing (Milan Crha)
Bug 751594 - Cannot Tab through whole Composer General preferences (Milan Crha)
Bug 751194 - Bulleted lists indentation jumps levels (Tomas Popela)
Bug 751225 - Spell check selection changes font settings to initial settings (Tomas Popela)
Bug 751186 - Tab not part of editing undo / redo stack and corrupts the stack (Tomas Popela)
Bug 751915 - Crash when using both internal and external editors to compose plain-text mail (Tomas Popela)
Bug 752018 - Events at midnight and 0 minutes duration hidden in UI (Milan Crha)
Bug 752119 - Avoid usage of gtk_style_context_get_background_color() (Milan Crha)
Bug 752086 - Paste with a space on the right adds also new-line (Tomas Popela)
Miscellaneous:
Soft-depend on gtk+ 3.12 and 3.16 (Milan Crha)
Composer - Leave copy&pasting inside the composer on WebKit (Tomas Popela)
Editor - Width limits are wrong for lists when switching composer modes (Tomas Popela)
EHTMLEditor - Improve lists formats (Tomas Popela)
EHTMLEditorSelection - Get CSSStyleDeclaration from element instead of DOMWindow (Tomas Popela)
EHTMLEditorSelection - Remove unused variable (Tomas Popela)
EHTMLEditorSelection - Text in quoted content is wrongly wrapped when contains tabulator (Tomas Popela)
EHTMLEditorSelection - Blocks are wrongly wrapped when the last character is space (Tomas Popela)
EHTMLEditorSelection - Alignment cannot be set back to left in list (Tomas Popela)
EHTMLEditorSelection - Width limit is set when indenting block (Tomas Popela)
EHTMLEditorSelection - Fix indentation (Tomas Popela)
EHTMLEditorSelection - Alignment could be wrong (Tomas Popela)
EHTMLEditorSelection - Current block format is wrong for nested lists (Tomas Popela)
EHTMLEditorSelection - Fix the change of a list formatting to another list formatting (Tomas Popela)
EHTMLEditorSelection - Fix the formatting change from list to block (Tomas Popela)
EHTMLEditorSelection - Roman Numeral and Alphabetical list formats are not detected (Tomas Popela)
EHTMLEditorView - Don't try to unref non-existing DOMRange object (Tomas Popela)
EHTMLEditorView - Magic links are not working anymore (Tomas Popela)
EHTMLEditorView - Appending text to the link is broken (Tomas Popela)
EHTMLEditorView - Improve debug output of undo/redo history events (Tomas Popela)
EHTMLEditorView - Remove debug outputs committed by mistake (Tomas Popela)
EHTMLEditorView - Nodes from undo/redo history could be modified (Tomas Popela)
EHTMLEditorView - Undo/Redo around links is wrong (Tomas Popela)
EHTMLEditorView - Extra new line in the beginning of quoted content (Tomas Popela)
EHTMLEditorView - Fix appending a text to the link (Tomas Popela)
EHTMLEditorView - Current block is removed when Backspace is pressed on its end (Tomas Popela)
EHTMLEditorView - If deleting quoted content, other content can be deleted as well (Tomas Popela)
EHTMLEditorView - Fix indentation (Tomas Popela)
EHTMLEditorView - Fix leaks discovered by Valgrind (Tomas Popela)
EHTMLEditorView - Allow links to be wrapped on any character, not just on dash (Tomas Popela)
EHTMLEditorView - Inserting space after the link appends it to the link (Tomas Popela)
Don't save the history for various HTML formatting dialogs if the formatting didn't changed (Tomas Popela)
Use configured Date/Time format in Tasks/Memos tooltips (Milan Crha)
[Publish Calendar] Disconnect free-busy-data signal handler (Milan Crha)
[EMailAccountStore] Unnecessary ESource writes on start (Milan Crha)
EShell: Do not require Authentication extension for trust prompts (Milan Crha)
Ignore "Service unavailable" errors in Send/Receive routines (Milan Crha)
Translations:
Gianvito Cavasoli (it)
Daniel Mustieles (es)
Jordi Mas (ca)
Balázs Úr (hu)
Fran Dieguez (gl)
Martin Srebotnjak (sl)
Aurimas Černius (lt)
Evolution 3.16.3 2015-06-08
---------------------------
Bug Fixes:
Bug 749217 - Backspace unindents multiple pasted paragraphs (Tomas Popela)
Bug 749060 - Help->Contents does not open in yelp (Milan Crha)
Bug 748574 - Upgrade to 3.16.1.1 from 3.12.11 has broken my email signature images (Tomas Popela)
Bug 749108 - Embedded inline images pretend message attachments (Milan Crha)
Bug 531054 - Reply to All changes To: and Cc: (Milan Crha)
Bug 593272 - Message preview shows Reply-to header as is (Milan Crha)
Bug 748981 - Option to always show sign/encrypt toolbar buttons in composer (Milan Crha)
Bug 749613 - Crash when trying to wrap non-existing node (Tomas Popela)
Bug 749579 - Whitespace corrupted in outbound email (Tomas Popela)
Bug 733877 - Parse attachments on demand, not on message open (Milan Crha)
Bug 675671 - Update event numbers after event deletion (Milan Crha)
Bug 733877 - Parse attachments on demand, not on message open ][ (Milan Crha)
Bug 684556 - Remove the Face header from the forwarded message body (Milan Crha)
Bug 750202 - Crash under shell_source_invoke_authenticate_cb() (Milan Crha)
Bug 749149 - Text in composer ignores desktop scaling factor (Tomas Popela)
Bug 575242 - New composer window not autosaved until modification (Milan Crha)
Bug 706557 - [attachment-reminder] A clue is missed when followed by a bracket (Milan Crha)
Bug 750414 - Fails to drag&drop contacts between address books (Milan Crha)
Miscellaneous:
EHTMLEditorSelection - Clean the code used for wrapping (Tomas Popela)
EHTMLEditorSelection - Selection markers are saved on wrong position after Tabulator (Tomas Popela)
EHTMLEditorView - Fix possible leak (Tomas Popela)
ExternalEditor - Fix leaks of WebKit objects (Tomas Popela)
Correct signature stripping in HTML messages (Milan Crha)
EHTMLEditorView - Busy loop after writing ";)" into composer (Tomas Popela)
Fix a double-free on a picture gallery dispose (composer close) (Milan Crha)
Address some of the Coverity Scan issues (Milan Crha)
Fix few memory leaks (Milan Crha)
Avoid cairo_show_text(), use PangoLayout instead (Milan Crha)
Translations:
Piotr Drąg (pl)
Marek Černocký (cs)
Martin Srebotnjak (sl)
Jordi Mas (ca)
Dušan Kazik (sk)
Benjamin Steinwender (de)
Cédric Valmary (oc)
Evolution 3.16.2 2015-05-11
---------------------------
Bug Fixes:
Bug 747575 - EHTMLEditorView never freed (Tomas Popela)
Bug 747510 - Add composer option "Inherit theme colors in HTML mode" (Tomas Popela)
Bug 746276 - e_client_cache_get_client_sync() gets stuck (Milan Crha)
Bug 747824 - Circular type dependency in e-spell-dictionary.h and e-spell-checker.h (Milan Crha)
Bug 680011 - ItipView created multiple times for an attached invitation (Milan Crha)
Bug 747994 - Menu key and spell checking ; evolution editor (Tomas Popela)
Bug 699986 - Preselect a random color on a new calendar source (Milan Crha)
Bug 743926 - Slow to render large plain text emails (Milan Crha)
Bug 732891 - Crash under process_elements() (Tomas Popela)
Bug 747996 - Cannot apply TT on multiple lines at once (Tomas Popela)
Bug 701221 - Hide system notification on an alarm dismiss/snooze (Milan Crha)
Bug 748217 - undo of Ctrl-Backspace and Ctrl-Delete is broken for multi-character strings (Tomas Popela)
Bug 748178 - Eats CPU and memory when replying to calendar invite (Tomas Popela)
Bug 747729 - Update UI styles to be closer to gtk+ 3.16 (Trinh Anh Ngoc)
Bug 748285 - Table header icons out of position with gtk+ 3.16 (Trinh Anh Ngoc)
Bug 748246 - Load only used spell-checker dictionaries (Milan Crha)
Bug 585387 - Replying to a newsgroup from a vfolder doesn't work (Milan Crha)
Bug 748359 - To header collapsed in printed version when many addressees (Milan Crha)
Bug 707521 - Editing detached instance in editor removes Recurrence ID (Milan Crha)
Bug 672129 - Content-Disposition header confuses mail parser for text/plain (Milan Crha)
Bug 748679 - Cannot middle-click paste text from composer (Tomas Popela)
Bug 704824 - Dropdown list of calendars in ITIP mail becomes empty after accepting appointment (Tomas Popela)
Bug 748878 - Crash in ect_dispose() on quit (Milan Crha)
Miscellaneous:
Composer - Don't block selection-changed handlers if they are already blocked (Tomas Popela)
EHTMLEditorView - Critical warning shown when declining a meeting invitation (Tomas Popela)
EHTMLEditorView - Free an unused history event object when inserting the tabulator fails (Tomas Popela)
EHTMLEditorView - Avoid crash under force_spell_check_on_timeout() (Milan Crha)
EHTMLEditorView - Pressing return on the end of HEADING element misbehaves (Tomas Popela)
EHTMLEditorView - WebKitDOMRange is lost when editing quoted content (Tomas Popela)
EHTMLEditorSelection - Don't perform actions on selection-changed callback when we cannot obtain valid range (Tomas Popela)
EHTMLEditorView - Surrounded links are wrong (Tomas Popela)
ESpellChecker - Correct typo in documentation (Tomas Popela)
Fix various memory leaks (Milan Crha)
EMailRequest - SVG images in HTML email are not displayed (Tomas Popela)
EHTMLEditorView - Runtime warning when editing HTML message as new (Tomas Popela)
EHTMLEditorView - Remove unneeded space (Tomas Popela)
EHTMLEditorView - Fix the 'Paste Quotation' action (Tomas Popela)
EHTMLEditorView - New line from the beginning of pasted text lost when pasting (Tomas Popela)
EHTMLEditorView - Preformated block in quoted content is wrapped when splitted with new line (Tomas Popela)
Composer - Insert credits, headers and other information in Normal block (Tomas Popela)
Misleading counts of events in the Calendar view's mini-calendar (Milan Crha)
EHTMLEditorActions - Optimize history saving for 'Cut' action (Tomas Popela)
EHTMLEditorView - Minor code and style changes (Tomas Popela)
Attachment load/save should keep a reference to its top-level window (Milan Crha)
EHTMLEditorView - Connect the 'changed::antialiasing' signal to the right object (Tomas Popela)
EHTMLEditorSelection - Fix text wrapping (Tomas Popela)
EHTTPRequest - GFileInfo not valid when machine is under heavy load (Tomas Popela)
EHTMLEditorSelection - Don't wrap every block in selection during 'Wrap lines' action (Tomas Popela)
Composer - Undo initiated with shortcuts doesn't stop (Tomas Popela)
Composer - Undo/Redo on operations with selection could be wrong (Tomas Popela)
EHTMLEditorView - Don't print coordinates for HISTORY_AND and HISTORY_START events (Tomas Popela)
EHTMLEditorView - Replace g_timeout_add with g_timeout_add_seconds (Tomas Popela)
Translations:
Stas Solovey (ru)
Matej Urbančič (sl)
Sveinn í Felli (is)
Kristjan SCHMIDT (eo)
Sveinn í Felli ()
Jordi Mas (ca)
Evolution 3.16.1 2015-04-13
---------------------------
Bug Fixes:
Bug 746277 - Typing text in composer destroys primary clipboard content (Tomas Popela)
Bug 746349 - Pasting '\n' into composer produces critical runtime warning (Tomas Popela)
Bug 339511 - Need a more helpful message when no dictionary is installed (Tomas Popela)
Bug 746641 - Segfault when trying to "ctrl+x" (cut) selected addressee from CC field in email composer (Tomas Popela)
Bug 746733 - Turning off Plain text font style moves cursor by one letter (Tomas Popela)
Bug 747056 - Undoing deletion of the quote prefix for a line does not do the right thing (Tomas Popela)
Bug 746686 - [mail-notification] Focus existing 'mail' window, if exists (Milan Crha)
Bug 746950 - Menu item tooltip changes height of status bar (Milan Crha)
Bug 747018 - Provide a scalable -symbolic variant of the app icon (Jakub Steiner)
Bug 747167 - Umlauts in summary mess up spelling integration (Milan Crha)
Bug 724227 - Do not mix PGP and S/MIME security on message reply (Milan Crha)
Bug 747055 - Line full of equals signs halts selection of quoted text with shift + page down (Tomas Popela)
Bug 746876 - Signature's empty new line at the end of text/plain lost on edit (Tomas Popela)
Bug 747018 - Move scalable -symbolic app icon into 'symbolic' folder (Jakub Steiner)
Bug 747031 - Messages Not Marked as Read When Changing Folder (Milan Crha)
Bug 746763 - Independent layout settings for sub-shell windows (Milan Crha)
Bug 731579 - Broken encoding when replying with selection (Milan Crha)
Bug 747461 - The tar command used to restore backups doesn't work on FreeBSD (Ting-Wei Lan)
Bug 709715 - Message list search change lost on regen cancel (Milan Crha)
Bug 747473 - Recurring all day events shown incorrectly (Milan Crha)
Miscellaneous:
EHTMLEditorActions - Remove debug prints that were introduces with undo/redo implementation (Tomas Popela)
EHTMLEditorView - Don't perform spell check on empty body (Tomas Popela)
EHTMLEditorView - Some message text lost when replying on mail from GMail (Tomas Popela)
EHTMLEditorView - Introduce function that performs spell check just in current viewport (Tomas Popela)
EHTMLEditorView - Just check if the element has attribute instead of checking its value (Tomas Popela)
EHTMLEditorView - Image smileys are sent as base64 data (Tomas Popela)
EHTMLEditorView - Smiley image doesn't have the filename set (Tomas Popela)
EHTMLEditorView - Don't try to quote the content when creating the plain text version of HTML mail (Tomas Popela)
EHTMLEditorView - Spell check is lost when pressing Enter (Tomas Popela)
EHTMLEditorView - Fix formatting (Tomas Popela)
EHTMLEditorView - Caret is moved on end of block when pressing Backspace on its start (Tomas Popela)
EHTMLEditorView - Punctuation is added to the link (Tomas Popela)
EHTMLEditorView - HTML scroll event callback is not called (Tomas Popela)
EHTMLEditorView - Remove unused function (Tomas Popela)
EHTMLEditorSelection - Rework how the indented block is detected (Tomas Popela)
EHTMLEditorSelection - When restoring selection correctly restore the anchor point (Tomas Popela)
EHTMLEditorSelection - Use type macro to check if element is blockquote (Tomas Popela)
EHTMLEditorSelection - Space after link is lost when wrapping block (Tomas Popela)
EHTMLEditorSelection - Trailing space is lost when wrapping content (Tomas Popela)
EHTMLEditorSelection - When restoring selection and no range is in composer, create it (Tomas Popela)
EHTMLEditorSelection - Remove unneeded code (Tomas Popela)
EHTMLEditorSelection - Remove code that was committed by mistake (Tomas Popela)
EHTMLEditorSelection - When wrapping the block take the Tab characters into account (Tomas Popela)
EHTMLEditorSelection - History saved wrongly when setting Blockquote format (Tomas Popela)
EHTMLEditorSelection - Recalculate just plain text properties when selection changes in plain text mode (Tomas Popela)
EHTMLEditorSelection - Improve history selection saving on various places (Tomas Popela)
EMailSignatureEditor - Use correct alert sink (Milan Crha)
Add a safety check to e-tree-table-adapter.c:resort_node() function (Milan Crha)
Remove Bcc header from 'Sender or Recipients' filter search condition (Milan Crha)
Fix few memory leaks from webkit_dom_element_get_attribute() calls (Milan Crha)
Fix various leaks of WebKit DOM objects (Tomas Popela)
Fix few memory leaks around composer and e-widget-undo.c (Milan Crha)
Fix regressions after "Fix various leaks of WebKit DOM objects" (Tomas Popela)
Composer - Fix various leaks (Tomas Popela)
Add a 'list' option to the Mail Free Form expression (Milan Crha)
Suggest the best authentication method after checking supported auths (Milan Crha)
Use own thread pool for WebKit content download (Milan Crha)
[EHTTPRequest] Immediately cancel ongoing download on request cancel (Milan Crha)
Retrieved list of Google calendars opened empty (Milan Crha)
Avoid use of uninitialized variables (Milan Crha)
Composer - Fix code around block wrapping (Tomas Popela)
Composer - Don't remove wrapping from user wrapped blocks (Tomas Popela)
Correct mismatch of gtk_style_context_save() and gtk_style_context_restore() (Milan Crha)
Composer - Extra new line added on the end of reply (Tomas Popela)
EMComposerUtils - Remove unneeded variable (Tomas Popela)
Translations:
Gábor Kelemen (hu)
Matej Urbančič (sl)
Jordi Mas (ca)
GNOME Translation Robot (gl)
Inaki Larranaga Murgoitio (eu)
Sveinn í Felli (is)
Dušan Kazik (sk)
Evolution 3.16.0 2015-03-23
---------------------------
......
......@@ -299,7 +299,7 @@ add_empty_entry (EContactEditorDynTable *dyntable)
static void
remove_empty_entries (EContactEditorDynTable *dyntable, gboolean fillup)
{
guint row, col, pos;
guint row, col = G_MAXUINT, pos;
GtkGrid* grid;
GtkWidget* w;
EContactEditorDynTableClass *class;
......@@ -334,11 +334,10 @@ remove_empty_entries (EContactEditorDynTable *dyntable, gboolean fillup)
}
if (fillup
&& (dyntable->priv->curr_entries < dyntable->priv->show_min_entries
|| (dyntable->priv->justified && col < dyntable->priv->columns-1)))
if (fillup &&
(dyntable->priv->curr_entries < dyntable->priv->show_min_entries ||
(dyntable->priv->justified && col < dyntable->priv->columns-1)))
add_empty_entry (dyntable);
}
/* clears data, not the combo box list store */
......
......@@ -57,7 +57,7 @@ enum {
};
static GtkTargetEntry drag_types[] = {
{ (gchar *) "text/x-source-vcard", 0, 0 }
{ (gchar *) "text/x-source-vcard", 0, 1 }
};
G_DEFINE_TYPE (
......@@ -297,6 +297,7 @@ addressbook_selector_data_dropped (ESourceSelector *selector,
MergeContext *merge_context;
EAddressbookModel *model;
EBookClient *source_client;
ESource *source_source = NULL;
ESourceRegistry *registry;
GSList *list;
const gchar *string;
......@@ -310,16 +311,32 @@ addressbook_selector_data_dropped (ESourceSelector *selector,
registry = e_source_selector_get_registry (selector);
eab_source_and_contact_list_from_string (
registry, string, NULL, &list);
if (info == drag_types[0].info)
eab_source_and_contact_list_from_string (
registry, string, &source_source, &list);
else
list = eab_contact_list_from_string (string);
if (list == NULL)
if (list == NULL) {
g_clear_object (&source_source);
return FALSE;
}
model = e_addressbook_view_get_model (priv->current_view);
source_client = e_addressbook_model_get_client (model);
g_return_val_if_fail (E_IS_BOOK_CLIENT (source_client), FALSE);
if (remove_from_source && source_source &&
!e_source_equal (source_source, e_client_get_source (E_CLIENT (source_client)))) {
g_warning ("%s: Source book '%s' doesn't match the view client '%s', skipping drop",
G_STRFUNC, e_source_get_uid (source_source),
e_source_get_uid (e_client_get_source (E_CLIENT (source_client))));
g_clear_object (&source_source);
return FALSE;
}
g_clear_object (&source_source);
merge_context = merge_context_new (
registry, g_object_ref (source_client), NULL, list);
merge_context->remove_from_source = remove_from_source;
......
......@@ -307,7 +307,7 @@ addressbook_view_create_table_view (EAddressbookView *view,
/* Failure here is fatal. */
if (local_error != NULL) {
g_error ("%s: %s", etspecfile, local_error->message);
g_assert_not_reached ();
g_return_if_reached ();
}
/* Here we create the table. We give it the three pieces of
......@@ -317,6 +317,7 @@ addressbook_view_create_table_view (EAddressbookView *view,
gtk_container_add (GTK_CONTAINER (view), widget);
g_object_unref (specification);
g_object_unref (extras);
g_free (etspecfile);
view->priv->object = G_OBJECT (adapter);
......@@ -886,8 +887,6 @@ e_addressbook_view_init (EAddressbookView *view)
gtk_scrolled_window_set_policy (
GTK_SCROLLED_WINDOW (view),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (
GTK_SCROLLED_WINDOW (view), GTK_SHADOW_IN);
}
static void
......@@ -1362,6 +1361,8 @@ e_addressbook_view_delete_selection (EAddressbookView *view,
gal_view = gal_view_instance_get_current_view (view_instance);
list = e_addressbook_view_get_selected (view);
g_return_if_fail (list != NULL);
contact = list->data;
if (g_slist_next (list))
......
......@@ -106,7 +106,7 @@ e_minicard_view_drag_data_get (GtkWidget *widget,
EBookClient *book_client = NULL;
gchar *value;
g_object_get (view->adapter, "book_client", &book_client, NULL);
g_object_get (view->adapter, "client", &book_client, NULL);
value = eab_book_and_contact_list_to_string (book_client, view->drag_list);
gtk_selection_data_set (
......@@ -140,8 +140,6 @@ e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter,
view->drag_list = e_minicard_view_get_card_list (view);
g_print ("dragging %d card(s)\n", g_slist_length (view->drag_list));
target_list = gtk_target_list_new (drag_types, G_N_ELEMENTS (drag_types));
context = gtk_drag_begin (
......
......@@ -546,7 +546,7 @@ render_title_block (EABContactFormatter *formatter,
const gchar *uri = photo->data.uri;
/* WebKit 2.2.x doesn't re-escape URIs, thus do this for versions before and after this */
#if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
gchar *unescaped = g_uri_unescape_string (photo->data.uri, NULL);
gchar *unescaped = g_uri_unescape_string (uri, NULL);
uri = unescaped;
#endif
g_string_append_printf (
......@@ -1064,7 +1064,7 @@ render_compact (EABContactFormatter *formatter,
const gchar *uri = photo->data.uri;
/* WebKit 2.2.x doesn't re-escape URIs, thus do this for versions before and after this */
#if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
gchar *unescaped = g_uri_unescape_string (photo->data.uri, NULL);
gchar *unescaped = g_uri_unescape_string (uri, NULL);
uri = unescaped;
#endif
g_string_append_printf (
......
......@@ -21,7 +21,7 @@
*/
#ifndef _EVOLUTION_ADDRESSBOOK_EXPORT_H_
#define _EVOLUTION_ADDRESSBOOK_EXPORT_H__
#define _EVOLUTION_ADDRESSBOOK_EXPORT_H_
#include <libedataserver/libedataserver.h>
......
......@@ -112,6 +112,10 @@ typedef struct {
/* original trigger of the instance from component */
time_t orig_trigger;
#ifdef HAVE_LIBNOTIFY
NotifyNotification *notify;
#endif
/* Whether this is a snoozed queued alarm or a normal one */
guint snooze : 1;
} QueuedAlarm;
......@@ -392,6 +396,12 @@ remove_queued_alarm (CompQueuedAlarms *cqa,
}
}
#ifdef HAVE_LIBNOTIFY
if (qa->notify) {
notify_notification_close (qa->notify, NULL);
g_clear_object (&qa->notify);
}
#endif
g_free (qa);
/* If this was the last queued alarm for this component, remove the
......@@ -557,7 +567,7 @@ add_component_alarms (ClientAlarms *ca,
if (!alarm_id)
continue;
qa = g_new (QueuedAlarm, 1);
qa = g_new0 (QueuedAlarm, 1);
qa->alarm_id = alarm_id;
qa->instance = instance;
qa->orig_trigger = instance->trigger;
......@@ -908,7 +918,7 @@ query_objects_changed_async (struct _query_msg *msg)
if (!alarm_id)
continue;
qa = g_new (QueuedAlarm, 1);
qa = g_new0 (QueuedAlarm, 1);
qa->alarm_id = alarm_id;
qa->instance = instance;
qa->snooze = FALSE;
......@@ -1014,7 +1024,13 @@ create_snooze (CompQueuedAlarms *cqa,
orig_qa->instance->trigger = t;
orig_qa->alarm_id = new_id;
orig_qa->snooze = TRUE;
debug (("Adding a alarm at %s", e_ctime (&t)));
#ifdef HAVE_LIBNOTIFY
if (orig_qa->notify) {
notify_notification_close (orig_qa->notify, NULL);
g_clear_object (&orig_qa->notify);
}
#endif
debug (("Adding an alarm at %s", e_ctime (&t)));
}
/* Launches a component editor for a component */
......@@ -1802,8 +1818,8 @@ popup_notification (time_t trigger,
gchar *str, *start_str, *end_str, *alarm_str, *time_str;
icaltimezone *current_zone;
ECalComponentOrganizer organiser;
NotifyNotification *notify;
gchar *body;
GError *error = NULL;
debug (("..."));
......@@ -1858,18 +1874,24 @@ popup_notification (time_t trigger,
"%s %s", start_str, time_str);
}
notify = notify_notification_new (summary, body, "appointment-soon");
if (qa->notify) {
notify_notification_close (qa->notify, NULL);
g_clear_object (&qa->notify);
}
qa->notify = notify_notification_new (summary, body, "appointment-soon");
/* If the user wants Evolution notifications suppressed, honor
* it even though evolution-alarm-notify is a separate process
* with its own .desktop file. */
notify_notification_set_hint (
notify, "desktop-entry",
qa->notify, "desktop-entry",
g_variant_new_string (PACKAGE));
if (!notify_notification_show (notify, NULL))
g_warning ("Could not send notification to daemon\n");
if (!notify_notification_show (qa->notify, &error))
g_warning ("Could not send notification to daemon: %s\n", error ? error->message : "Unknown error");
g_clear_error (&error);
g_free (alarm_summary);
g_free (start_str);
g_free (end_str);
......
......@@ -887,7 +887,7 @@ cal_comp_get_instance_times (ECalClient *client,
if (st_zone)
zone = st_zone;
}
}
}
}
*instance_start = icaltime_as_timet_with_zone (start_time, zone);
......@@ -914,8 +914,7 @@ cal_comp_get_instance_times (ECalClient *client,
if (end_zone)
zone = end_zone;
}
}
}
}
*instance_end = icaltime_as_timet_with_zone (end_time, zone);
......
......@@ -974,10 +974,14 @@ fill_component (RecurrencePage *rpage,
e_cal_component_set_exrule_list (comp, NULL);
simple_recur_to_comp (rpage, comp);
} else {
gboolean had_recurrences = e_cal_component_has_recurrences (comp);
e_cal_component_set_rdate_list (comp, NULL);
e_cal_component_set_rrule_list (comp, NULL);
e_cal_component_set_exrule_list (comp, NULL);
e_cal_component_set_recurid (comp, NULL);
if (had_recurrences)
e_cal_component_set_recurid (comp, NULL);
}
/* Set exceptions */
......
......@@ -1018,18 +1018,35 @@ cal_data_model_instance_generated (ECalComponent *comp,
{
GenerateInstancesData *gid = data;
ComponentData *comp_data;
ECalComponent *comp_copy;
icaltimetype tt, tt2;
g_return_val_if_fail (gid != NULL, FALSE);
cal_comp_get_instance_times (gid->client, e_cal_component_get_icalcomponent (comp),
comp_copy = e_cal_component_clone (comp);
g_return_val_if_fail (comp_copy != NULL, FALSE);
tt = icalcomponent_get_dtstart (e_cal_component_get_icalcomponent (comp_copy));
tt2 = icaltime_from_timet_with_zone (instance_start, tt.is_date, gid->zone);
icalcomponent_set_dtstart (e_cal_component_get_icalcomponent (comp_copy), tt2);
tt = icalcomponent_get_dtend (e_cal_component_get_icalcomponent (comp_copy));
tt2 = icaltime_from_timet_with_zone (instance_end, tt.is_date, gid->zone);
icalcomponent_set_dtend (e_cal_component_get_icalcomponent (comp_copy), tt2);
e_cal_component_rescan (comp_copy);
cal_comp_get_instance_times (gid->client, e_cal_component_get_icalcomponent (comp_copy),
gid->zone, &instance_start, NULL, &instance_end, NULL, NULL);
if (instance_end > instance_start)
instance_end--;
comp_data = component_data_new (comp, instance_start, instance_end, FALSE);
comp_data = component_data_new (comp_copy, instance_start, instance_end, FALSE);
*gid->pexpanded_recurrences = g_slist_prepend (*gid->pexpanded_recurrences, comp_data);
g_object_unref (comp_copy);
return TRUE;
}
......@@ -1527,8 +1544,8 @@ cal_data_model_update_client_view (ECalDataModel *data_model,
ESource *source;
ViewData *view_data;
CreateViewData *cv_data;
const gchar *alert_ident;
gchar *description;
const gchar *alert_ident = NULL;
gchar *description = NULL;
LOCK_PROPS ();
......@@ -1659,6 +1676,12 @@ cal_data_model_remove_client_view (ECalDataModel *data_model,
cal_data_model_notify_remove_components_cb, &nrc_data);
g_hash_table_remove_all (view_data->components);
if (view_data->lost_components) {
g_hash_table_foreach (view_data->lost_components,
cal_data_model_notify_remove_components_cb, &nrc_data);
g_hash_table_remove_all (view_data->lost_components);
}
cal_data_model_thaw_all_subscribers (data_model);
if (view_data->view)
......@@ -2503,8 +2526,8 @@ cal_data_model_foreach_component (ECalDataModel *data_model,
continue;
if ((in_range_start == in_range_end && in_range_start == (time_t) 0) ||
(comp_data->instance_start < in_range_end &&
comp_data->instance_end > in_range_start)) {
(comp_data->instance_start < in_range_end && comp_data->instance_end > in_range_start) ||
(comp_data->instance_start == comp_data->instance_end && comp_data->instance_end == in_range_start)) {
if (!func (data_model, view_data->client, id, comp_data->component,
comp_data->instance_start, comp_data->instance_end, user_data))
checked_all = FALSE;
......@@ -2521,8 +2544,8 @@ cal_data_model_foreach_component (ECalDataModel *data_model,
continue;
if ((in_range_start == in_range_end && in_range_start == (time_t) 0) ||
(comp_data->instance_start < in_range_end &&
comp_data->instance_end > in_range_start)) {
(comp_data->instance_start < in_range_end && comp_data->instance_end > in_range_start) ||
(comp_data->instance_start == comp_data->instance_end && comp_data->instance_end == in_range_start)) {
if (!func (data_model, view_data->client, id, comp_data->component,
comp_data->instance_start, comp_data->instance_end, user_data))
checked_all = FALSE;
......
......@@ -288,7 +288,7 @@ setup_e_table (ECalListView *cal_list_view)
/* Failure here is fatal. */
if (local_error != NULL) {
g_error ("%s: %s", etspecfile, local_error->message);
g_assert_not_reached ();
g_return_if_reached ();
}
widget = e_table_new (E_TABLE_MODEL (model), extras, specification);
......@@ -297,6 +297,7 @@ setup_e_table (ECalListView *cal_list_view)
gtk_widget_show (widget);
g_object_unref (specification);
g_object_unref (extras);
g_free (etspecfile);
/* Connect signals */
......
......@@ -84,6 +84,34 @@ get_dtend (ECalModelCalendar *model,
if (!icaltime_is_valid_time (tt_end) || icaltime_is_null_time (tt_end))
return NULL;
if (tt_end.is_date && icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY)) {
struct icaltimetype tt_start;
icaltimezone *start_zone = NULL;
gboolean got_start_zone = FALSE;
tt_start = icalproperty_get_dtstart (prop);
if (icaltime_get_tzid (tt_start)
&& e_cal_client_get_timezone_sync (comp_data->client, icaltime_get_tzid (tt_start), &start_zone, NULL, NULL))
got_start_zone = TRUE;
if (got_start_zone) {
tt_start = icaltime_from_timet_with_zone (comp_data->instance_start, tt_start.is_date, start_zone);
if (model_zone)
icaltimezone_convert_time (&tt_start, start_zone, model_zone);
} else {
tt_start = icaltime_from_timet_with_zone (
comp_data->instance_start,
tt_start.is_date, model_zone);
}
icaltime_adjust (&tt_start, 1, 0, 0, 0);
/* Decrease by a day only if the DTSTART will still be before, or the same as, DTEND */
if (icaltime_compare (tt_start, tt_end) <= 0)
icaltime_adjust (&tt_end, -1, 0, 0, 0);
}
comp_data->dtend = g_new0 (ECellDateEditValue, 1);
comp_data->dtend->tt = tt_end;
......
......@@ -2961,7 +2961,7 @@ e_cal_model_create_component_with_defaults_sync (ECalModel *model,
GCancellable *cancellable,
GError **error)
{
ECalComponent *comp;
ECalComponent *comp = NULL;
icalcomponent *icalcomp;
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
......
......@@ -158,7 +158,8 @@ calendar_view_check_for_retract (ECalComponent *comp,
static void
calendar_view_delete_event (ECalendarView *cal_view,
ECalendarViewEvent *event)
ECalendarViewEvent *event,
gboolean only_occurrence)
{
ECalModel *model;
ECalComponent *comp;
......@@ -177,7 +178,7 @@ calendar_view_delete_event (ECalendarView *cal_view,
vtype = e_cal_component_get_vtype (comp);
/*FIXME remove it once the we dont set the recurrence id for all the generated instances */
if (!e_cal_client_check_recurrences_no_master (event->comp_data->client))
if (!only_occurrence && !e_cal_client_check_recurrences_no_master (event->comp_data->client))
e_cal_component_set_recurid (comp, NULL);
/*FIXME Retract should be moved to Groupwise features plugin */
......@@ -201,25 +202,72 @@ calendar_view_delete_event (ECalendarView *cal_view,
if (delete) {
const gchar *uid;
gchar *rid = NULL;
gchar *rid;
rid = e_cal_component_get_recurid_as_string (comp);
if ((itip_organizer_is_user (registry, comp, event->comp_data->client) ||
itip_sentby_is_user (registry, comp, event->comp_data->client))
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client,
comp, TRUE))
comp, TRUE)) {
if (only_occurrence && !e_cal_component_is_instance (comp)) {
ECalComponentRange range;
/* set the recurrence ID of the object we send */
range.type = E_CAL_COMPONENT_RANGE_SINGLE;
e_cal_component_get_dtstart (comp, &range.datetime);
range.datetime.value->is_date = 1;
e_cal_component_set_recurid (comp, &range);
e_cal_component_free_datetime (&range.datetime);
}
itip_send_component (model, E_CAL_COMPONENT_METHOD_CANCEL,
comp, event->comp_data->client, NULL, NULL,
NULL, TRUE, FALSE, FALSE);
}
e_cal_component_get_uid (comp, &uid);
if (!uid || !*uid) {
g_object_unref (comp);
g_free (rid);
return;
}
rid = e_cal_component_get_recurid_as_string (comp);
if (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
if (only_occurrence) {
if (e_cal_component_is_instance (comp)) {
e_cal_ops_remove_component (model, event->comp_data->client, uid, rid, E_CAL_OBJ_MOD_THIS, FALSE);
} else {
struct icaltimetype instance_rid;
ECalComponentDateTime dt;
icaltimezone *zone = NULL;
e_cal_component_get_dtstart (comp, &dt);
if (dt.tzid) {
GError *local_error = NULL;
e_cal_client_get_timezone_sync (event->comp_data->client, dt.tzid, &zone, NULL, &local_error);
if (local_error != NULL) {
zone = e_calendar_view_get_timezone (cal_view);
g_clear_error (&local_error);
}
} else {
zone = e_calendar_view_get_timezone (cal_view);
}
e_cal_component_free_datetime (&dt);
instance_rid = icaltime_from_timet_with_zone (
event->comp_data->instance_start,
TRUE, zone ? zone : icaltimezone_get_utc_timezone ());
e_cal_util_remove_instances (event->comp_data->icalcomp, instance_rid, E_CAL_OBJ_MOD_THIS);
e_cal_ops_modify_component (model, event->comp_data->client, event->comp_data->icalcomp,
E_CAL_OBJ_MOD_THIS, E_CAL_OPS_SEND_FLAG_DONT_SEND);
}
} else if (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
e_cal_ops_remove_component (model, event->comp_data->client, uid, rid, E_CAL_OBJ_MOD_ALL, FALSE);
else
e_cal_ops_remove_component (model, event->comp_data->client, uid, NULL, E_CAL_OBJ_MOD_THIS, FALSE);
......@@ -792,7 +840,7 @@ cal_view_paste_clipboard_thread (EAlertSinkThreadJobData *job_data,
icaltimezone *default_zone;
ECalModel *model;
ESourceRegistry *registry;
ESource *source, *default_source;
ESource *source = NULL, *default_source = NULL;
EClientCache *client_cache;
EClient *e_client;
ECalClient *client = NULL;
......@@ -1009,7 +1057,7 @@ calendar_view_delete_selection (ESelectable *selectable)
if (event == NULL)
continue;
calendar_view_delete_event (cal_view, event);
calendar_view_delete_event (cal_view, event, FALSE);
}
g_list_free (selected);
......@@ -1392,7 +1440,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
event = (ECalendarViewEvent *) selected->data;
if (is_comp_data_valid (event)) {
calendar_view_delete_event (cal_view, event);
calendar_view_delete_event (cal_view, event, TRUE);
}
g_list_free (selected);
......@@ -1627,7 +1675,7 @@ get_label (struct icaltimetype *tt,
tmp_tm = icaltimetype_to_tm_with_zone (tt, f_zone, t_zone);
return e_datetime_format_format_tm ("calendar", "table", DTFormatKindDateTime, &tmp_tm);
return e_datetime_format_format_tm ("calendar", "table", tt->is_date ? DTFormatKindDate : DTFormatKindDateTime, &tmp_tm);
}
void
......@@ -1702,7 +1750,7 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
{
GtkWidget *label, *box, *hbox, *ebox, *frame;
const gchar *str;
gchar *tmp, *tmp1, *tmp2;
gchar *tmp, *tmp1 = NULL, *tmp2 = NULL;
ECalComponentOrganizer organiser;
ECalComponentDateTime dtstart, dtend;
icalcomponent *clone_comp;
......@@ -1860,6 +1908,8 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
tmp = tmp2;
tmp2 = NULL;
}
} else {
tmp = NULL;
}
e_cal_component_free_datetime (&dtstart);
......
......@@ -353,11 +353,14 @@ e_day_view_find_long_event_days (EDayViewEvent *event,
end_day = day;
}
if (event->start == event->end)
end_day = start_day;
/* Sanity check. */
if (start_day < 0 || start_day >= days_shown
|| end_day < 0 || end_day >= days_shown
|| end_day < start_day) {
g_warning ("Invalid date range for event");
g_warning ("Invalid date range for event, start/end days: %d / %d", start_day, end_day);
return FALSE;
}
......
......@@ -211,6 +211,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
gchar *text = NULL;
gint scroll_flag = 0;
gint row_y;
PangoLayout *layout;
day_view = e_day_view_main_item_get_day_view (main_item);
......@@ -554,24 +555,29 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
cairo_new_path (cr);
if (e_cal_model_get_use_24_hour_format (model)) {
cairo_translate (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH - 32, item_y + item_h - 8);
cairo_translate (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH - 35, item_y + item_h - 8 - 14);
end_regsizeime = g_strdup_printf (
"%2i:%02i",
end_display_hour, end_minute);
} else {
cairo_translate (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH - 48, item_y + item_h - 8);
cairo_translate (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH - 51, item_y + item_h - 8 - 14);
end_regsizeime = g_strdup_printf (
"%2i:%02i%s",
end_display_hour, end_minute,
end_resize_suffix);
}
cairo_set_font_size (cr, 14);
layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (main_item)->canvas), end_regsizeime);
cairo_set_font_size (cr, 13);
if ((red / cc > 0.7) || (green / cc > 0.7) || (blue / cc > 0.7))
cairo_set_source_rgb (cr, 0, 0, 0);
else
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_show_text (cr, end_regsizeime);
pango_cairo_update_layout (cr, layout);
pango_cairo_show_layout (cr, layout);
g_object_unref (layout);
cairo_close_path (cr);
cairo_restore (cr);
}
......@@ -801,16 +807,21 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
if (icon_x_inc == 0)
icon_x += 14;
if (resize_flag)
cairo_move_to (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 10, item_y + 13);
else
cairo_move_to (cr, icon_x, item_y + 13);
if ((red / cc > 0.7) || (green / cc > 0.7) || (blue / cc > 0.7))
cairo_set_source_rgb (cr, 0, 0, 0);
else
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_set_font_size (cr, 14.0);
cairo_show_text (cr, text);
layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (main_item)->canvas), text);
if (resize_flag)
cairo_translate (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 10, item_y + 1);
else
cairo_translate (cr, icon_x, item_y + 1);
cairo_set_font_size (cr, 13.0);
pango_cairo_update_layout (cr, layout);
pango_cairo_show_layout (cr, layout);
g_object_unref (layout);
cairo_close_path (cr);
cairo_restore (cr);
}
......
......@@ -883,6 +883,9 @@ e_day_view_time_item_show_popup_menu (EDayViewTimeItem *time_item,
gtk_widget_show_all (submenu);
gtk_menu_attach_to_widget (GTK_MENU (menu),
GTK_WIDGET (day_view),
NULL);
gtk_menu_popup (
GTK_MENU (menu), NULL, NULL, NULL, NULL,
event->button.button, event->button.time);
......
......@@ -158,6 +158,8 @@ struct _EDayViewPrivate {
gboolean marcus_bains_show_line;
gchar *marcus_bains_day_view_color;
gchar *marcus_bains_time_bar_color;
GdkDragContext *drag_context;
};
typedef struct {
......@@ -368,6 +370,7 @@ static void e_day_view_start_editing_event (EDayView *day_view,
gint event_num,
GdkEventKey *key_event);
static void e_day_view_stop_editing_event (EDayView *day_view);
static void cancel_editing (EDayView *day_view);
static gboolean e_day_view_on_text_item_event (GnomeCanvasItem *item,
GdkEvent *event,
EDayView *day_view);
......@@ -609,6 +612,8 @@ e_day_view_get_text_color (EDayView *day_view,
color.blue = 65535.0f;
}
color.pixel = 0;
return color;
}
......@@ -1211,6 +1216,7 @@ day_view_dispose (GObject *object)
g_clear_object (&day_view->main_canvas);
g_clear_object (&day_view->time_canvas);
g_clear_object (&day_view->priv->model);
g_clear_object (&day_view->priv->drag_context);
g_free (day_view->priv->marcus_bains_day_view_color);
day_view->priv->marcus_bains_day_view_color = NULL;
......@@ -2043,15 +2049,14 @@ e_day_view_init (EDayView *day_view)
day_view->selection_is_being_dragged = FALSE;
day_view->selection_drag_pos = E_DAY_VIEW_DRAG_END;
day_view->selection_in_top_canvas = FALSE;
day_view->drag_last_day = -1;
day_view->drag_event_day = -1;
day_view->drag_event_num = -1;
day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
day_view->priv->drag_context = NULL;
day_view->pressed_event_day = -1;
day_view->drag_event_day = -1;
day_view->drag_last_day = -1;
day_view->auto_scroll_timeout_id = 0;
day_view->large_font_desc = NULL;
......@@ -3068,14 +3073,19 @@ e_day_view_remove_event_cb (EDayView *day_view,
/* If we were editing this event, set editing_event_day to -1 so
* on_editing_stopped doesn't try to update the event. */
if (day_view->editing_event_num == event_num && day_view->editing_event_day == day) {
cancel_editing (day_view);
day_view->editing_event_num = -1;
day_view->editing_event_day = -1;
g_object_notify (G_OBJECT (day_view), "is-editing");
} else if (day_view->editing_event_num > event_num && day_view->editing_event_day == day) {
day_view->editing_event_num--;
}
if (day_view->popup_event_num == event_num && day_view->popup_event_day == day) {
day_view->popup_event_num = -1;
day_view->popup_event_day = -1;
} else if (day_view->popup_event_num > event_num && day_view->popup_event_day == day) {
day_view->popup_event_num--;
}
if (event->timeout > 0) {
......@@ -3083,6 +3093,50 @@ e_day_view_remove_event_cb (EDayView *day_view,
event->timeout = -1;
}
if (day_view->resize_bars_event_num >= event_num && day_view->resize_bars_event_day == day) {
if (day_view->resize_bars_event_num == event_num) {
day_view->resize_bars_event_num = -1;
day_view->resize_bars_event_day = -1;
} else {
day_view->resize_bars_event_num--;
}
}
if (day_view->resize_event_num >= event_num && day_view->resize_event_day == day) {
if (day_view->resize_event_num == event_num) {
e_day_view_abort_resize (day_view);
day_view->resize_event_num = -1;
day_view->resize_event_day = -1;
} else {
day_view->resize_event_num--;
}
}
if (day_view->pressed_event_num >= event_num && day_view->pressed_event_day == day) {
if (day_view->pressed_event_num == event_num) {
day_view->pressed_event_num = -1;
day_view->pressed_event_day = -1;
} else {
day_view->pressed_event_num--;
}
}
if (day_view->drag_event_num >= event_num && day_view->drag_event_day == day) {
if (day_view->drag_event_num == event_num) {
day_view->drag_event_num = -1;
day_view->drag_event_day = -1;
if (day_view->priv->drag_context) {
#if GTK_CHECK_VERSION(3,16,0)
gtk_drag_cancel (day_view->priv->drag_context);
#else
gdk_drag_abort (day_view->priv->drag_context, gtk_get_current_event_time ());
#endif
}
} else {
day_view->drag_event_num--;
}
}
if (event->canvas_item)
g_object_run_dispose (G_OBJECT (event->canvas_item));
......@@ -3099,6 +3153,7 @@ e_day_view_remove_event_cb (EDayView *day_view,
day_view->need_layout[day] = TRUE;
gtk_widget_grab_focus (GTK_WIDGET (day_view->main_canvas));
}
return TRUE;
}
......@@ -4818,11 +4873,15 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
target_list = gtk_target_list_new (
target_table, G_N_ELEMENTS (target_table));
e_target_list_add_calendar_targets (target_list, 0);
gtk_drag_begin (
g_clear_object (&day_view->priv->drag_context);
day_view->priv->drag_context = gtk_drag_begin (
widget, target_list,
GDK_ACTION_COPY | GDK_ACTION_MOVE,
1, (GdkEvent *) mevent);
gtk_target_list_unref (target_list);
if (day_view->priv->drag_context)
g_object_ref (day_view->priv->drag_context);
}
} else {
cursor = day_view->normal_cursor;
......@@ -4927,11 +4986,15 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
target_list = gtk_target_list_new (
target_table, G_N_ELEMENTS (target_table));
e_target_list_add_calendar_targets (target_list, 0);
gtk_drag_begin (
g_clear_object (&day_view->priv->drag_context);
day_view->priv->drag_context = gtk_drag_begin (
widget, target_list,
GDK_ACTION_COPY | GDK_ACTION_MOVE,
1, (GdkEvent *) mevent);
gtk_target_list_unref (target_list);
if (day_view->priv->drag_context)
g_object_ref (day_view->priv->drag_context);
}
} else {
cursor = day_view->normal_cursor;
......@@ -5447,6 +5510,8 @@ e_day_view_free_events (EDayView *day_view)
day_view->editing_event_num = -1;
day_view->popup_event_num = -1;
g_clear_object (&day_view->priv->drag_context);
e_day_view_free_event_array (day_view, day_view->long_events);
for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++)
......@@ -5510,7 +5575,9 @@ e_day_view_add_event (ESourceRegistry *registry,
/* Check that the event times are valid. */
g_return_if_fail (start <= end);
g_return_if_fail (start < add_event_data->day_view->upper);
g_return_if_fail (end > add_event_data->day_view->lower);
if (end != start || end < add_event_data->day_view->lower)
g_return_if_fail (end > add_event_data->day_view->lower);
zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view));
start_tt = icaltime_from_timet_with_zone (start, FALSE, zone);
......@@ -5563,9 +5630,12 @@ e_day_view_add_event (ESourceRegistry *registry,
if (start >= add_event_data->day_view->day_starts[day]
&& end <= add_event_data->day_view->day_starts[day + 1]) {
if (start == end && start == add_event_data->day_view->day_starts[day + 1])
continue;
/* Special case for when the appointment ends at
* midnight, i.e. the start of the next day. */
if (end == add_event_data->day_view->day_starts[day + 1]) {
if (end == add_event_data->day_view->day_starts[day + 1] && start != end) {
/* If the event last the entire day, then we
* skip it here so it gets added to the top
......@@ -5793,6 +5863,8 @@ e_day_view_reshape_long_event (EDayView *day_view,
g_signal_emit_by_name (day_view, "event_added", event);
e_day_view_update_long_event_label (day_view, event_num);
} else if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event->canvas_item), "event-num")) != event_num) {
g_object_set_data (G_OBJECT (event->canvas_item), "event-num", GINT_TO_POINTER (event_num));
}
/* Calculate its position. We first calculate the ideal position which
......@@ -5977,6 +6049,8 @@ e_day_view_reshape_day_event (EDayView *day_view,
g_signal_emit_by_name (day_view, "event_added", event);
e_day_view_update_event_label (day_view, day, event_num);
} else if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event->canvas_item), "event-num")) != event_num) {
g_object_set_data (G_OBJECT (event->canvas_item), "event-num", GINT_TO_POINTER (event_num));
}
item_w = MAX (item_w, 0);
......@@ -7080,9 +7154,12 @@ tooltip_destroy (EDayView *day_view,
if (item) {
EDayViewEvent *pevent;
gint event_num = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-num"));
gint day = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-day"));
gint event_num, day;
e_day_view_check_layout (day_view);
event_num = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-num"));
day = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-day"));
pevent = tooltip_get_view_event (day_view, day, event_num);
if (pevent) {
pevent->tooltip = NULL;
......@@ -7252,8 +7329,12 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
case GDK_MOTION_NOTIFY:
{
EDayViewEvent *pevent;
gint event_num = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-num"));
gint day = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-day"));
gint event_num, day;
e_day_view_check_layout (day_view);
event_num = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-num"));
day = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "event-day"));
pevent = tooltip_get_view_event (day_view, day, event_num);
if (!pevent)
......@@ -8730,6 +8811,7 @@ e_day_view_on_drag_end (GtkWidget *widget,
day_view->drag_event_day = -1;
day_view->drag_event_num = -1;
g_clear_object (&day_view->priv->drag_context);
}
static void
......@@ -8973,6 +9055,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
/* Reset this since it will be invalid. */
day_view->drag_event_day = -1;
g_clear_object (&day_view->priv->drag_context);
/* Show the text item again, just in case it hasn't
* moved. If we don't do this it may not appear. */
......@@ -9190,6 +9273,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
/* Reset this since it will be invalid. */
day_view->drag_event_day = -1;
g_clear_object (&day_view->priv->drag_context);
/* Show the text item again, just in case it hasn't
* moved. If we don't do this it may not appear. */
......
......@@ -410,12 +410,12 @@ attendee_edited_cb (GtkCellRenderer *renderer,
e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (gchar *) l->data));
e_meeting_attendee_set_cn (attendee, g_strdup (m->data));
if (existing_attendee) {
/* FIXME Should we copy anything else? */
e_meeting_attendee_set_cutype (attendee, e_meeting_attendee_get_cutype (existing_attendee));
e_meeting_attendee_set_role (attendee, e_meeting_attendee_get_role (existing_attendee));
e_meeting_attendee_set_rsvp (attendee, e_meeting_attendee_get_rsvp (existing_attendee));
e_meeting_attendee_set_status (attendee, ICAL_PARTSTAT_NEEDSACTION);
e_meeting_attendee_set_delfrom (attendee, (gchar *) e_meeting_attendee_get_delfrom (existing_attendee));