File 4_7_BRANCH.diff of Package kdepim4
--- a/BRANCH_STATUS
+++ b/BRANCH_STATUS
@@ -0,0 +1,2 @@
+current HEAD: 60422714c6aafb60bac1f316b0051e1445539f46
+git diff v4.7.2..origin/KDE/4.7
diff --git a/akregator/plugins/sharemicroblog/akregator_config_sharemicroblog.desktop b/akregator/plugins/sharemicroblog/akregator_config_sharemicroblog.desktop
index c605c2b..58a86e5 100644
--- a/akregator/plugins/sharemicroblog/akregator_config_sharemicroblog.desktop
+++ b/akregator/plugins/sharemicroblog/akregator_config_sharemicroblog.desktop
@@ -14,6 +14,7 @@ X-KDE-Weight=150
Name=Share Services
Name[ca]=Serveix de compartició
Name[ca@valencia]=Serveix de compartició
+Name[cs]=Sdílené služby
Name[da]=Delingstjenester
Name[de]=Veröffentlichungsdienste
Name[el]=Υπηρεσίες κοινής χρήσης
diff --git a/akregator/src/akregator.desktop b/akregator/src/akregator.desktop
index ab143b5..1f47ec8 100644
--- a/akregator/src/akregator.desktop
+++ b/akregator/src/akregator.desktop
@@ -92,7 +92,7 @@ GenericName[ja]=フィードリーダー
GenericName[kk]=RSS ақпарларын оқу
GenericName[km]=កម្មវិធីអានមតិព័ត៌មាន
GenericName[ko]=피드 리더
-GenericName[lt]=Kanalų skaitytuvas
+GenericName[lt]=Sklaidos kanalų skaitytuvas
GenericName[lv]=Feed Reader
GenericName[nb]=Kildeleser
GenericName[nds]=Mellenstroom-Kieker
diff --git a/akregator/src/akregator.notifyrc b/akregator/src/akregator.notifyrc
index 15bd9b4..9e11f28 100644
--- a/akregator/src/akregator.notifyrc
+++ b/akregator/src/akregator.notifyrc
@@ -95,7 +95,7 @@ Name[ka]=დამატებულია კვება
Name[kk]=Ақпар қосылды
Name[km]=បានបន្ថែមមតិព័ត៌មាន
Name[ko]=피드 추가됨
-Name[lt]=Kanalas pridėtas
+Name[lt]=Sklaidos kanalas pridėtas
Name[lv]=Barotne pievienota
Name[ms]=Suapan ditambah
Name[nb]=Kilde lagt til
@@ -152,7 +152,7 @@ Comment[ka]=Akregator-ის სიას დისტანციურად
Comment[kk]=Akregator-ға қашықтан жаңа ақпар қосылды
Comment[km]=បានបន្ថែមមតិព័ត៌មានថ្មីមួយពីចម្ងាយទៅ Akregator
Comment[ko]=새 피드가 추가되었습니다
-Comment[lt]=Naujas nutolęs naujienų kanalas buvo įdėtas į Akregator
+Comment[lt]=Naujas kanalas buvo pridėtas į Akregator nuotoliniu būdu
Comment[lv]=Akregator tika attālināti pievienota jauna barotne
Comment[ms]=Suapan baru ditambah dari jauh kepada Akregator
Comment[nb]=En ny kilde ble lagt til Akregator utenfra
@@ -274,7 +274,7 @@ Comment[ka]=მიღებულია ახალი სტატიები
Comment[kk]=Жаңа мақала алынды
Comment[km]=បានប្រមូលអត្ថបទថ្មី
Comment[ko]=새 글이 있습니다
-Comment[lt]=Nauji straipsniai parsiųsti
+Comment[lt]=Nauji straipsniai buvo atsiųsti
Comment[lv]=Tika saņemtas jaunas ziņas
Comment[mk]=Беа земени нови написи
Comment[ms]=Artikel baru telah dikutip
diff --git a/doc/kmail/faq.docbook b/doc/kmail/faq.docbook
index 05681ef..708223d 100644
--- a/doc/kmail/faq.docbook
+++ b/doc/kmail/faq.docbook
@@ -90,7 +90,7 @@
<qandaentry><question><para>How to filter spam on an IMAP server?</para></question>
<answer>
<para><emphasis>Symptom:</emphasis> You intend moving on to reading your mail from an IMAP server, and wonder how filtering and spam handling will occur?</para>
- <para><emphasis>Solution:</emphasis> The machine that already has your mail can become your imap server. You will need to configure a server application. <guilabel>Dovecot</guilabel> is one such, and the guidance on the project web pages make it easy to set up. That still leaves you with the problem of filtering, as it makes sense to do it on the server (when you point &kmail; at the server you will see the folders that you have created on the server). Again there are options, but one of the best known is <guilabel>procmail</guilabel>. Again there is plenty of information on the Internet on how to set this up. You give it a set of <quote>recipes</quote> - here's an example:</para>
+ <para><emphasis>Solution:</emphasis> The machine that already has your mail can become your IMAP server. You will need to configure a server application. <guilabel>Dovecot</guilabel> is one such, and the guidance on the project web pages make it easy to set up. That still leaves you with the problem of filtering, as it makes sense to do it on the server (when you point &kmail; at the server you will see the folders that you have created on the server). Again there are options, but one of the best known is <guilabel>procmail</guilabel>. Again there is plenty of information on the Internet on how to set this up. You give it a set of <quote>recipes</quote> - here's an example:</para>
<para><screen><markup> :0
* (^To|^CC|^List-ID): .*kde-linux
${MAILDIR}.INBOX.KDE-Lists.kde-users/
@@ -135,7 +135,7 @@
<para>In <menuchoice><guimenu>Settings</guimenu><guisubmenu>Configure KMail</guisubmenu><guimenuitem>Appearance</guimenuitem><guimenuitem>Fonts</guimenuitem></menuchoice> you can select <guilabel>Custom Font</guilabel> and change the setting for each component in the list. This is when you discover that your folder list and the message bodies do use the fonts you want, but the message list still has too large a font.</para>
<para>You can make the font changes by right-clicking on the Message List headers, and selecting <menuchoice><guimenu>Theme</guimenu><guisubmenu>Configure</guisubmenu><guimenuitem>Appearance Tab</guimenuitem></menuchoice>.
-Each one of those column headers needs to be clicked on, and your new custom font set. At the end of this the message list will display in the same font as the rest of your layout.</para>
+Each one of those column headers needs to be clicked on, and your new custom font set. At the end of this, the message list will display in the same font as the rest of your layout.</para>
</answer>
</qandaentry>
@@ -731,7 +731,7 @@ the &imap; account, the Local Folders will stay collapsed when &kmail; starts.
</para>
</listitem>
<listitem>
- <para><menuchoice><guimenu>List-Id</guimenu><guimenuitem>Contains</guimenuitem></menuchoice> <replaceable>listID</replaceable><footnote><para>replace <replaceable>listID</replaceable> with a specific mailing list id ⪚ () or just a <quote>.</quote> to include outgoing mail to all mailing list with <quote>.</quote> in their id (basically all).</para></footnote>
+ <para><menuchoice><guimenu>List-Id</guimenu><guimenuitem>Contains</guimenuitem></menuchoice> <replaceable>listID</replaceable><footnote><para>replace <replaceable>listID</replaceable> with a specific mailing list id ⪚ () or just a <quote>.</quote> to include outgoing mail to all mailing lists with <quote>.</quote> in their id (basically all).</para></footnote>
</para>
</listitem>
</itemizedlist>
@@ -750,7 +750,7 @@ the &imap; account, the Local Folders will stay collapsed when &kmail; starts.
<para>Uncheck <guilabel>if this filter matches, stop processing here</guilabel>, so that other filters such as sorting the incoming messages from the mailing list to sub-folders would execute.</para>
</listitem>
<listitem>
- <para>Place that filter before other filters that may stop the filtering process, or simply put it first. (changing the filters order is done using the two arrows up and down, under the <guilabel>available filters list</guilabel>)
+ <para>Place that filter before other filters that may stop the filtering process, or simply put it first. (changing the filters order is done using the two arrows up and down, under the <guilabel>Available filters</guilabel> list)
</para>
</listitem>
</itemizedlist>
@@ -872,16 +872,16 @@ print $email->as_string;
</para></listitem>
<listitem><para>Testing
</para></listitem>
-<listitem><para>before charging innocent E-Mails and translating them first try that on something you don't mind to lose, look in your trash or spam folder. Right click on any translatable item <menuchoice><guimenu>Apply Filter</guimenu><guimenuitem>Filter Translate</guimenuitem></menuchoice> A dialog box should pop-up with the original message followed by it's translation.
+<listitem><para>before changing innocent emails and translating them, first try that on something you don't mind to lose, look in your trash or spam folder. Right click on any translatable item, choose <menuchoice><guimenu>Apply Filter</guimenu><guimenuitem>Filter Translate</guimenuitem></menuchoice>. A dialog box should popup with the original message followed by its translation.
</para></listitem>
<listitem><para>Troubleshooting
</para></listitem>
-<listitem><para>If the script is not working you can test it outside of &kmail; to narrow down the responsible component. Save a mail message as 1.mbox file and run in the terminal <userinput>$~/bin/mail_translate.pl 2.mbox</userinput>
+<listitem><para>If the script is not working you can test it outside of &kmail; to narrow down the responsible component. Save a mail message as <filename>1.mbox</filename> file and run in the terminal <userinput>$~/bin/mail_translate.pl 2.mbox</userinput>
</para></listitem>
</itemizedlist>
</para></listitem>
-</itemizedlist><para>If the output file 2.mbox is not the same as 1.mbox then there is a problem in the script and it shouldn't be used.</para>
-<para><note><para>this script will only translate the Plain Text parts of an E-Mail message and not the &HTML; parts.</para></note></para>
+</itemizedlist><para>If the output file <filename>2.mbox</filename> is not the same as <filename>1.mbox</filename> then there is a problem in the script and it should not be used.</para>
+<para><note><para>this script will only translate the Plain Text parts of an email message and not the &HTML; parts.</para></note></para>
</answer>
</qandaentry>
diff --git a/doc/ktimetracker/index.docbook b/doc/ktimetracker/index.docbook
index e40ab34..669a432 100644
--- a/doc/ktimetracker/index.docbook
+++ b/doc/ktimetracker/index.docbook
@@ -56,8 +56,8 @@
<legalnotice>&FDLNotice;</legalnotice>
-<date>2009-10-19</date>
-<releaseinfo>4.3.1</releaseinfo>
+<date>2011-09-29</date>
+<releaseinfo>4.7</releaseinfo>
<abstract><para>&ktimetracker; tracks time spent on various tasks.</para></abstract>
@@ -87,7 +87,7 @@
<para>&ktimetracker; was originally written by &Sirtaj.Singh.Kang;.
Its home page is <ulink
-url="http://userbase.kde.org/ktimetracker">http://userbase.kde.org/ktimetracker</ulink>.</para>
+url="http://userbase.kde.org/KTimeTracker">http://userbase.kde.org/KTimeTracker</ulink>.</para>
</chapter>
@@ -295,14 +295,14 @@ not.</para></listitem></varlistentry>
<sect2 id="korganizer"><title>&korganizer;</title>
<para>&ktimetracker;, like &korganizer; and Apple's iCal, uses the industry standard
-<ulink
-url="http://developer.kde.org/documentation/standards/index.html">iCalendar</ulink>
+<ulink url="http://www.faqs.org/rfcs/rfc2445.html">iCalendar</ulink>
format for its data. &ktimetracker; can read and write the to do lists created by
these two applications.</para>
-
-<warning><para>If both &ktimetracker; and &korganizer; have the same file open, if you
-edit the file with &korganizer;, you risk losing data. To be safe,
-only edit the file with one application or the other.</para></warning>
+<para>
+You can even work synchronously on one file with &korganizer; and &ktimetracker;.
+If one program changes the file, the updates will be propagated to the other
+application automatically.
+</para>
</sect2>
@@ -314,7 +314,7 @@ management tool Imendio Planner
and import its tasks to &ktimetracker; with <menuchoice><guimenu>File</guimenu>
<guisubmenu>Import</guisubmenu><guimenuitem>Import Tasks From Planner...</guimenuitem>
</menuchoice>, to have them in the industry standard <ulink
-url="http://developer.kde.org/documentation/standards/index.html">iCalendar</ulink>
+url="http://www.faqs.org/rfcs/rfc2445.html">iCalendar</ulink>
format. Having done so, you are able to schedule the tasks in &korganizer;, and account your time
to them in &ktimetracker;. That's one way to help ensure your project stays on time
and under budget.</para>
@@ -451,8 +451,18 @@ in the first column after the total.</para>
<chapter id="interface">
<title>The &ktimetracker; interface</title>
-<para>The main &ktimetracker; window has the following components: menubar, toolbar,
-task/time window and status bar.</para>
+<para>The main &ktimetracker; window has the following components: menubar, toolbar,
+searchbar, task/time window and status bar.</para>
+
+<para>The searchbar is a combined field. As long as you do not type &Enter;, it acts as a
+filter. Then, only tasks that match your input are shown. As soon as you
+type &Enter;, your input is used as name to create a new task.
+</para>
+
+<para>Choose <guilabel>Configuration for PDA</guilabel> in the settings dialog
+if you have a touchscreen and your screen real estate is
+precious. It will disable the search bar and every click will pop up a
+context menu.</para>
<screenshot>
<screeninfo>&ktimetracker; Screen</screeninfo>
@@ -487,12 +497,14 @@ subtasks, as well as its own accumulated time.</para>
<note><para>(All behave identically to the menu command.)</para></note>
<itemizedlist>
+<listitem><para><guiicon>New Task</guiicon></para></listitem>
+<listitem><para><guiicon>New Subtask</guiicon></para></listitem>
<listitem><para><guiicon>Start</guiicon></para></listitem>
<listitem><para><guiicon>Stop</guiicon></para></listitem>
-<listitem><para><guiicon>New</guiicon></para></listitem>
-<listitem><para><guiicon>New Subtask</guiicon></para></listitem>
<listitem><para><guiicon>Delete</guiicon></para></listitem>
<listitem><para><guiicon>Edit</guiicon></para></listitem>
+<listitem><para><guiicon>Open</guiicon></para></listitem>
+<listitem><para><guiicon>Save</guiicon></para></listitem>
</itemizedlist>
<para>The statusbar reports the name of the file where the data was saved.</para>
@@ -553,12 +565,18 @@ which is that it is based on the Xt toolkit.</para>
</chapter>
<glossary id="glossary">
+<title>Glossary</title>
+<glossdiv>
+<title>A</title>
<glossentry id="gloss-active-task">
<glossterm>active task</glossterm>
<glossdef><para>A task which has a timer running.</para></glossdef>
</glossentry>
+</glossdiv>
+<glossdiv>
+<title>D</title>
<glossentry id="gloss-dcop">
<glossterm>&DBus;</glossterm>
<glossdef><para>The interprocess communication protocol used in &kde;. Short
@@ -575,14 +593,20 @@ default. Each desktop can display its own set of programs and files. When
Desktop 2. Pressing <keycombo
action="simul">&Ctrl;<keycap>F1</keycap></keycombo> will bring back Desktop
1. </para></glossdef> </glossentry>
+</glossdiv>
+<glossdiv>
+<title>H</title>
<glossentry id="gloss-history">
<glossterm>history</glossterm>
<glossdef><para>If &ktimetracker; is configured to log history, it will record ever
start/stop timer event. This history is never cleared when times are reset
cleared and remains on file until the task is deleted.</para></glossdef>
</glossentry>
+</glossdiv>
+<glossdiv>
+<title>S</title>
<glossentry id="gloss-session"> <glossterm>session</glossterm>
<glossdef><para>A user-defined starting point for the session timers. A new
session begins when you select <menuchoice> <guimenu>File</guimenu>
@@ -601,7 +625,10 @@ the bottom of the screen. In this system tray <inlinemediaobject>
format="PNG"/></imageobject> </inlinemediaobject> the &ktimetracker; icon is on the far
right.</para></glossdef>
</glossentry>
+</glossdiv>
+<glossdiv>
+<title>T</title>
<glossentry id="gloss-top-level-task">
<glossterm>top level task</glossterm>
<glossdef><para>A task with no parent tasks.</para></glossdef>
@@ -617,6 +644,7 @@ reset.</para></glossdef> </glossentry>
<glossentry id="gloss-total-time"> <glossterm><guilabel>Total Time</guilabel></glossterm>
<glossdef><para>The time spent on the task and all its subtasks since all
times were reset.</para></glossdef> </glossentry>
+</glossdiv>
</glossary>
@@ -716,7 +744,7 @@ than one to-do has a matching name, the first one found is returned.</para>
-->
<refentry id="dcop-addtodo">
<refmeta>
-<refentrytitle>addtodo</refentrytitle>
+<refentrytitle>addTask</refentrytitle>
</refmeta>
<refnamediv>
<refname>addTask</refname>
diff --git a/incidenceeditor-ng/incidencerecurrence.cpp b/incidenceeditor-ng/incidencerecurrence.cpp
index 2f1f6de..b7bdb4c 100644
--- a/incidenceeditor-ng/incidencerecurrence.cpp
+++ b/incidenceeditor-ng/incidencerecurrence.cpp
@@ -712,24 +712,15 @@ short IncidenceRecurrence::monthWeekFromEnd() const
QString IncidenceRecurrence::numberToString( int number ) const
{
- const QString result = QString::number( number );
- if ( result.endsWith( '1' ) ) {
- if ( result.endsWith( QLatin1String( "11" ) ) ) {
- return result + "th";
- } else {
- return result + "st";
- }
- }
+ // The code in here was adapted from an article by Johnathan Wood, see:
+ // http://www.blackbeltcoder.com/Articles/strings/converting-numbers-to-ordinal-strings
- if ( result.endsWith( '2' ) ) {
- return result + "nd";
- }
+ static QString _numSuffixes[] =
+ { "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th" };
- if ( result.endsWith( '3' ) ) {
- return result + "rd";
- } else {
- return result + "th";
- }
+ int i = (number % 100);
+ int j = (i > 10 && i < 20) ? 0 : (number % 10);
+ return QString::number( number ) + _numSuffixes[j];
}
void IncidenceRecurrence::selectMonthlyItem( KCalCore::Recurrence *recurrence,
diff --git a/kaddressbook/grantlee/tests/themes/air/theme-air.desktop b/kaddressbook/grantlee/tests/themes/air/theme-air.desktop
index babbc46..eb1f633 100644
--- a/kaddressbook/grantlee/tests/themes/air/theme-air.desktop
+++ b/kaddressbook/grantlee/tests/themes/air/theme-air.desktop
@@ -72,6 +72,7 @@ Description[sr@ijekavianlatin]=Tema za Vazduh
Description[sr@latin]=Tema za Vazduh
Description[sv]=Ett lufttema
Description[tr]=Air teması
+Description[ug]=ھاۋا ئۆرنىكى
Description[uk]=Тема «Air»
Description[x-test]=xxAn Air themexx
Description[zh_TW]=Air 主題
diff --git a/kaddressbook/grantlee/tests/themes/simple/theme-simple.desktop b/kaddressbook/grantlee/tests/themes/simple/theme-simple.desktop
index e362abc..dc90ecf 100644
--- a/kaddressbook/grantlee/tests/themes/simple/theme-simple.desktop
+++ b/kaddressbook/grantlee/tests/themes/simple/theme-simple.desktop
@@ -72,6 +72,7 @@ Description[sr@ijekavianlatin]=Jednostavna tema
Description[sr@latin]=Jednostavna tema
Description[sv]=Ett enkelt tema
Description[tr]=Basit, sade bir tema
+Description[ug]=ئاددىي ئۆرنەك
Description[uk]=Проста тема
Description[x-test]=xxA Simple themexx
Description[zh_TW]=簡單的主題。
diff --git a/kaddressbook/grantlee/tests/themes/test/theme-test.desktop b/kaddressbook/grantlee/tests/themes/test/theme-test.desktop
index 3ac1ee5..1f9b3b7 100644
--- a/kaddressbook/grantlee/tests/themes/test/theme-test.desktop
+++ b/kaddressbook/grantlee/tests/themes/test/theme-test.desktop
@@ -34,7 +34,7 @@ Name[sr@ijekavianlatin]=Proba
Name[sr@latin]=Proba
Name[sv]=Prov
Name[tr]=Deneme
-Name[ug]=سىنا
+Name[ug]=سىناق
Name[uk]=Тест
Name[x-test]=xxTestxx
Name[zh_TW]=測試
@@ -72,6 +72,7 @@ Description[sr@ijekavianlatin]=Probna tema
Description[sr@latin]=Probna tema
Description[sv]=Ett provtema
Description[tr]=Deneme teması
+Description[ug]=سىناق ئۆرنىكى
Description[uk]=Тестова тема
Description[x-test]=xxA Test themexx
Description[zh_TW]=測試主題
diff --git a/kaddressbook/kaddressbook.desktop b/kaddressbook/kaddressbook.desktop
index 2e172f3..056590e 100644
--- a/kaddressbook/kaddressbook.desktop
+++ b/kaddressbook/kaddressbook.desktop
@@ -108,6 +108,7 @@ GenericName[sr@latin]=Menadžer kontakata
GenericName[sv]=Kontakthantering
GenericName[th]=จัดการที่อยู่ติดต่อ
GenericName[tr]=Kişi Yöneticisi
+GenericName[ug]=ئالاقەداش باشقۇرغۇچ
GenericName[uk]=Менеджер контактів
GenericName[x-test]=xxContact Managerxx
GenericName[zh_CN]=联系人管理器
diff --git a/kleopatra/conf/kleopatra_config_smimevalidation.desktop b/kleopatra/conf/kleopatra_config_smimevalidation.desktop
index a27ef14..457d9df 100644
--- a/kleopatra/conf/kleopatra_config_smimevalidation.desktop
+++ b/kleopatra/conf/kleopatra_config_smimevalidation.desktop
@@ -79,7 +79,7 @@ Comment[ja]=S/MIME 証明書の検証オプションの設定
Comment[kk]=S/MIME куәлікті тексеріс параметрлері
Comment[km]=ជម្រើសធ្វើឲ្យការកំណត់រចនាសម្ព័ន្ធរបស់វិញ្ញាបនបត្ររបស់ S/MIME ប្រើបាន
Comment[ko]=S/MIME 인증서 검증 옵션 설정
-Comment[lt]=Konfigūruoti S/MIME sertifikatų patikros parinktis
+Comment[lt]=Konfigūruoti S/MIME liudijimų patikros parinktis
Comment[lv]=S/MIME sertifikātu validācijas konfigurēšana
Comment[nb]=Oppsett av valideringsvalg for S/MIME-sertifikater
Comment[nds]=Överpröven vun S/MIME-Zertifikaten instellen
diff --git a/kleopatra/kleopatra.desktop b/kleopatra/kleopatra.desktop
index d132e8d..4dd2490 100644
--- a/kleopatra/kleopatra.desktop
+++ b/kleopatra/kleopatra.desktop
@@ -90,7 +90,7 @@ GenericName[it]=Gestore di certificati e interfaccia grafica unificata di critto
GenericName[ja]=証明書マネージャと、統合された暗号 GUI
GenericName[kk]=Куәлік менеджері мен шифрлау интерфейсі
GenericName[km]=កម្មវិធីគ្រប់គ្រងវិញ្ញាបនបត្រ និង Unified Crypto GUI
-GenericName[lt]=Sertifikatų tvarkytuvė ir jungtinė kriptografijos grafinė sąsaja
+GenericName[lt]=Liudijimų tvarkytuvė ir jungtinė kriptografijos grafinė sąsaja
GenericName[lv]=Sertifikātu pārvaldnieks un vienota kriptofgrāfijas saskarne
GenericName[nb]=Sertifikatbehandler og forent krypto-GUI
GenericName[nds]=Zertifikatenpleger un eenheitlich Verslötel-Böversiet
diff --git a/kleopatra/kleopatra_import.desktop b/kleopatra/kleopatra_import.desktop
index 3f5fe92..6d95db8 100644
--- a/kleopatra/kleopatra_import.desktop
+++ b/kleopatra/kleopatra_import.desktop
@@ -95,7 +95,7 @@ Comment[ja]=証明書マネージャと、統合された暗号 GUI
Comment[kk]=Kleopatra - қапшытағы бүкіл файлдардың шифрын шешу/тексеру
Comment[km]=កម្មវិធីគ្រប់គ្រងវិញ្ញាបនបត្រ និងមិនបញ្ចូល Crypto GUI
Comment[ko]=인증서 관리자와 통합된 암호화 인터페이스
-Comment[lt]=Sertifikatų tvarkytuvė ir kriptografijos grafinė sąsaja
+Comment[lt]=Liudijimų tvarkytuvė ir kriptografijos grafinė sąsaja
Comment[lv]=Sertifikātu pārvaldnieks un vienota kriptofgrāfijas saskarne
Comment[nb]=Sertifikatbehandler og forent krypto-GUI
Comment[nds]=Zertifikatenpleger un eenheitlich Verslötel-Böversiet
diff --git a/kleopatra/kleopatra_signencryptfiles.desktop b/kleopatra/kleopatra_signencryptfiles.desktop
index 789c20e..ec091b6 100644
--- a/kleopatra/kleopatra_signencryptfiles.desktop
+++ b/kleopatra/kleopatra_signencryptfiles.desktop
@@ -53,7 +53,7 @@ Actions=kleoencryptsignfiles;kleoencryptfiles;kleosignfilesopenpgp;kleosignfiles
[Desktop Action kleoencryptsignfiles]
Name=Sign & Encrypt File
-Name[ca]=Signa i encripta un fitxer
+Name[ca]=Signa i encripta el fitxer
Name[ca@valencia]=Signa i encripta un fitxer
Name[da]=Signér og kryptér fil
Name[de]=Datei signieren & verschlüsseln
@@ -96,7 +96,7 @@ Exec=kleopatra --encrypt-sign %F
Name=Encrypt File
Name[ar]=تشفير الملف
Name[bs]=Potpisivanje datoteke
-Name[ca]=Encriptatge de fitxer
+Name[ca]=Encripta el fitxer
Name[ca@valencia]=Encriptatge de fitxer
Name[cs]=Zašifrovat soubor
Name[da]=Kryptér fil
@@ -149,7 +149,7 @@ Exec=kleopatra --encrypt %F
Name=OpenPGP-Sign File
Name[ar]=توقيع الملف بـ OpenPGP
Name[bs]=OpenPGP-potpisivanje
-Name[ca]=Signatura OpenPGP de fitxer
+Name[ca]=Signa amb OpenPGP el fitxer
Name[ca@valencia]=Signatura OpenPGP de fitxer
Name[cs]=Podepsat soubor pomocí OpenPGP
Name[da]=OpenPGP-signér fil
@@ -198,7 +198,7 @@ Exec=kleopatra --openpgp --sign %F
Name=S/MIME-Sign File
Name[ar]=توقيع الملف بـ S/MIME
Name[bs]=S/MIME-potpisivanje
-Name[ca]=Signatura S/MIME de fitxer
+Name[ca]=Signa amb S/MIME el fitxer
Name[ca@valencia]=Signatura S/MIME de fitxer
Name[cs]=Podepsat soubor pomocí S/MIME
Name[da]=S/MIME-signér fil
diff --git a/kleopatra/kleopatra_signencryptfolders.desktop b/kleopatra/kleopatra_signencryptfolders.desktop
index 8141675..660cf7b 100644
--- a/kleopatra/kleopatra_signencryptfolders.desktop
+++ b/kleopatra/kleopatra_signencryptfolders.desktop
@@ -53,7 +53,7 @@ Name[zh_TW]=Kleopatra 簽署/加密資料夾
Name=Archive, Sign & Encrypt Folder
Name[ar]=أرشفة و توقيع و تشفير المجلدات
Name[bs]=Arhiva, potpisivanje i šifrovanje datoteka
-Name[ca]=Arxivat, signatura i encriptat de carpeta
+Name[ca]=Arxiva, signa i encripta la carpeta
Name[ca@valencia]=Arxivat, signatura i xifrat de carpeta
Name[cs]=Archivovat, podepsat a zašifrovat složku
Name[da]=Arkivér, signér og kryptér mappe
@@ -102,7 +102,7 @@ Exec=kleopatra --encrypt-sign %F
Name=Archive & Encrypt Folder
Name[ar]=أرشفة و تشفير المجلد
Name[bs]=Arhiviraj i šifruj direktorij
-Name[ca]=Arxivat i encriptat de carpeta
+Name[ca]=Arxiva i encripta la carpeta
Name[ca@valencia]=Arxivat i xifrat de carpeta
Name[cs]=Archivovat a zašifrovat složku
Name[da]=Arkivér og kryptér mappe
diff --git a/kmail/KMail2.desktop b/kmail/KMail2.desktop
index 969bb16..8a61369 100644
--- a/kmail/KMail2.desktop
+++ b/kmail/KMail2.desktop
@@ -157,3 +157,4 @@ X-DBUS-StartupType=Unique
X-DBUS-ServiceName=org.kde.kmail
X-KDE-ServiceTypes=DBUS/Mailer
Categories=Qt;KDE;Network;Email;
+MimeType=x-scheme-handler/mailto;
diff --git a/kmail/aboutdata.cpp b/kmail/aboutdata.cpp
index 31c7219..34d3092 100644
--- a/kmail/aboutdata.cpp
+++ b/kmail/aboutdata.cpp
@@ -245,9 +245,12 @@ namespace KMail {
setProgramIconName("kmail");
using KMail::authors;
using KMail::credits;
- for ( unsigned int i = 0 ; i < sizeof authors / sizeof *authors ; ++i )
+ const unsigned int numberAuthors( sizeof authors / sizeof *authors );
+ for ( unsigned int i = 0 ; i < numberAuthors; ++i )
addAuthor( ki18n(authors[i].name), ki18n(authors[i].desc), authors[i].email, authors[i].web );
- for ( unsigned int i = 0 ; i < sizeof credits / sizeof *credits ; ++i )
+
+ const unsigned int numberCredits( sizeof credits / sizeof *credits );
+ for ( unsigned int i = 0 ; i < numberCredits; ++i )
addCredit( ki18n(credits[i].name), ki18n(credits[i].desc), credits[i].email, credits[i].web );
}
diff --git a/kmail/archivefolderdialog.cpp b/kmail/archivefolderdialog.cpp
index 0d9cf16..5be6c3f 100644
--- a/kmail/archivefolderdialog.cpp
+++ b/kmail/archivefolderdialog.cpp
@@ -124,7 +124,13 @@ ArchiveFolderDialog::ArchiveFolderDialog( QWidget *parent )
bool canRemoveFolder( const Akonadi::Collection& col )
{
const QSharedPointer<FolderCollection> folder = FolderCollection::forCollection( col,false );
- return folder && col.isValid() && col.rights() & Akonadi::Collection::CanDeleteCollection && !folder->isStructural() && !folder->isSystemFolder() && col.resource() != QLatin1String( "akonadi_nepomuktag_resource" );
+ return folder
+ && col.isValid()
+ && !col.isVirtual()
+ && ( col.rights() & Akonadi::Collection::CanDeleteCollection )
+ && !folder->isStructural()
+ && !folder->isSystemFolder()
+ && ( col.resource() != QLatin1String( "akonadi_nepomuktag_resource" ) );
}
void ArchiveFolderDialog::slotFolderChanged( const Akonadi::Collection &folder )
diff --git a/kmail/attachmentview.cpp b/kmail/attachmentview.cpp
index 2b22006..35829ee 100644
--- a/kmail/attachmentview.cpp
+++ b/kmail/attachmentview.cpp
@@ -1,5 +1,7 @@
/*
* This file is part of KMail.
+ * Copyright (c) 2011 Laurent Montel <montel@kde.org>
+ *
* Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
*
* Parts based on KMail code by:
@@ -24,6 +26,7 @@
#include "attachmentview.h"
#include "messagecomposer/attachmentmodel.h"
+#include "kmkernel.h"
#include <QContextMenuEvent>
#include <QHeaderView>
@@ -31,6 +34,7 @@
#include <QSortFilterProxyModel>
#include <KDebug>
+#include <KConfigGroup>
#include <messagecore/attachmentpart.h>
#include <boost/shared_ptr.hpp>
@@ -70,14 +74,29 @@ AttachmentView::AttachmentView( Message::AttachmentModel *model, QWidget *parent
header()->setResizeMode( QHeaderView::Interactive );
header()->setResizeMode( Message::AttachmentModel::MimeTypeColumn, QHeaderView::Stretch );
header()->setStretchLastSection( false );
+ restoreHeaderState();
setColumnWidth( 0, 200 );
}
AttachmentView::~AttachmentView()
{
+ saveHeaderState();
delete d;
}
+void AttachmentView::restoreHeaderState()
+{
+ KConfigGroup grp( KMKernel::self()->config(), "AttachmentView" );
+ header()->restoreState( grp.readEntry( "State", QByteArray() ) );
+}
+
+void AttachmentView::saveHeaderState()
+{
+ KConfigGroup grp( KMKernel::self()->config(), "AttachmentView" );
+ grp.writeEntry( "State", header()->saveState() );
+ grp.sync();
+}
+
void AttachmentView::contextMenuEvent( QContextMenuEvent *event )
{
Q_UNUSED( event );
diff --git a/kmail/attachmentview.h b/kmail/attachmentview.h
index 1369f29..24122ca 100644
--- a/kmail/attachmentview.h
+++ b/kmail/attachmentview.h
@@ -61,6 +61,10 @@ class AttachmentView : public QTreeView
/** reimpl to avoid default drag cursor */
virtual void startDrag( Qt::DropActions supportedActions );
+ private:
+ void saveHeaderState();
+ void restoreHeaderState();
+
signals:
void contextMenuRequested();
diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp
index 12459fe..bf4c8b2 100644
--- a/kmail/configuredialog.cpp
+++ b/kmail/configuredialog.cpp
@@ -722,7 +722,6 @@ static const struct {
} fontNames[] = {
{ "body-font", I18N_NOOP("Message Body"), true, false },
{ "MessageListFont", I18N_NOOP("Message List"), true, false },
- { "NewMessageFont", I18N_NOOP("Message List - New Messages"), true, false },
{ "UnreadMessageFont", I18N_NOOP("Message List - Unread Messages"), true, false },
{ "ImportantMessageFont", I18N_NOOP("Message List - Important Messages"), true, false },
{ "TodoMessageFont", I18N_NOOP("Message List - Action Item Messages"), true, false },
@@ -843,12 +842,11 @@ void AppearancePage::FontsTab::doLoadOther()
QFont fixedFont = KGlobalSettings::fixedFont();
for ( int i = 0 ; i < numFontNames ; i++ ) {
- QString configName = fontNames[i].configName;
- if ( configName == "MessageListFont" ||
- configName == "NewMessageFont" ||
- configName == "UnreadMessageFont" ||
- configName == "ImportantMessageFont" ||
- configName == "TodoMessageFont" ) {
+ const QString configName = fontNames[i].configName;
+ if ( configName == QLatin1String( "MessageListFont" ) ||
+ configName == QLatin1String( "UnreadMessageFont" ) ||
+ configName == QLatin1String( "ImportantMessageFont" ) ||
+ configName == QLatin1String( "TodoMessageFont" ) ) {
mFont[i] = messagelistFont.readEntry( configName,
(fontNames[i].onlyFixed) ? fixedFont : mFont[0] );
} else {
@@ -874,12 +872,11 @@ void AppearancePage::FontsTab::save()
MessageCore::GlobalSettings::self()->setUseDefaultFonts( !customFonts );
for ( int i = 0 ; i < numFontNames ; i++ ) {
- QString configName = fontNames[i].configName;
- if ( configName == "MessageListFont" ||
- configName == "NewMessageFont" ||
- configName == "UnreadMessageFont" ||
- configName == "ImportantMessageFont" ||
- configName == "TodoMessageFont" ) {
+ const QString configName = fontNames[i].configName;
+ if ( configName == QLatin1String( "MessageListFont" ) ||
+ configName == QLatin1String( "UnreadMessageFont" ) ||
+ configName == QLatin1String( "ImportantMessageFont" ) ||
+ configName == QLatin1String( "TodoMessageFont" ) ) {
if ( customFonts || messagelistFont.hasKey( configName ) ) {
// Don't write font info when we use default fonts, but write
// if it's already there:
@@ -915,7 +912,6 @@ static const struct {
{ "LinkColor", I18N_NOOP("Link") },
{ "FollowedColor", I18N_NOOP("Followed Link") },
{ "MisspelledColor", I18N_NOOP("Misspelled Words") },
- { "NewMessageColor", I18N_NOOP("New Message") },
{ "UnreadMessageColor", I18N_NOOP("Unread Message") },
{ "ImportantMessageColor", I18N_NOOP("Important Message") },
{ "TodoMessageColor", I18N_NOOP("Action Item Message") },
@@ -1018,7 +1014,6 @@ void AppearancePage::ColorsTab::loadColor( bool loadFromConfig )
scheme.foreground( KColorScheme::LinkText ).color(), // link
scheme.foreground( KColorScheme::VisitedText ).color(),// visited link
scheme.foreground( KColorScheme::NegativeText ).color(), // misspelled words
- Qt::red, // new msg
Qt::blue, // unread mgs
QColor( 0x00, 0x7F, 0x00 ), // important msg
scheme.foreground( KColorScheme::LinkText ).color(), // action item mgs
@@ -1038,8 +1033,7 @@ void AppearancePage::ColorsTab::loadColor( bool loadFromConfig )
for ( int i = 0 ; i < numColorNames ; i++ ) {
if ( loadFromConfig ) {
const QString configName = colorNames[i].configName;
- if ( configName == QLatin1String( "NewMessageColor" ) ||
- configName == QLatin1String( "UnreadMessageColor" ) ||
+ if ( configName == QLatin1String( "UnreadMessageColor" ) ||
configName == QLatin1String( "ImportantMessageColor" ) ||
configName == QLatin1String( "TodoMessageColor" ) ) {
mColorList->setColorSilently( i, messageListView.readEntry( configName, defaultColor[i] ) );
@@ -1070,11 +1064,10 @@ void AppearancePage::ColorsTab::save()
for ( int i = 0 ; i < numColorNames ; i++ ) {
// Don't write color info when we use default colors, but write
// if it's already there:
- QString configName = colorNames[i].configName;
- if ( configName == "NewMessageColor" ||
- configName == "UnreadMessageColor" ||
- configName == "ImportantMessageColor" ||
- configName == "TodoMessageColor" ) {
+ const QString configName = colorNames[i].configName;
+ if ( configName == QLatin1String( "UnreadMessageColor" ) ||
+ configName == QLatin1String( "ImportantMessageColor" ) ||
+ configName == QLatin1String( "TodoMessageColor" ) ) {
if ( customColors || messageListView.hasKey( configName ) )
messageListView.writeEntry( configName, mColorList->color(i) );
@@ -2926,12 +2919,12 @@ void ComposerPage::HeadersTab::doLoadOther()
QTreeWidgetItem * item = 0;
- int count = GlobalSettings::self()->customMessageHeadersCount();
+ const int count = GlobalSettings::self()->customMessageHeadersCount();
for( int i = 0 ; i < count ; i++ ) {
KConfigGroup config( KMKernel::self()->config(),
QString("Mime #") + QString::number(i) );
- QString name = config.readEntry( "name" );
- QString value = config.readEntry( "value" );
+ const QString name = config.readEntry( "name" );
+ const QString value = config.readEntry( "value" );
if( !name.isEmpty() ) {
item = new QTreeWidgetItem( mTagList, item );
item->setText( 0, name );
@@ -2952,13 +2945,24 @@ void ComposerPage::HeadersTab::save()
MessageComposer::MessageComposerSettings::self()->setCustomMsgIDSuffix( mMessageIdSuffixEdit->text() );
MessageComposer::MessageComposerSettings::self()->setUseCustomMessageIdSuffix( mCreateOwnMessageIdCheck->isChecked() );
+ //Clean config
+ const int oldHeadersCount = GlobalSettings::self()->customMessageHeadersCount();
+ for ( int i = 0; i < oldHeadersCount; ++i ) {
+ const QString groupMimeName = QString::fromLatin1( "Mime #%1" ).arg( i );
+ if ( KMKernel::self()->config()->hasGroup( groupMimeName ) ) {
+ KConfigGroup config( KMKernel::self()->config(), groupMimeName);
+ config.deleteGroup();
+ }
+ }
+
+
int numValidEntries = 0;
QTreeWidgetItem *item = 0;
- for ( int i = 0; i < mTagList->topLevelItemCount(); ++i ) {
+ const int numberOfEntry( mTagList->topLevelItemCount() );
+ for ( int i = 0; i < numberOfEntry; ++i ) {
item = mTagList->topLevelItem( i );
if( !item->text(0).isEmpty() ) {
- KConfigGroup config( KMKernel::self()->config(), QString("Mime #")
- + QString::number( numValidEntries ) );
+ KConfigGroup config( KMKernel::self()->config(), QString::fromLatin1("Mime #").arg( numValidEntries ) );
config.writeEntry( "name", item->text( 0 ) );
config.writeEntry( "value", item->text( 1 ) );
numValidEntries++;
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 3992311..0ea1850 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -1370,7 +1370,7 @@ KMCommand::Result KMSetStatusCommand::execute()
void KMSetStatusCommand::slotModifyItemDone( KJob * job )
{
- if ( job->error() ) {
+ if ( job && job->error() ) {
kWarning() << " Error trying to set item status:" << job->errorText();
}
deleteLater();
diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp
index e90c455..19cf45e 100644
--- a/kmail/kmcomposewin.cpp
+++ b/kmail/kmcomposewin.cpp
@@ -1008,6 +1008,7 @@ void KMComposeWin::slotDelayedApplyTemplate( KJob *job )
TemplateParser::TemplateParser parser( mMsg, mode );
parser.setSelection( mTextSelection );
parser.setAllowDecryption( MessageViewer::GlobalSettings::self()->automaticDecrypt() );
+ parser.setWordWrap( MessageComposer::MessageComposerSettings::self()->wordWrap(), MessageComposer::MessageComposerSettings::self()->lineWrapWidth() );
foreach ( const Akonadi::Item &item, items ) {
if ( !mCustomTemplate.isEmpty() )
@@ -1143,7 +1144,9 @@ void KMComposeWin::setupActions( void )
action = new KAction(KIcon("x-office-address-book"), i18n("&Address Book"), this);
actionCollection()->addAction("addressbook", action );
- connect(action, SIGNAL(triggered(bool) ), SLOT(slotAddrBook()));
+ if (KStandardDirs::findExe("kaddressbook").isEmpty())
+ action->setEnabled(false);
+ connect(action, SIGNAL(triggered(bool)), SLOT(slotAddrBook()));
action = new KAction(KIcon("mail-message-new"), i18n("&New Composer"), this);
actionCollection()->addAction("new_composer", action );
connect(action, SIGNAL(triggered(bool) ), SLOT(slotNewComposer()));
diff --git a/kmail/kmfilterdlg.cpp b/kmail/kmfilterdlg.cpp
index 1bab26f..23bd57f 100644
--- a/kmail/kmfilterdlg.cpp
+++ b/kmail/kmfilterdlg.cpp
@@ -717,6 +717,7 @@ KMFilterListBox::KMFilterListBox( const QString & title, QWidget *parent )
KMFilterListBox::~KMFilterListBox()
{
qDeleteAll( mFilterList );
+ mFilterList.clear();
}
void KMFilterListBox::slotRowsMoved( const QModelIndex &, int sourcestart, int sourceEnd , const QModelIndex &, int destinationRow)
@@ -916,7 +917,8 @@ void KMFilterListBox::slotDelete()
emit resetWidgets();
// remove the filter from both the listbox
- mListWidget->takeItem( oIdxSelItem );
+ delete mListWidget->takeItem( oIdxSelItem );
+
// and the filter list...
MailCommon::MailFilter *deletedFilter = mFilterList.takeAt( oIdxSelItem );
@@ -1068,10 +1070,11 @@ void KMFilterListBox::loadFilterList( bool createDummyFilter )
// create an empty filter when there's none, to avoid a completely
// disabled dialog (usability tests indicated that the new-filter
// button is too hard to find that way):
- if ( !mListWidget->count() && createDummyFilter )
+ const int numberOfItem( mListWidget->count() );
+ if ( !numberOfItem && createDummyFilter )
slotNew();
- if ( mListWidget->count() > 0 )
+ if ( numberOfItem > 0 )
mListWidget->setCurrentRow( 0 );
enableControls();
@@ -1101,7 +1104,7 @@ void KMFilterListBox::insertFilter( MailFilter* aFilter )
void KMFilterListBox::appendFilter( MailFilter* aFilter )
{
mFilterList.append( aFilter );
- mListWidget->addItems( QStringList( aFilter->pattern()->name() ) );
+ mListWidget->addItem( aFilter->pattern()->name() );
emit filterCreated();
}
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index d1886ac..4268ae7 100644
--- a/kmail/kmkernel.cpp
+++ b/kmail/kmkernel.cpp
@@ -47,7 +47,6 @@ using KMail::MailServiceImpl;
#include "messagecomposersettings.h"
#include "messagecomposer/messagehelper.h"
#include "messagecomposer/messagecomposersettings.h"
-#include "custommimeheader.h"
#include "templateparser/templateparser.h"
#include "templateparser/globalsettings_base.h"
@@ -1335,7 +1334,7 @@ void KMKernel::slotShowConfigurationDialog()
// Save all current settings.
if( getKMMainWidget() )
- getKMMainWidget()->writeConfig();
+ getKMMainWidget()->writeReaderConfig();
if( mConfigureDialog->isHidden() ) {
mConfigureDialog->show();
diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp
index cffa4e9..39cef8c 100644
--- a/kmail/kmmainwidget.cpp
+++ b/kmail/kmmainwidget.cpp
@@ -883,10 +883,6 @@ void KMMainWidget::readConfig()
//-----------------------------------------------------------------------------
void KMMainWidget::writeConfig()
{
- KSharedConfig::Ptr config = KMKernel::self()->config();
- KConfigGroup geometry( config, "Geometry" );
- KConfigGroup general( config, "General" );
-
// Don't save the sizes of all the widgets when we were never shown.
// This can happen in Kontact, where the KMail plugin is automatically
// loaded, but not necessarily shown.
@@ -937,6 +933,15 @@ void KMMainWidget::writeConfig()
}
}
+void KMMainWidget::writeReaderConfig()
+{
+ if ( mWasEverShown ) {
+ if ( mMsgView ) {
+ mMsgView->viewer()->writeConfig();
+ }
+ }
+}
+
//-----------------------------------------------------------------------------
void KMMainWidget::deleteWidgets()
{
@@ -2977,7 +2982,7 @@ void KMMainWidget::setupActions()
//----- Tools menu
if (parent()->inherits("KMMainWin")) {
- KAction *action = new KAction(KIcon("help-contents"), i18n("&Address Book"), this);
+ KAction *action = new KAction(KIcon("x-office-address-book"), i18n("&Address Book"), this);
actionCollection()->addAction("addressbook", action );
connect(action, SIGNAL(triggered(bool)), SLOT(slotAddrBook()));
if (KStandardDirs::findExe("kaddressbook").isEmpty())
diff --git a/kmail/kmmainwidget.h b/kmail/kmmainwidget.h
index b4d0a9f..4e23257 100644
--- a/kmail/kmmainwidget.h
+++ b/kmail/kmmainwidget.h
@@ -120,6 +120,8 @@ class KMAIL_EXPORT KMMainWidget : public QWidget
/** Write configuration options. */
virtual void writeConfig();
+ void writeReaderConfig();
+
/** Easy access to main components of the window. */
KMReaderWin* messageView() const { return mMsgView; }
/** Access to the header list pane. */
diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp
index 8492237..c8d7f8a 100644
--- a/kmail/snippetwidget.cpp
+++ b/kmail/snippetwidget.cpp
@@ -32,18 +32,18 @@ SnippetWidget::SnippetWidget( KMComposerEditor *editor, KActionCollection *actio
setRootIsDecorated( true );
setAlternatingRowColors( true );
- mSnippetsManager = new MailCommon::SnippetsManager( actionCollection, this );
- mSnippetsManager->setEditor( editor, "insertPlainText", SIGNAL( insertSnippet() ) );
+ mSnippetsManager = new MailCommon::SnippetsManager( actionCollection, this, this );
+ mSnippetsManager->setEditor( editor, "insertPlainText", SIGNAL(insertSnippet()) );
setModel( mSnippetsManager->model() );
setSelectionModel( mSnippetsManager->selectionModel() );
-
- connect( this, SIGNAL( activated( const QModelIndex& ) ),
- mSnippetsManager->editSnippetAction(), SLOT( trigger() ) );
- connect( mSnippetsManager->model(), SIGNAL( rowsInserted( const QModelIndex&, int, int ) ),
- this, SLOT( expandAll() ) );
- connect( mSnippetsManager->model(), SIGNAL( rowsRemoved( const QModelIndex&, int, int ) ),
- this, SLOT( expandAll() ) );
+
+ connect( this, SIGNAL(activated(QModelIndex)),
+ mSnippetsManager->editSnippetAction(), SLOT(trigger()) );
+ connect( mSnippetsManager->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(expandAll()) );
+ connect( mSnippetsManager->model(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(expandAll()) );
expandAll();
}
@@ -58,12 +58,10 @@ void SnippetWidget::contextMenuEvent( QContextMenuEvent *event )
const bool itemSelected = mSnippetsManager->selectionModel()->hasSelection();
- bool canAddGroup = true;
bool canAddSnippet = true;
if ( itemSelected ) {
popup.addTitle( mSnippetsManager->selectedName() );
if ( mSnippetsManager->snippetGroupSelected() ) {
- canAddGroup = false; // subgroups are not permitted
popup.addAction( mSnippetsManager->editSnippetGroupAction() );
popup.addAction( mSnippetsManager->deleteSnippetGroupAction() );
} else {
@@ -79,9 +77,7 @@ void SnippetWidget::contextMenuEvent( QContextMenuEvent *event )
if ( canAddSnippet ) {
popup.addAction( mSnippetsManager->addSnippetAction() );
}
- if ( canAddGroup ) {
- popup.addAction( mSnippetsManager->addSnippetGroupAction() );
- }
+ popup.addAction( mSnippetsManager->addSnippetGroupAction() );
popup.exec( event->globalPos() );
}
diff --git a/kmail/undostack.cpp b/kmail/undostack.cpp
index f20ca83..d981769 100644
--- a/kmail/undostack.cpp
+++ b/kmail/undostack.cpp
@@ -44,6 +44,7 @@ UndoStack::UndoStack(int size)
UndoStack::~UndoStack()
{
qDeleteAll( mStack );
+ mStack.clear();
}
void UndoStack::clear()
diff --git a/kontact/plugins/akregator/akregator.setdlg b/kontact/plugins/akregator/akregator.setdlg
index 1b8bb53..ef6ff4c 100644
--- a/kontact/plugins/akregator/akregator.setdlg
+++ b/kontact/plugins/akregator/akregator.setdlg
@@ -88,7 +88,7 @@ Comment[ja]=フィードリーダー
Comment[kk]=Ақпарды оқу құралы
Comment[km]=កម្មវិធីអានមតិព័ត៌មាន
Comment[ko]=피드 리더
-Comment[lt]=Kanalų skaitytuvas
+Comment[lt]=Sklaidos kanalų skaitytuvas
Comment[lv]=Ziņu lasītājs
Comment[nb]=Kildeleser
Comment[nds]=Mellenstroom-Kieker
diff --git a/kontact/plugins/summary/summary.setdlg b/kontact/plugins/summary/summary.setdlg
index 277300e..4af0db7 100644
--- a/kontact/plugins/summary/summary.setdlg
+++ b/kontact/plugins/summary/summary.setdlg
@@ -63,7 +63,7 @@ Name[ta]=சுருக்கம்
Name[tg]=Дайджест
Name[th]=รายงานสรุป
Name[tr]=Özet
-Name[ug]=ئۈزۈندە
+Name[ug]=ئۈزۈندى
Name[uk]=Резюме
Name[uz]=Hisobot
Name[uz@cyrillic]=Ҳисобот
diff --git a/kontact/plugins/summary/summaryplugin.desktop b/kontact/plugins/summary/summaryplugin.desktop
index 211ea29..6690cee 100644
--- a/kontact/plugins/summary/summaryplugin.desktop
+++ b/kontact/plugins/summary/summaryplugin.desktop
@@ -134,7 +134,7 @@ Name[ta]=சுருக்கம்
Name[tg]=Дайджест
Name[th]=รายงานสรุป
Name[tr]=Özet
-Name[ug]=ئۈزۈندە
+Name[ug]=ئۈزۈندى
Name[uk]=Резюме
Name[uz]=Hisobot
Name[uz@cyrillic]=Ҳисобот
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index ed4c8eb..88dcc91 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1158,7 +1158,7 @@ void KOPrefsDialogGroupScheduling::removeItem()
if ( !item ) {
return;
}
- mAMails->takeItem( mAMails->row( item ) );
+ delete mAMails->takeItem( mAMails->row( item ) );
item = mAMails->currentItem();
if ( !item ) {
aEmailsEdit->setText( "" );
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 5d7661b..82984c8 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -496,7 +496,7 @@ void KOViewManager::showAgendaView()
connect( mAgendaView,SIGNAL(zoomViewHorizontally(const QDate &,int)),
mMainView->dateNavigator(), SLOT(selectDates(const QDate &,int)) );
- mAgendaView->readSettings();
+ mAgendaView->readSettings( KOGlobals::self()->config() );
}
if ( showBoth && mAgendaViewTabs->indexOf( mAgendaView ) < 0 ) {
mAgendaViewTabs->addTab( mAgendaView, i18n( "Merged calendar" ) );
diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp
index 31660ef..daa569d 100644
--- a/korganizer/publishdialog.cpp
+++ b/korganizer/publishdialog.cpp
@@ -136,7 +136,7 @@ void PublishDialog::removeItem()
int row = mUI.mListWidget->row( item );
- mUI.mListWidget->takeItem( row );
+ delete mUI.mListWidget->takeItem( row );
if ( !mUI.mListWidget->count() ) {
mUI.mNameLineEdit->setText( QString() );
diff --git a/ktimetracker/ktimetrackerpart.cpp b/ktimetracker/ktimetrackerpart.cpp
index 5349a82..2f6480e 100644
--- a/ktimetracker/ktimetrackerpart.cpp
+++ b/ktimetracker/ktimetrackerpart.cpp
@@ -56,7 +56,6 @@ ktimetrackerpart::ktimetrackerpart( QWidget *parentWidget, QObject *parent, cons
KGlobal::locale()->insertCatalog("libkdepim");
// we need an instance
mMainWidget = new TimetrackerWidget( parentWidget );
- mMainWidget->openFile(QString(KStandardDirs::locate("data", "ktimetracker/ktimetracker.ics")));
setWidget( mMainWidget );
setXMLFile( "ktimetrackerui.rc" );
makeMenus();
@@ -98,8 +97,6 @@ bool ktimetrackerpart::openFile(QString icsfile)
{
mMainWidget->openFile(icsfile);
emit setWindowCaption(icsfile);
- if ( KTimeTrackerSettings::trayIcon() ) mTray = new TrayIcon( this );
- else mTray = new TrayIcon( );
// connections
connect( mMainWidget, SIGNAL( totalTimesChanged( long, long ) ),
@@ -108,11 +105,6 @@ bool ktimetrackerpart::openFile(QString icsfile)
this, SLOT( setStatusBar( QString ) ) );
connect( mMainWidget, SIGNAL( setCaption( const QString& ) ),
this, SIGNAL( setWindowCaption( const QString& ) ) );
- connect( mTray, SIGNAL( quitSelected() ), SLOT( quit() ) );
- connect( mMainWidget, SIGNAL( timersActive() ), mTray, SLOT( startClock() ) );
- connect( mMainWidget, SIGNAL( timersInactive() ), mTray, SLOT( stopClock() ) );
- connect( mMainWidget, SIGNAL( tasksChanged( const QList<Task*>& ) ),
- mTray, SLOT( updateToolTip( QList<Task*> ) ));
return true;
}
diff --git a/ktimetracker/mainwindow.cpp b/ktimetracker/mainwindow.cpp
index 54a909d..473ec95 100644
--- a/ktimetracker/mainwindow.cpp
+++ b/ktimetracker/mainwindow.cpp
@@ -97,26 +97,26 @@ MainWindow::MainWindow( const QString &icsfile )
setWindowFlags( windowFlags() | Qt::WindowContextHelpButtonHint );
// connections
- connect( m_part->widget(), SIGNAL( statusBarTextChangeRequested( QString ) ),
- this, SLOT( setStatusBar( QString ) ) );
- connect( m_part->widget(), SIGNAL( setCaption( const QString& ) ),
- this, SLOT( slotSetCaption( const QString& ) ) );
+ connect( m_part->widget(), SIGNAL(statusBarTextChangeRequested(QString)),
+ this, SLOT(setStatusBar(QString)) );
+ connect( m_part->widget(), SIGNAL(setCaption(QString)),
+ this, SLOT(slotSetCaption(QString)) );
loadGeometry();
// Setup context menu request handling
connect( m_part->widget(),
- SIGNAL( contextMenuRequested( const QPoint& ) ),
+ SIGNAL(contextMenuRequested(QPoint)),
this,
- SLOT( taskViewCustomContextMenuRequested( const QPoint& ) ) );
-
- _tray = new TrayIcon( this );
-
- connect( _tray, SIGNAL( quitSelected() ), m_part->widget(), SLOT( quit() ) );
-
- connect( m_part->widget(), SIGNAL( timersActive() ), _tray, SLOT( startClock() ) );
- connect( m_part->widget(), SIGNAL( timersInactive() ), _tray, SLOT( stopClock() ) );
- connect( m_part->widget(), SIGNAL( tasksChanged( const QList<Task*>& ) ),
- _tray, SLOT( updateToolTip( QList<Task*> ) ));
+ SLOT(taskViewCustomContextMenuRequested(QPoint)) );
+ if (KTimeTrackerSettings::trayIcon())
+ {
+ _tray = new TrayIcon( this );
+ connect( _tray, SIGNAL(quitSelected()), m_part->widget(), SLOT(quit()) );
+ connect( m_part->widget(), SIGNAL(timersActive()), _tray, SLOT(startClock()) );
+ connect( m_part->widget(), SIGNAL(timersInactive()), _tray, SLOT(stopClock()) );
+ connect( m_part->widget(), SIGNAL(tasksChanged(QList<Task*>)),
+ _tray, SLOT(updateToolTip(QList<Task*>)));
+ }
}
void MainWindow::setupActions()
@@ -161,7 +161,7 @@ void MainWindow::keyBindings()
void MainWindow::makeMenus()
{
mainWidget->setupActions( actionCollection() );
- actionKeyBindings = KStandardAction::keyBindings( this, SLOT( keyBindings() ),
+ actionKeyBindings = KStandardAction::keyBindings( this, SLOT(keyBindings()),
actionCollection() );
setupGUI();
actionKeyBindings->setToolTip( i18n( "Configure key bindings" ) );
diff --git a/ktimetracker/timetrackerstorage.cpp b/ktimetracker/timetrackerstorage.cpp
index 55808ad..6c99c54 100644
--- a/ktimetracker/timetrackerstorage.cpp
+++ b/ktimetracker/timetrackerstorage.cpp
@@ -906,10 +906,7 @@ void timetrackerstorage::stopTimer( const Task* task, const QDateTime &when )
if (!(*i)->hasEndDate())
{
kDebug(5970) << "this event has no enddate";
- QString s=when.toString("yyyy-MM-ddThh:mm:ss.zzzZ"); // need the KDE standard from the ISO standard, not the QT one
- KDateTime kwhen=KDateTime::fromString(s);
- kDebug() << "kwhen ==" << kwhen;
- (*i)->setDtEnd(kwhen);
+ (*i)->setDtEnd(KDateTime(when, KDateTime::Spec::LocalZone()));
}
else
{
diff --git a/ktimetracker/version.h b/ktimetracker/version.h
index 1c5422c..246936e 100644
--- a/ktimetracker/version.h
+++ b/ktimetracker/version.h
@@ -20,5 +20,5 @@
*/
#ifndef KTIMETRACKER_VERSION
-#define KTIMETRACKER_VERSION "4.7.0"
+#define KTIMETRACKER_VERSION "4.7.2"
#endif
diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp
index 8536513..93d188b 100644
--- a/libkdepim/addresseelineedit.cpp
+++ b/libkdepim/addresseelineedit.cpp
@@ -285,6 +285,7 @@ void AddresseeLineEdit::Private::setCompletedItems( const QStringList &items, bo
if ( !items.isEmpty() &&
!( items.count() == 1 && m_searchString == items.first() ) ) {
+ completionBox->clear();
const int numberOfItems( items.count() );
for ( int i = 0; i< numberOfItems; ++i )
{
@@ -293,7 +294,6 @@ void AddresseeLineEdit::Private::setCompletedItems( const QStringList &items, bo
item->setFlags( item->flags()&~Qt::ItemIsSelectable );
completionBox->addItem( item );
}
-
if ( !completionBox->isVisible() ) {
if ( !m_searchString.isEmpty() ) {
completionBox->setCancelledText( m_searchString );
diff --git a/libkdepim/completionordereditor.cpp b/libkdepim/completionordereditor.cpp
index 5b6ff6c..835e88d 100644
--- a/libkdepim/completionordereditor.cpp
+++ b/libkdepim/completionordereditor.cpp
@@ -278,6 +278,7 @@ void CompletionOrderEditor::loadCompletionItems()
mimeTypeProxy->addMimeTypeFilters( QStringList() << KABC::Addressee::mimeType()
<< KABC::ContactGroup::mimeType() );
mimeTypeProxy->setSourceModel( descendantsProxy );
+ mimeTypeProxy->setExcludeVirtualCollections( true );
mCollectionModel = mimeTypeProxy;
diff --git a/libkleo/libkleopatrarc-win32.desktop b/libkleo/libkleopatrarc-win32.desktop
index 3345552..793e37e 100644
--- a/libkleo/libkleopatrarc-win32.desktop
+++ b/libkleo/libkleopatrarc-win32.desktop
@@ -404,7 +404,7 @@ Name[ka]= რუტის სანდო სერთიფიკატი
Name[kk]=Сенім артылған түбір куәлігі
Name[km]=វិញ្ញាបនបត្រ Root ដែលអាចជឿទុកចិត្ត
Name[ko]=신뢰하는 루트 인증 기관
-Name[lt]=Patikimas root sertifikatas
+Name[lt]=Patikimas root liudijimas
Name[lv]=Uzticams saknes sertifikāts
Name[mk]=Доверлив коренов сертификат
Name[ms]=Sijil Root Dipercaya
@@ -470,7 +470,7 @@ Name[ka]=რუტის არასანდო სერტიფიკა
Name[kk]=Сенім артылмаған түбір куәлігі
Name[km]=វិញ្ញាបនបត្រ Root ដែលមិនអាចជឿទុកចិត្ត
Name[ko]=신뢰하지 않는 루트 인증 기관
-Name[lt]=Nepatikimas root sertifikatas
+Name[lt]=Nepatikimas root liudijimas
Name[lv]=Neuzticams saknes sertifikāts
Name[mk]=Недоверлив коренов сертификат
Name[ms]=Sijil Root Tak Dipercaya
diff --git a/libkleo/libkleopatrarc.desktop b/libkleo/libkleopatrarc.desktop
index 6e1fe90..a0b1261 100644
--- a/libkleo/libkleopatrarc.desktop
+++ b/libkleo/libkleopatrarc.desktop
@@ -446,7 +446,7 @@ Name[ka]= რუტის სანდო სერთიფიკატი
Name[kk]=Сенім артылған түбір куәлігі
Name[km]=វិញ្ញាបនបត្រ Root ដែលអាចជឿទុកចិត្ត
Name[ko]=신뢰하는 루트 인증 기관
-Name[lt]=Patikimas root sertifikatas
+Name[lt]=Patikimas root liudijimas
Name[lv]=Uzticams saknes sertifikāts
Name[mk]=Доверлив коренов сертификат
Name[ms]=Sijil Root Dipercaya
@@ -512,7 +512,7 @@ Name[ka]=რუტის არასანდო სერტიფიკა
Name[kk]=Сенім артылмаған түбір куәлігі
Name[km]=វិញ្ញាបនបត្រ Root ដែលមិនអាចជឿទុកចិត្ត
Name[ko]=신뢰하지 않는 루트 인증 기관
-Name[lt]=Nepatikimas root sertifikatas
+Name[lt]=Nepatikimas root liudijimas
Name[lv]=Neuzticams saknes sertifikāts
Name[mk]=Недоверлив коренов сертификат
Name[ms]=Sijil Root Tak Dipercaya
diff --git a/libksieve/ksieveui/sievesyntaxhighlighter.cpp b/libksieve/ksieveui/sievesyntaxhighlighter.cpp
index cf4edb3..6bc8cae 100644
--- a/libksieve/ksieveui/sievesyntaxhighlighter.cpp
+++ b/libksieve/ksieveui/sievesyntaxhighlighter.cpp
@@ -93,7 +93,7 @@ void SieveSyntaxHighlighter::init()
actionFormat.setForeground( Qt::blue );
actionFormat.setFontWeight( QFont::Bold );
QStringList actionType;
- actionType << QLatin1String( "\\bkeep\\b" )<<QLatin1String( "\\breject\\b" )<<QLatin1String( "\\bdiscard\\b" )<<QLatin1String( "\\bredirect\\b" )<<QLatin1String( "\\bfileinto\\b" );
+ actionType << QLatin1String( "\\bkeep\\b" )<<QLatin1String( "\\breject\\b" )<<QLatin1String( "\\bdiscard\\b" )<<QLatin1String( "\\bredirect\\b" )<<QLatin1String( "\\bfileinto\\b" )<<QLatin1String( "\\bsetflag\\b" )<<QLatin1String( "\\baddflag\\b" );
Q_FOREACH( const QString & s, actionType ) {
const QRegExp regex( s, Qt::CaseInsensitive );
m_rules.append( Rule( regex, actionFormat ) );
diff --git a/libksieve/ksieveui/sievetextedit.cpp b/libksieve/ksieveui/sievetextedit.cpp
index 1340988..e3a240a 100644
--- a/libksieve/ksieveui/sievetextedit.cpp
+++ b/libksieve/ksieveui/sievetextedit.cpp
@@ -51,7 +51,7 @@ void SieveTextEdit::initCompleter()
listWord<< QLatin1String( "require" )<<QLatin1String( "stop" );
listWord << QLatin1String( ":contains" )<<QLatin1String( ":matches" )<<QLatin1String( ":is" )<<QLatin1String( ":over" )<<QLatin1String( ":under" )<<QLatin1String( ":all" )<<QLatin1String( ":domain" )<<QLatin1String( ":localpart" );
listWord << QLatin1String( "if" )<<QLatin1String( "elsif" )<<QLatin1String( "else" );
- listWord << QLatin1String( "keep" )<<QLatin1String( "reject" )<<QLatin1String( "discard" )<<QLatin1String( "redirect" )<<QLatin1String( "fileinto" );
+ listWord << QLatin1String( "keep" )<<QLatin1String( "reject" )<<QLatin1String( "discard" )<<QLatin1String( "redirect" )<<QLatin1String( "fileinto" )<<QLatin1String( "addflag" )<<QLatin1String( "setflag" );
listWord << QLatin1String( "address" )<<QLatin1String( "allof" )<<QLatin1String( "anyof" )<<QLatin1String( "exists" )<<QLatin1String( "false" )<<QLatin1String( "header" )<<QLatin1String("not" )<<QLatin1String( "size" )<<QLatin1String( "true" );
m_completer = new QCompleter( this );
diff --git a/mailcommon/foldertreeview.cpp b/mailcommon/foldertreeview.cpp
index 8889bb1..e5e7ac5 100644
--- a/mailcommon/foldertreeview.cpp
+++ b/mailcommon/foldertreeview.cpp
@@ -73,6 +73,7 @@ void FolderTreeView::disableContextMenuAndExtraColumn()
void FolderTreeView::init( bool showUnreadCount )
{
setIconSize( QSize( 22, 22 ) );
+ setUniformRowHeights( true );
mSortingPolicy = FolderTreeWidget::SortByCurrentColumn;
mToolTipDisplayPolicy = FolderTreeWidget::DisplayAlways;
diff --git a/mailcommon/foldertreewidget.cpp b/mailcommon/foldertreewidget.cpp
index f5e4bee..b4a1c3e 100644
--- a/mailcommon/foldertreewidget.cpp
+++ b/mailcommon/foldertreewidget.cpp
@@ -56,7 +56,7 @@ public:
folderTreeView( 0 ),
quotaModel( 0 ),
readableproxy( 0 ),
- filterTreeViewModel( 0 ),
+ // filterTreeViewModel( 0 ),
entityOrderProxy( 0 ),
filterFolderLineEdit( 0 ),
saver( 0 ),
@@ -70,7 +70,6 @@ public:
FolderTreeView *folderTreeView;
Akonadi::QuotaColorProxyModel *quotaModel;
ReadableCollectionProxyModel *readableproxy;
- KRecursiveFilterProxyModel *filterTreeViewModel;
EntityCollectionOrderProxyModel *entityOrderProxy;
KLineEdit *filterFolderLineEdit;
QPointer<Akonadi::ETMViewStateSaver> saver;
@@ -125,17 +124,10 @@ FolderTreeWidget::FolderTreeWidget( QWidget* parent, KXMLGUIClient* xmlGuiClient
d->folderTreeView->setEditTriggers( QAbstractItemView::NoEditTriggers );
d->folderTreeView->installEventFilter( this );
- // Use the model
-
- //Filter tree view.
- d->filterTreeViewModel = new KRecursiveFilterProxyModel( this );
- d->filterTreeViewModel->setDynamicSortFilter( true );
- d->filterTreeViewModel->setSourceModel( d->readableproxy );
- d->filterTreeViewModel->setFilterCaseSensitivity( Qt::CaseInsensitive );
-
+
//Order proxy
d->entityOrderProxy = new EntityCollectionOrderProxyModel( this );
- d->entityOrderProxy->setSourceModel( d->filterTreeViewModel );
+ d->entityOrderProxy->setSourceModel( d->readableproxy );
KConfigGroup grp( KernelIf->config(), "CollectionTreeOrder" );
d->entityOrderProxy->setOrderConfig( grp );
d->folderTreeView->setModel( d->entityOrderProxy );
@@ -188,7 +180,7 @@ void FolderTreeWidget::slotFilterFixedString( const QString& text )
}
d->oldFilterStr = text;
- d->filterTreeViewModel->setFilterFixedString( text );
+ d->readableproxy->setFilterFolder( text );
}
void FolderTreeWidget::disableContextMenuAndExtraColumn()
@@ -353,7 +345,7 @@ void FolderTreeWidget::applyFilter( const QString &filter )
{
d->label->setText( filter.isEmpty() ? i18n( "You can start typing to filter the list of folders." )
: i18n( "Path: (%1)", filter ) );
- d->filterTreeViewModel->setFilterWildcard( filter );
+ d->readableproxy->setFilterFolder( filter );
d->folderTreeView->expandAll();
}
diff --git a/mailcommon/mailfilter.h b/mailcommon/mailfilter.h
index 9e13bf9..d02f87a 100644
--- a/mailcommon/mailfilter.h
+++ b/mailcommon/mailfilter.h
@@ -29,7 +29,6 @@
#include "mailcommon_export.h"
-class QString;
class KConfigGroup;
namespace MailCommon {
diff --git a/mailcommon/mailutil.cpp b/mailcommon/mailutil.cpp
index 7df72cb..1716b81 100644
--- a/mailcommon/mailutil.cpp
+++ b/mailcommon/mailutil.cpp
@@ -125,9 +125,11 @@ Akonadi::AgentInstance::List MailCommon::Util::agentInstances()
{
Akonadi::AgentInstance::List relevantInstances;
foreach ( const Akonadi::AgentInstance &instance, Akonadi::AgentManager::self()->instances() ) {
+ const QStringList capabilities( instance.type().capabilities() );
if ( instance.type().mimeTypes().contains( KMime::Message::mimeType() ) &&
- instance.type().capabilities().contains( "Resource" ) &&
- !instance.type().capabilities().contains( "Virtual" ) ) {
+ capabilities.contains( "Resource" ) &&
+ !capabilities.contains( "Virtual" ) &&
+ !capabilities.contains( "MailTransport" ) ) {
relevantInstances << instance;
}
}
diff --git a/mailcommon/readablecollectionproxymodel.cpp b/mailcommon/readablecollectionproxymodel.cpp
index af0f034..5fdef04 100644
--- a/mailcommon/readablecollectionproxymodel.cpp
+++ b/mailcommon/readablecollectionproxymodel.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2009, 2010 Laurent Montel <montel@kde.org>
+ Copyright (c) 2009, 2010, 2011 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
@@ -43,6 +43,7 @@ public:
hideImapFolder( false )
{
}
+ QString filterStr;
bool enableCheck;
bool hideVirtualFolder;
bool hideSpecificFolder;
@@ -55,6 +56,8 @@ ReadableCollectionProxyModel::ReadableCollectionProxyModel( QObject *parent, Rea
d( new Private )
{
setDynamicSortFilter( true );
+ setFilterCaseSensitivity( Qt::CaseInsensitive );
+
if ( option & HideVirtualFolder ) {
d->hideVirtualFolder = true;
}
@@ -77,24 +80,26 @@ ReadableCollectionProxyModel::~ReadableCollectionProxyModel()
Qt::ItemFlags ReadableCollectionProxyModel::flags( const QModelIndex & index ) const
{
- // TODO: Should this always exit with a call to Akonadi::EntityRightsFilterModel::flags ?
- if ( d->enableCheck )
+ if ( !d->filterStr.isEmpty() )
{
- const QModelIndex sourceIndex = mapToSource( index.sibling( index.row(), 0 ) );
- const Akonadi::Collection collection = sourceModel()->data( sourceIndex, Akonadi::EntityTreeModel::CollectionRole ).value<Akonadi::Collection>();
-
- if ( ( !( collection.rights() & Akonadi::Collection::CanCreateItem ) ) || collection.contentMimeTypes().isEmpty()) {
+ if ( !index.data().toString().contains( d->filterStr, Qt::CaseInsensitive ) )
return KRecursiveFilterProxyModel::flags( index ) & ~(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- }
- return Akonadi::EntityRightsFilterModel::flags( index );
}
+
+ if ( d->enableCheck )
+ return Akonadi::EntityRightsFilterModel::flags( index );
return QSortFilterProxyModel::flags( index );
}
void ReadableCollectionProxyModel::setEnabledCheck( bool enable )
{
+ if ( d->enableCheck == enable )
+ return;
d->enableCheck = enable;
+ if ( enable ) {
+ setAccessRights( Akonadi::Collection::CanCreateItem );
+ }
}
bool ReadableCollectionProxyModel::enabledCheck() const
@@ -169,8 +174,15 @@ bool ReadableCollectionProxyModel::acceptRow( int sourceRow, const QModelIndex &
if ( collection.resource().startsWith( IMAP_RESOURCE_IDENTIFIER ) )
return false;
}
+ if ( d->filterStr.isEmpty() )
+ return Akonadi::EntityRightsFilterModel::acceptRow( sourceRow, sourceParent );
+ return KRecursiveFilterProxyModel::acceptRow( sourceRow, sourceParent );
+}
- return Akonadi::EntityRightsFilterModel::acceptRow( sourceRow, sourceParent );
+void ReadableCollectionProxyModel::setFilterFolder( const QString& filter )
+{
+ d->filterStr = filter;
+ setFilterWildcard( filter );
}
}
diff --git a/mailcommon/readablecollectionproxymodel.h b/mailcommon/readablecollectionproxymodel.h
index e411f28..7d95af0 100644
--- a/mailcommon/readablecollectionproxymodel.h
+++ b/mailcommon/readablecollectionproxymodel.h
@@ -65,6 +65,8 @@ public:
void setHideImapFolder( bool hide );
bool hideImapFolder() const;
+ void setFilterFolder( const QString& filter );
+
protected:
virtual bool acceptRow( int sourceRow, const QModelIndex &sourceParent ) const;
diff --git a/mailcommon/snippetdialog.cpp b/mailcommon/snippetdialog.cpp
index b56d454..fe27e57 100644
--- a/mailcommon/snippetdialog.cpp
+++ b/mailcommon/snippetdialog.cpp
@@ -32,10 +32,12 @@ SnippetDialog::SnippetDialog( KActionCollection *actionCollection, bool inGroupM
mUi->keyWidget->setCheckActionCollections( QList<KActionCollection*>() << actionCollection );
enableButton( Ok, false );
- connect( mUi->nameEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotTextChanged( const QString& ) ) );
- connect( mUi->nameEdit, SIGNAL( returnPressed() ),
- this, SLOT( slotReturnPressed() ) );
+ connect( mUi->nameEdit, SIGNAL(textChanged(QString)),
+ this, SLOT(slotTextChanged()) );
+ connect( mUi->nameEdit, SIGNAL(returnPressed()),
+ this, SLOT(slotReturnPressed()) );
+ connect( mUi->groupBox, SIGNAL(currentIndexChanged(QString)),
+ this, SLOT(slotGroupChanged()));
mUi->snippetText->setMinimumSize( 500, 300 );
@@ -48,6 +50,11 @@ SnippetDialog::~SnippetDialog()
delete mUi;
}
+void SnippetDialog::slotGroupChanged()
+{
+ enableButton( Ok, snippetIsValid() );
+}
+
void SnippetDialog::setName( const QString &name )
{
mUi->nameEdit->setText( name );
@@ -93,14 +100,23 @@ QModelIndex SnippetDialog::groupIndex() const
return mUi->groupBox->model()->index( mUi->groupBox->currentIndex(), 0 );
}
-void SnippetDialog::slotTextChanged( const QString &text )
+void SnippetDialog::slotTextChanged()
+{
+ enableButton( Ok, snippetIsValid() );
+}
+
+bool SnippetDialog::snippetIsValid() const
{
- enableButton( Ok, !text.isEmpty() );
+ if ( mUi->groupWidget->isVisible() )
+ return ( !mUi->nameEdit->text().isEmpty() &&
+ !mUi->groupBox->currentText().isEmpty() );
+ else
+ return ( !mUi->nameEdit->text().isEmpty() );
}
void SnippetDialog::slotReturnPressed()
{
- if ( !mUi->nameEdit->text().isEmpty() ) {
+ if ( snippetIsValid() ) {
accept();
}
}
diff --git a/mailcommon/snippetdialog_p.h b/mailcommon/snippetdialog_p.h
index 765c7d7..573d7fe 100644
--- a/mailcommon/snippetdialog_p.h
+++ b/mailcommon/snippetdialog_p.h
@@ -48,10 +48,13 @@ class SnippetDialog : public KDialog
QModelIndex groupIndex() const;
private Q_SLOTS:
- void slotTextChanged( const QString& );
+ void slotTextChanged();
+ void slotGroupChanged();
void slotReturnPressed();
private:
+ bool snippetIsValid() const;
+
KActionCollection *mActionCollection;
Ui::SnippetDialog *mUi;
};
diff --git a/mailcommon/snippetsmanager.cpp b/mailcommon/snippetsmanager.cpp
index 9bea806..f60f29e 100644
--- a/mailcommon/snippetsmanager.cpp
+++ b/mailcommon/snippetsmanager.cpp
@@ -39,8 +39,8 @@ using namespace MailCommon;
class SnippetsManager::Private
{
public:
- Private( SnippetsManager *qq )
- : q( qq ), mEditor( 0 )
+ Private( SnippetsManager *qq, QWidget * parent )
+ : q( qq ), mEditor( 0 ), mParent( parent )
{
}
@@ -82,6 +82,7 @@ class SnippetsManager::Private
QAction *mEditSnippetGroupAction;
QAction *mDeleteSnippetGroupAction;
QAction *mInsertSnippetAction;
+ QWidget *mParent;
};
QModelIndex SnippetsManager::Private::currentGroupIndex() const
@@ -140,7 +141,7 @@ void SnippetsManager::Private::addSnippet()
mSelectionModel->select( groupIndex, QItemSelectionModel::ClearAndSelect );
}
- SnippetDialog dlg( mActionCollection, false );
+ SnippetDialog dlg( mActionCollection, false, mParent );
dlg.setWindowTitle( i18nc( "@title:window", "Add Snippet" ) );
dlg.setGroupModel( mModel );
dlg.setGroupIndex( currentGroupIndex() );
@@ -171,7 +172,7 @@ void SnippetsManager::Private::editSnippet()
const QString oldSnippetName = index.data( SnippetsModel::NameRole ).toString();
- SnippetDialog dlg( mActionCollection, false );
+ SnippetDialog dlg( mActionCollection, false, mParent );
dlg.setWindowTitle( i18nc( "@title:window", "Edit Snippet" ) );
dlg.setGroupModel( mModel );
dlg.setGroupIndex( oldGroupIndex );
@@ -219,7 +220,7 @@ void SnippetsManager::Private::deleteSnippet()
void SnippetsManager::Private::addSnippetGroup()
{
- SnippetDialog dlg( mActionCollection, true );
+ SnippetDialog dlg( mActionCollection, true,mParent );
dlg.setWindowTitle( i18nc( "@title:window", "Add Group" ) );
if ( !dlg.exec() )
@@ -240,7 +241,7 @@ void SnippetsManager::Private::editSnippetGroup()
if ( !groupIndex.isValid() || !groupIndex.data( SnippetsModel::IsGroupRole ).toBool() )
return;
- SnippetDialog dlg( mActionCollection, true );
+ SnippetDialog dlg( mActionCollection, true, mParent );
dlg.setWindowTitle( i18nc( "@title:window", "Edit Group" ) );
dlg.setName( groupIndex.data( SnippetsModel::NameRole ).toString() );
@@ -478,8 +479,8 @@ void SnippetsManager::Private::save()
}
-SnippetsManager::SnippetsManager( KActionCollection *actionCollection, QObject *parent )
- : QObject( parent ), d( new Private( this ) )
+SnippetsManager::SnippetsManager( KActionCollection *actionCollection, QObject *parent, QWidget *widget )
+ : QObject( parent ), d( new Private( this, widget ) )
{
d->mModel = new SnippetsModel( this );
d->mSelectionModel = new QItemSelectionModel( d->mModel );
diff --git a/mailcommon/snippetsmanager.h b/mailcommon/snippetsmanager.h
index 00f4f5c..b8cffc2 100644
--- a/mailcommon/snippetsmanager.h
+++ b/mailcommon/snippetsmanager.h
@@ -58,7 +58,7 @@ class MAILCOMMON_EXPORT SnippetsManager : public QObject
* @param actionCollection The action collection where the manager will register the snippet shortcuts at.
* @param parent The parent object.
*/
- explicit SnippetsManager( KActionCollection *actionCollection, QObject *parent = 0 );
+ explicit SnippetsManager( KActionCollection *actionCollection, QObject *parent = 0, QWidget *widget = 0 );
/**
* Destroys the snippets manager.
diff --git a/mailcommon/snippetvariabledialog.cpp b/mailcommon/snippetvariabledialog.cpp
index e155eb8..671e49c 100644
--- a/mailcommon/snippetvariabledialog.cpp
+++ b/mailcommon/snippetvariabledialog.cpp
@@ -34,7 +34,7 @@ SnippetVariableDialog::SnippetVariableDialog( const QString &variableName, QMap<
: KDialog( parent ), mVariableName( variableName ), mVariables( variables )
{
setWindowTitle( i18n( "Enter Values for Variables" ) );
- setButtons( Apply | Cancel );
+ setButtons( Ok | Cancel );
QVBoxLayout *layout = new QVBoxLayout( mainWidget() );
@@ -72,7 +72,7 @@ QString SnippetVariableDialog::variableValue() const
void SnippetVariableDialog::slotButtonClicked( int button )
{
- if ( button == KDialog::Apply ) {
+ if ( button == KDialog::Ok ) {
if ( mSaveVariable->isChecked() )
mVariables->insert( mVariableName, mVariableValueText->toPlainText() );
else
diff --git a/messagecore/attachmentpropertiesdialog.cpp b/messagecore/attachmentpropertiesdialog.cpp
index ecc66f7..d0a2763 100644
--- a/messagecore/attachmentpropertiesdialog.cpp
+++ b/messagecore/attachmentpropertiesdialog.cpp
@@ -94,7 +94,7 @@ void AttachmentPropertiesDialog::Private::polishUi()
ui.encrypt->setEnabled( false );
ui.sign->setEnabled( false );
- q->setButtons( Ok | Help );
+ q->setButtons( Close | Help );
} else {
populateEncodings();
populateMimeTypes();
diff --git a/messagelist/core/messageitem.cpp b/messagelist/core/messageitem.cpp
index 6018fad..b905ea8 100644
--- a/messagelist/core/messageitem.cpp
+++ b/messagelist/core/messageitem.cpp
@@ -116,12 +116,10 @@ void MessageItem::Tag::setPriority( int priority )
}
-QColor MessageItemPrivate::mColorNewMessage;
QColor MessageItemPrivate::mColorUnreadMessage;
QColor MessageItemPrivate::mColorImportantMessage;
QColor MessageItemPrivate::mColorToDoMessage;
QFont MessageItemPrivate::mFont;
-QFont MessageItemPrivate::mFontNewMessage;
QFont MessageItemPrivate::mFontUnreadMessage;
QFont MessageItemPrivate::mFontImportantMessage;
QFont MessageItemPrivate::mFontToDoMessage;
@@ -553,12 +551,6 @@ void MessageItem::subTreeToList( QList< MessageItem * > &list )
}
}
-void MessageItem::setNewMessageColor( const QColor &color )
-{
- MessageItemPrivate::mColorNewMessage = color;
-}
-
-
void MessageItem::setUnreadMessageColor( const QColor &color )
{
MessageItemPrivate::mColorUnreadMessage = color;
@@ -582,11 +574,6 @@ void MessageItem::setGeneralFont( const QFont &font )
MessageItemPrivate::mFont = font;
}
-void MessageItem::setNewMessageFont( const QFont &font )
-{
- MessageItemPrivate::mFontNewMessage = font;
-}
-
void MessageItem::setUnreadMessageFont( const QFont &font )
{
MessageItemPrivate::mFontUnreadMessage = font;
diff --git a/messagelist/core/messageitem.h b/messagelist/core/messageitem.h
index 832e861..fac8bdf 100644
--- a/messagelist/core/messageitem.h
+++ b/messagelist/core/messageitem.h
@@ -189,12 +189,10 @@ public:
// one of these.
// Call these setters only once when reading the colors from the config file.
//
- static void setNewMessageColor( const QColor &color );
static void setUnreadMessageColor( const QColor &color );
static void setImportantMessageColor( const QColor &color );
static void setToDoMessageColor( const QColor &color );
static void setGeneralFont( const QFont &font );
- static void setNewMessageFont( const QFont &font );
static void setUnreadMessageFont( const QFont &font );
static void setImportantMessageFont( const QFont &font );
static void setToDoMessageFont( const QFont &font );
diff --git a/messagelist/core/settings.kcfg b/messagelist/core/settings.kcfg
index 9c9133e..6f98379 100644
--- a/messagelist/core/settings.kcfg
+++ b/messagelist/core/settings.kcfg
@@ -21,9 +21,6 @@
</group>
<group name="MessageListView::Colors">
- <entry name="NewMessageColor" type="Color">
- <default>#FF0000</default>
- </entry>
<entry name="UnreadMessageColor" type="Color">
<default>#0000FF</default>
</entry>
@@ -39,9 +36,6 @@
<entry name="MessageListFont" type="Font">
<default>KGlobalSettings::generalFont()</default>
</entry>
- <entry name="NewMessageFont" type="Font">
- <default>KGlobalSettings::generalFont()</default>
- </entry>
<entry name="UnreadMessageFont" type="Font">
<default>KGlobalSettings::generalFont()</default>
</entry>
diff --git a/messagelist/storagemodel.cpp b/messagelist/storagemodel.cpp
index 21bea82..fff800b 100644
--- a/messagelist/storagemodel.cpp
+++ b/messagelist/storagemodel.cpp
@@ -439,12 +439,10 @@ void StorageModel::Private::loadSettings()
Core::Settings *settings = Core::Settings::self();
if ( MessageCore::GlobalSettings::self()->useDefaultColors() ) {
- Core::MessageItem::setNewMessageColor( QColor( "red" ) );
Core::MessageItem::setUnreadMessageColor( QColor( "blue" ) );
Core::MessageItem::setImportantMessageColor( QColor( 0x0, 0x7F, 0x0 ) );
Core::MessageItem::setToDoMessageColor( QColor( 0x0, 0x98, 0x0 ) );
} else {
- Core::MessageItem::setNewMessageColor( settings->newMessageColor() );
Core::MessageItem::setUnreadMessageColor( settings->unreadMessageColor() );
Core::MessageItem::setImportantMessageColor( settings->importantMessageColor() );
Core::MessageItem::setToDoMessageColor( settings->todoMessageColor() );
@@ -452,13 +450,11 @@ void StorageModel::Private::loadSettings()
if ( MessageCore::GlobalSettings::self()->useDefaultFonts() ) {
Core::MessageItem::setGeneralFont( KGlobalSettings::generalFont() );
- Core::MessageItem::setNewMessageFont( KGlobalSettings::generalFont() );
Core::MessageItem::setUnreadMessageFont( KGlobalSettings::generalFont() );
Core::MessageItem::setImportantMessageFont( KGlobalSettings::generalFont() );
Core::MessageItem::setToDoMessageFont( KGlobalSettings::generalFont() );
} else {
Core::MessageItem::setGeneralFont( settings->messageListFont() );
- Core::MessageItem::setNewMessageFont( settings->newMessageFont() );
Core::MessageItem::setUnreadMessageFont( settings->unreadMessageFont() );
Core::MessageItem::setImportantMessageFont( settings->importantMessageFont() );
Core::MessageItem::setToDoMessageFont( settings->todoMessageFont() );
diff --git a/messageviewer/findbar/findbarbase.cpp b/messageviewer/findbar/findbarbase.cpp
index 21112b0..5263218 100644
--- a/messageviewer/findbar/findbarbase.cpp
+++ b/messageviewer/findbar/findbarbase.cpp
@@ -86,6 +86,7 @@ FindBarBase::FindBarBase( QWidget * parent )
connect( m_caseSensitiveAct, SIGNAL(toggled(bool)), this, SLOT(caseSensitivityChanged()) );
connect( m_search, SIGNAL(textChanged(QString)), this, SLOT(autoSearch(QString)) );
connect( m_search, SIGNAL(clearButtonClicked()), this, SLOT(slotClearSearch()) );
+ setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
hide();
}
diff --git a/messageviewer/headerstyle.cpp b/messageviewer/headerstyle.cpp
index 00f852f..b4eaa71 100644
--- a/messageviewer/headerstyle.cpp
+++ b/messageviewer/headerstyle.cpp
@@ -87,18 +87,47 @@ static QString strToHtml( const QString & str,
// Prepare the date string (when printing always use the localized date)
static QString dateString( KMime::Message *message, bool printing, bool shortDate ) {
+ const KDateTime dateTime = message->date()->dateTime();
+ if ( !dateTime.isValid() )
+ return i18nc( "Unknown date", "Unknown" );
if( printing ) {
- KDateTime dateTime = message->date()->dateTime();
KLocale * locale = KGlobal::locale();
return locale->formatDateTime( dateTime );
} else {
if ( shortDate )
- return MessageViewer::HeaderStyle::dateShortStr( message->date()->dateTime() );
+ return MessageViewer::HeaderStyle::dateShortStr( dateTime );
else
- return MessageViewer::HeaderStyle::dateStr( message->date()->dateTime() );
+ return MessageViewer::HeaderStyle::dateStr( dateTime );
}
}
+static QString subjectString( KMime::Message *message, int flags = LinkLocator::PreserveSpaces )
+{
+ QString subject;
+ if ( message->subject(false) ) {
+ subject = message->subject()->asUnicodeString();
+ if ( subject.isEmpty() )
+ subject = i18n("No Subject");
+ else
+ subject = strToHtml( subject, flags );
+ } else {
+ subject = i18n("No Subject");
+ }
+
+ return subject;
+}
+
+static QString subjectDirectionString( KMime::Message *message )
+{
+ QString subjectDir;
+ if ( message->subject(false) )
+ subjectDir = directionOf( NodeHelper::cleanSubject( message ) );
+ else
+ subjectDir = directionOf( i18n("No Subject") );
+ return subjectDir;
+}
+
+
bool HeaderStyle::hasAttachmentQuickList() const
{
return false;
@@ -140,20 +169,16 @@ QString BriefHeaderStyle::format( KMime::Message *message ) const {
// considered left-to-right, they are ignored when determining its
// direction.
- QString subjectDir;
- if ( message->subject(false) )
- subjectDir = directionOf( NodeHelper::cleanSubject( message ) );
- else
- subjectDir = directionOf( i18n("No Subject") );
+ QString subjectDir = subjectDirectionString( message );
QString headerStr = "<div class=\"header\" dir=\"" + dir + "\">\n";
- if ( strategy->showHeader( "subject" ) )
+ if ( strategy->showHeader( "subject" ) ) {
headerStr += "<div dir=\"" + subjectDir + "\">\n"
- "<b style=\"font-size:130%\">" +
- strToHtml( message->subject()->asUnicodeString() ) +
- "</b></div>\n";
-
+ "<b style=\"font-size:130%\">";
+
+ headerStr += subjectString( message ) + "</b></div>\n";
+ }
QStringList headerParts;
if ( strategy->showHeader( "from" ) ) {
@@ -226,12 +251,8 @@ QString PlainHeaderStyle::format( KMime::Message *message ) const {
// considered left-to-right, they are ignored when determining its
// direction.
- QString subjectDir;
- if (message->subject(false))
- subjectDir = directionOf( NodeHelper::cleanSubject( message ) );
- else
- subjectDir = directionOf( i18n("No Subject") );
-
+ QString subjectDir = subjectDirectionString( message );
+;
QString headerStr;
if ( strategy->headersToDisplay().isEmpty()
@@ -248,7 +269,7 @@ QString PlainHeaderStyle::format( KMime::Message *message ) const {
//case HdrLong:
if ( strategy->showHeader( "subject" ) )
headerStr += QString("<div dir=\"%1\"><b style=\"font-size:130%\">" +
- strToHtml(message->subject()->asUnicodeString()) + "</b></div>\n")
+ subjectString( message ) + "</b></div>\n")
.arg(subjectDir);
if ( strategy->showHeader( "date" ) )
@@ -453,11 +474,7 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
// considered left-to-right, they are ignored when determining its
// direction.
- QString subjectDir;
- if ( message->subject(false) )
- subjectDir = directionOf( NodeHelper::cleanSubject( message ) );
- else
- subjectDir = directionOf( i18n("No Subject") );
+ QString subjectDir = subjectDirectionString( message );
// Spam header display.
// If the spamSpamStatus config value is true then we look for headers
@@ -468,7 +485,8 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
if ( GlobalSettings::self()->showSpamStatus() ) {
const SpamScores scores = SpamHeaderAnalyzer::getSpamScores( message );
- for ( SpamScores::const_iterator it = scores.begin(), end = scores.end() ; it != end ; ++it )
+
+ for ( SpamScores::const_iterator it = scores.constBegin(), end = scores.constEnd() ; it != end ; ++it )
spamHTML += (*it).agent() + ' ' +
drawSpamMeter( (*it).error(), (*it).score(), (*it).confidence(), (*it).spamHeader(), (*it).confidenceHeader() );
}
@@ -591,11 +609,10 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
( GlobalSettings::self()->showEmoticons() ?
LinkLocator::ReplaceSmileys : 0 );
- headerStr += QString("<div dir=\"%1\">%2</div>\n")
+ if ( message->subject(false) )
+ headerStr += QString::fromLatin1("<div dir=\"%1\">%2</div>\n")
.arg(subjectDir)
- .arg(!message->subject(false)?
- i18n("No Subject") :
- strToHtml( message->subject()->asUnicodeString(), flags ));
+ .arg( subjectString( message, flags ) );
}
headerStr += "<table class=\"outer\"><tr><td width=\"100%\"><table>\n";
//headerStr += "<table>\n";
@@ -619,7 +636,7 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
}
}
- headerStr += QString("<tr><th>%1</th>\n"
+ headerStr += QString::fromLatin1("<tr><th>%1</th>\n"
"<td>")
.arg(i18n("From: "))
+ StringUtil::emailAddrAsAnchor( message->from(), StringUtil::DisplayFullAddress )
@@ -640,7 +657,7 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
}
// to line
if ( strategy->showHeader( "to" ) )
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(QString::fromLatin1("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg( i18nc( "To-field of the mail header.","To: " ) )
.arg( StringUtil::emailAddrAsAnchor( message->to(), StringUtil::DisplayFullAddress,
@@ -650,7 +667,7 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
// cc line, if an
if ( strategy->showHeader( "cc" ) && message->cc(false))
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(QString::fromLatin1("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg( i18n( "CC: " ) )
.arg( StringUtil::emailAddrAsAnchor(message->cc(), StringUtil::DisplayFullAddress,
@@ -660,13 +677,13 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
// Bcc line, if any
if ( strategy->showHeader( "bcc" ) && message->bcc(false))
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(QString::fromLatin1("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg( i18n( "BCC: " ) )
.arg( StringUtil::emailAddrAsAnchor( message->bcc(), StringUtil::DisplayFullAddress ) ) );
if ( strategy->showHeader( "date" ) )
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(QString::fromLatin1("<tr><th>%1</th>\n"
"<td dir=\"%2\">%3</td></tr>\n")
.arg(i18n("Date: "))
.arg( directionOf( dateStr( message->date()->dateTime() ) ) )
@@ -674,7 +691,7 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
if ( GlobalSettings::self()->showUserAgent() ) {
if ( strategy->showHeader( "user-agent" ) ) {
if ( message->headerByType("User-Agent") ) {
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(QString::fromLatin1("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("User-Agent: "))
.arg( strToHtml( message->headerByType("User-Agent")->as7BitString() ) ) );
@@ -683,7 +700,7 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
if ( strategy->showHeader( "x-mailer" ) ) {
if ( message->headerByType("X-Mailer") ) {
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(QString::fromLatin1("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("X-Mailer: "))
.arg( strToHtml( message->headerByType("X-Mailer")->as7BitString() ) ) );
@@ -692,10 +709,10 @@ QString FancyHeaderStyle::format( KMime::Message *message ) const {
}
headerStr.append( QString( "<tr><td colspan=\"2\"><div id=\"attachmentInjectionPoint\"></div></td></tr>" ) );
headerStr.append(
- QString( "</table></td><td align=\"center\">%1</td></tr></table>\n" ).arg(userHTML) );
+ QString::fromLatin1( "</table></td><td align=\"center\">%1</td></tr></table>\n" ).arg(userHTML) );
if ( !spamHTML.isEmpty() )
- headerStr.append( QString( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b> <span style=\"padding-left: 20px;\">%3</span></div>\n")
+ headerStr.append( QString::fromLatin1( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b> <span style=\"padding-left: 20px;\">%3</span></div>\n")
.arg( subjectDir, i18n("Spam Status:"), spamHTML ) );
headerStr += "</div>\n\n";
@@ -758,12 +775,7 @@ QString EnterpriseHeaderStyle::format( KMime::Message *message ) const
// considered left-to-right, they are ignored when determining its
// direction.
-//TODO(Andras) this is duplicate code, try to factor out!
- QString subjectDir;
- if (message->subject(false))
- subjectDir = directionOf( NodeHelper::cleanSubject( message ) );
- else
- subjectDir = directionOf( i18n("No Subject") );
+ QString subjectDir = subjectDirectionString( message );
// colors depend on if it is encapsulated or not
QColor fontColor( Qt::white );
@@ -812,12 +824,12 @@ QString EnterpriseHeaderStyle::format( KMime::Message *message ) const
" <table style=\"color: "+fontColor.name()+" ! important; margin: 1px; border-spacing: 0px;\" cellpadding=0> \n";
// subject
- //strToHtml( message->subject() )
if ( strategy->showHeader( "subject" ) ) {
headerStr +=
" <tr> \n"
" <td style=\"font-size: 6px; text-align: right; padding-left: 5px; padding-right: 24px; "+borderSettings+"\"></td> \n"
- " <td style=\"font-weight: bolder; font-size: 120%; padding-right: 91px; "+borderSettings+"\">"+message->subject()->asUnicodeString()+"</td> \n"
+ " <td style=\"font-weight: bolder; font-size: 120%; padding-right: 91px; "+borderSettings+"\">";
+ headerStr += subjectString( message )+ "</td> \n"
" </tr> \n";
}
diff --git a/messageviewer/markmessagereadhandler.cpp b/messageviewer/markmessagereadhandler.cpp
index 0a73107..b367d87 100644
--- a/messageviewer/markmessagereadhandler.cpp
+++ b/messageviewer/markmessagereadhandler.cpp
@@ -26,7 +26,6 @@
#include <akonadi/itemmodifyjob.h>
#include <akonadi/kmime/messageflags.h>
-#include <QtCore/QQueue>
#include <QtCore/QTimer>
using namespace MessageViewer;
@@ -42,21 +41,19 @@ class MarkMessageReadHandler::Private
void handleMessages();
MarkMessageReadHandler *q;
- QQueue<Akonadi::Item> mItemQueue;
+ Akonadi::Item mItemQueue;
QTimer mTimer;
};
void MarkMessageReadHandler::Private::handleMessages()
{
- while ( !mItemQueue.isEmpty() ) {
- Akonadi::Item item = mItemQueue.dequeue();
+ Akonadi::Item item = mItemQueue;
- // mark as read
- item.setFlag( Akonadi::MessageFlags::Seen );
-
- Akonadi::ItemModifyJob *modifyJob = new Akonadi::ItemModifyJob( item, q );
- modifyJob->setIgnorePayload( true );
- }
+ // mark as read
+ item.setFlag( Akonadi::MessageFlags::Seen );
+
+ Akonadi::ItemModifyJob *modifyJob = new Akonadi::ItemModifyJob( item, q );
+ modifyJob->setIgnorePayload( true );
}
@@ -69,6 +66,8 @@ MarkMessageReadHandler::MarkMessageReadHandler( QObject *parent )
MarkMessageReadHandler::~MarkMessageReadHandler()
{
+ if( d->mTimer.isActive() )
+ d->mTimer.stop();
delete d;
}
@@ -77,18 +76,21 @@ void MarkMessageReadHandler::setItem( const Akonadi::Item &item )
if ( item.hasFlag( Akonadi::MessageFlags::Seen ) )
return;
- if ( d->mItemQueue.contains( item ) )
+ if ( d->mItemQueue == item )
return;
d->mTimer.stop();
- d->mItemQueue.enqueue( item );
+ d->mItemQueue = item;
if ( MessageViewer::GlobalSettings::self()->delayedMarkAsRead() ) {
- if ( MessageViewer::GlobalSettings::self()->delayedMarkTime() != 0 )
- d->mTimer.start( MessageViewer::GlobalSettings::self()->delayedMarkTime() * 1000 );
- else
+ const int delayedMarkTime = MessageViewer::GlobalSettings::self()->delayedMarkTime();
+ if ( delayedMarkTime != 0 ) {
+ d->mTimer.start( delayedMarkTime * 1000 );
+ }
+ else {
d->handleMessages();
+ }
}
}
diff --git a/messageviewer/viewer_p.cpp b/messageviewer/viewer_p.cpp
index b8d3926..c9eae11 100644
--- a/messageviewer/viewer_p.cpp
+++ b/messageviewer/viewer_p.cpp
@@ -240,6 +240,7 @@ ViewerPrivate::ViewerPrivate( Viewer *aParent, QWidget *mainWindow,
ViewerPrivate::~ViewerPrivate()
{
+ saveMimePartTreeConfig();
GlobalSettings::self()->writeConfig();
delete mHtmlWriter; mHtmlWriter = 0;
delete mViewer; mViewer = 0;
@@ -248,6 +249,23 @@ ViewerPrivate::~ViewerPrivate()
delete mNodeHelper;
}
+void ViewerPrivate::saveMimePartTreeConfig()
+{
+#ifndef QT_NO_TREEVIEW
+ KConfigGroup grp( GlobalSettings::self()->config(), "MimePartTree" );
+ grp.writeEntry( "State", mMimePartTree->header()->saveState() );
+#endif
+}
+
+void ViewerPrivate::restoreMimePartTreeConfig()
+{
+#ifndef QT_NO_TREEVIEW
+ KConfigGroup grp( GlobalSettings::self()->config(), "MimePartTree" );
+ mMimePartTree->header()->restoreState( grp.readEntry( "State", QByteArray() ) );
+#endif
+}
+
+
//-----------------------------------------------------------------------------
KMime::Content * ViewerPrivate::nodeFromUrl( const KUrl & url )
{
@@ -1291,7 +1309,8 @@ void ViewerPrivate::createWidgets() {
mMimePartTree->setContextMenuPolicy(Qt::CustomContextMenu);
connect(mMimePartTree, SIGNAL( customContextMenuRequested( const QPoint& ) ), this, SLOT( slotMimeTreeContextMenuRequested(const QPoint&)) );
mMimePartTree->header()->setResizeMode( QHeaderView::ResizeToContents );
- connect(mMimePartModel,SIGNAL(modelReset ()),mMimePartTree,SLOT(expandAll()));
+ connect(mMimePartModel,SIGNAL(modelReset()),mMimePartTree,SLOT(expandAll()));
+ restoreMimePartTreeConfig();
#endif
mBox = new KHBox( mSplitter );
@@ -1990,6 +2009,10 @@ void ViewerPrivate::slotCycleHeaderStyles() {
void ViewerPrivate::slotBriefHeaders()
{
+ if ( ( mHeaderStyle == HeaderStyle::brief() )
+ && mHeaderStrategy == HeaderStrategy::brief() )
+ return;
+
setHeaderStyleAndStrategy( HeaderStyle::brief(),
HeaderStrategy::brief() );
if( !mExternalWindow )
@@ -1999,6 +2022,9 @@ void ViewerPrivate::slotBriefHeaders()
void ViewerPrivate::slotFancyHeaders()
{
+ if ( ( mHeaderStyle == HeaderStyle::fancy() )
+ && mHeaderStrategy == HeaderStrategy::rich() )
+ return;
setHeaderStyleAndStrategy( HeaderStyle::fancy(),
HeaderStrategy::rich() );
if( !mExternalWindow )
@@ -2008,6 +2034,10 @@ void ViewerPrivate::slotFancyHeaders()
void ViewerPrivate::slotEnterpriseHeaders()
{
+ if ( ( mHeaderStyle == HeaderStyle::enterprise() )
+ && mHeaderStrategy == HeaderStrategy::rich() )
+ return;
+
setHeaderStyleAndStrategy( HeaderStyle::enterprise(),
HeaderStrategy::rich() );
if( !mExternalWindow )
@@ -2017,14 +2047,23 @@ void ViewerPrivate::slotEnterpriseHeaders()
void ViewerPrivate::slotStandardHeaders()
{
+ if ( ( mHeaderStyle == HeaderStyle::plain() )
+ && mHeaderStrategy == HeaderStrategy::standard() )
+ return;
+
setHeaderStyleAndStrategy( HeaderStyle::plain(),
HeaderStrategy::standard());
- writeConfig();
+ if( !mExternalWindow )
+ writeConfig();
}
void ViewerPrivate::slotLongHeaders()
{
+ if ( ( mHeaderStyle == HeaderStyle::plain() )
+ && mHeaderStrategy == HeaderStrategy::rich() )
+ return;
+
setHeaderStyleAndStrategy( HeaderStyle::plain(),
HeaderStrategy::rich() );
if( !mExternalWindow )
@@ -2034,6 +2073,10 @@ void ViewerPrivate::slotLongHeaders()
void ViewerPrivate::slotAllHeaders() {
+ if ( ( mHeaderStyle == HeaderStyle::plain() )
+ && mHeaderStrategy == HeaderStrategy::all() )
+ return;
+
setHeaderStyleAndStrategy( HeaderStyle::plain(),
HeaderStrategy::all() );
if( !mExternalWindow )
@@ -2736,7 +2779,7 @@ void ViewerPrivate::itemFetchResult( KJob* job )
} else {
Akonadi::ItemFetchJob* fetch = qobject_cast<Akonadi::ItemFetchJob*>( job );
Q_ASSERT( fetch );
- if ( fetch->items().size() < 1 ) {
+ if ( fetch->items().isEmpty() ) {
displaySplashPage( i18n( "Message not found." ) );
} else {
setMessageItem( fetch->items().first() );
diff --git a/messageviewer/viewer_p.h b/messageviewer/viewer_p.h
index ea6a7ba..29e87f5 100644
--- a/messageviewer/viewer_p.h
+++ b/messageviewer/viewer_p.h
@@ -273,6 +273,8 @@ public:
private:
/** HTML initialization. */
void initHtmlWidget();
+ void saveMimePartTreeConfig();
+ void restoreMimePartTreeConfig();
public:
/** Event filter */
diff --git a/templateparser/templateparser.cpp b/templateparser/templateparser.cpp
index 3f2f88c..a157c9a 100644
--- a/templateparser/templateparser.cpp
+++ b/templateparser/templateparser.cpp
@@ -70,13 +70,19 @@ namespace TemplateParser {
static const int PipeTimeout = 15 * 1000;
-QByteArray selectCharset( const QStringList &charsets, const QString &text )
+QTextCodec* selectCharset( const QStringList &charsets, const QString &text )
{
foreach( const QString &name, charsets ) {
// We use KCharsets::codecForName() instead of QTextCodec::codecForName() here, because
// the former knows us-ascii is latin1.
- QTextCodec *codec = KGlobal::charsets()->codecForName( name );
- if( !codec ) {
+ bool ok = true;
+ QTextCodec *codec;
+ if ( name == "locale" ) {
+ codec = QTextCodec::codecForLocale();
+ } else {
+ codec = KGlobal::charsets()->codecForName( name, ok );
+ }
+ if( !ok || !codec ) {
kWarning() << "Could not get text codec for charset" << name;
continue;
}
@@ -85,12 +91,12 @@ QByteArray selectCharset( const QStringList &charsets, const QString &text )
if( name == "us-ascii" && !KMime::isUsAscii( text ) ) {
continue;
}
- kDebug() << "Chosen charset" << name;
- return name.toLatin1();
+ kDebug() << "Chosen charset" << name << codec->name();
+ return codec;
}
}
kDebug() << "No appropriate charset found.";
- return "utf-8";
+ return KGlobal::charsets()->codecForName( "utf-8" );
}
TemplateParser::TemplateParser( const KMime::Message::Ptr &amsg, const Mode amode ) :
@@ -1031,16 +1037,9 @@ void TemplateParser::addProcessedBodyToMessage( const QString &body )
if ( ac.attachments().empty() || mMode != Forward ) {
mMsg->contentType()->clear(); // to get rid of old boundary
mMsg->contentType()->setMimeType( "text/plain" );
- QByteArray charset = selectCharset( m_charsets, body );
- QByteArray encodedBody;
- QTextCodec* codec = KGlobal::charsets()->codecForName( charset );
- if( codec ) {
- encodedBody = codec->fromUnicode( body );
- } else {
- encodedBody = body.toUtf8();
- charset = "utf-8";
- }
- mMsg->contentType()->setCharset( charset );
+ QTextCodec* codec = selectCharset( m_charsets, body );
+ const QByteArray encodedBody = codec->fromUnicode( body );
+ mMsg->contentType()->setCharset( codec->name() );
mMsg->setBody( encodedBody );
mMsg->assemble();
}
diff --git a/wizards/groupwarewizard.desktop b/wizards/groupwarewizard.desktop
index c7e9c37..4326008 100644
--- a/wizards/groupwarewizard.desktop
+++ b/wizards/groupwarewizard.desktop
@@ -50,6 +50,7 @@ Name[sr@ijekavianlatin]=KDE‑ov čarobnjak za grupver
Name[sr@latin]=KDE‑ov čarobnjak za grupver
Name[sv]=KDE-grupprogramguide
Name[tr]=Grup Çalışması (Groupware) Sihirbazı
+Name[ug]=KDE گۇرۇپپا دېتالى يېتەكچىسى
Name[uk]=Майстер групової роботи для KDE
Name[x-test]=xxKDE Groupware Wizardxx
Name[zh_CN]=KDE 群件向导
/space/work/OBS/kdf/kdepim4