Bug 357556 - During import of vCard: Message box with either-or-question provides Yes/No buttons
Summary: During import of vCard: Message box with either-or-question provides Yes/No b...
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: import/export (other bugs)
Version First Reported In: 5.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-05 07:38 UTC by Gunter Ohrner
Modified: 2016-06-15 11:49 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: Applications/16.04
Sentry Crash Report:


Attachments
Screenshot showing the confusing dialog. (20.38 KB, image/png)
2016-01-05 07:39 UTC, Gunter Ohrner
Details
Correct messagebox for importing iCal/vCal, which appears if kOrganizer is already running. (22.22 KB, image/png)
2016-03-14 12:01 UTC, Gunter Ohrner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gunter Ohrner 2016-01-05 07:38:31 UTC
Try to import a vCard into kOrganizer, in my situation right from kMail.

The following dialog will appear (backtranslated from German to English, original German version see screenshot):

*****************************************************************************
Would you like to add this event to an existing calendar, or would you like to use it to create a completely new calendar?

If you chose to insert, you can select the calendar into which this event will be inserted.

Otherwise, a new calendar is created for you automatically.

[Yes] [No] [Cancel]
*****************************************************************************

Mh...

Reproducible: Always
Comment 1 Gunter Ohrner 2016-01-05 07:39:04 UTC
Created attachment 96466 [details]
Screenshot showing the confusing dialog.
Comment 2 Gunter Ohrner 2016-01-05 07:57:03 UTC
Uhm, I'm talking about importing vCal/iCal, not vCard, of course... :-/

I also just noticed that this only happens if kOrganizer is not running when importing the vcs file. If kOrganizer already IS running, the button labels are correct and pretty verbosely explain what happens if you click them.
Comment 3 Laurent Montel 2016-03-14 06:34:13 UTC
What is the correct messagebox ?
Comment 4 Gunter Ohrner 2016-03-14 12:01:15 UTC
Created attachment 97890 [details]
Correct messagebox for importing iCal/vCal, which appears if kOrganizer is already running.

This screenshot shows the same dialog with correct buttons. It appears this way if the kOrganizer is already running when the iCal/vCal file is to be imported. The buttons read "Merge into existing calendar" and "Import as new calendar".

If the kOrganizer GUI is not yet running while an iCal/vCal import is attempted, the same message box appears but shows just "Yes" and "No" instead, while the displayed message is an either/or question.
Comment 5 Laurent Montel 2016-03-14 12:37:28 UTC
I confirm it
it's a bug in kmessagebox + kguiitem...
No idea how to fix it yet
Comment 6 David Faure 2016-06-15 10:13:46 UTC
Git commit 376da8f1c6d537f387d905ab4466ec6d7a6c8df6 by David Faure.
Committed on 15/06/2016 at 10:13.
Pushed by dfaure into branch 'Applications/16.04'.

Port away from KLocale (which was used for use12Clock()).

Amazingly, this fixes a bug with a messagebox showing "Yes/No" instead
of "Merge/Add" when launching korganizer with a .ics file as argument.

Here's why:
KLocale::global() creates a QTranslator instance, which sends a LanguageChange
event. QDialogButtonBox (already shown at that point) reacts by retranslating
the buttons, ignoring the custom text we set on the buttons. That's a Qt bug,
I'll look into fixing that as well.
FIXED-IN: Applications/16.04

M  +13   -6    src/agenda/timelabels.cpp

http://commits.kde.org/eventviews/376da8f1c6d537f387d905ab4466ec6d7a6c8df6
Comment 7 Gunter Ohrner 2016-06-15 11:49:27 UTC
Thanks, David!