pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/kdepim3 In korganiser use the KTimezone class rat...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a25723306174
branches:  trunk
changeset: 516618:a25723306174
user:      markd <markd%pkgsrc.org@localhost>
date:      Mon Jul 24 12:43:40 2006 +0000

description:
In korganiser use the KTimezone class rather than trying to deal with
timezones itself as that works on more systems.
Bump PKGREVISION

diffstat:

 misc/kdepim3/Makefile         |    3 +-
 misc/kdepim3/distinfo         |    4 +-
 misc/kdepim3/patches/patch-ao |  107 ++++++++++++++++++++++++++++++++++++++++++
 misc/kdepim3/patches/patch-ap |   35 +++++++++++++
 4 files changed, 147 insertions(+), 2 deletions(-)

diffs (177 lines):

diff -r ceeaf3863ac3 -r a25723306174 misc/kdepim3/Makefile
--- a/misc/kdepim3/Makefile     Mon Jul 24 12:35:41 2006 +0000
+++ b/misc/kdepim3/Makefile     Mon Jul 24 12:43:40 2006 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.63 2006/06/01 14:04:00 markd Exp $
+# $NetBSD: Makefile,v 1.64 2006/07/24 12:43:40 markd Exp $
 
 DISTNAME=      kdepim-${_KDE_VERSION}
+PKGREVISION=   1
 CATEGORIES=    misc
 COMMENT=       Personal Information Management tools for the KDE desktop
 
diff -r ceeaf3863ac3 -r a25723306174 misc/kdepim3/distinfo
--- a/misc/kdepim3/distinfo     Mon Jul 24 12:35:41 2006 +0000
+++ b/misc/kdepim3/distinfo     Mon Jul 24 12:43:40 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.44 2006/07/15 21:04:07 markd Exp $
+$NetBSD: distinfo,v 1.45 2006/07/24 12:43:40 markd Exp $
 
 SHA1 (kdepim-3.5.3.tar.bz2) = c957fffefaa73e8be670b2a2d639b82205fe5309
 RMD160 (kdepim-3.5.3.tar.bz2) = fdd951d6c117246f170986d944d3d61c094e9a00
@@ -12,3 +12,5 @@
 SHA1 (patch-al) = 723424b7c39c5e0e0899b340a30e5a3f32c90a6a
 SHA1 (patch-am) = 29066a35ac983764a8cfa9392b9d67df581b35d3
 SHA1 (patch-an) = cb4cacc1e8ad1f3c5e4103149243829047ce94fe
+SHA1 (patch-ao) = f3760617e77fe74d80733613a18905971ee4c5f9
+SHA1 (patch-ap) = be70d56c66e3956a969f6d858947d83082ae2673
diff -r ceeaf3863ac3 -r a25723306174 misc/kdepim3/patches/patch-ao
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/kdepim3/patches/patch-ao     Mon Jul 24 12:43:40 2006 +0000
@@ -0,0 +1,107 @@
+$NetBSD: patch-ao,v 1.1 2006/07/24 12:43:40 markd Exp $
+
+--- korganizer/koprefsdialog.cpp.orig  2005-09-10 20:24:47.000000000 +1200
++++ korganizer/koprefsdialog.cpp
+@@ -75,6 +75,7 @@
+ #include "stdcalendar.h"
+ #include <kdepimmacros.h>
+ 
++#include <ktimezones.h>
+ 
+ KOPrefsDialogMain::KOPrefsDialogMain( QWidget *parent, const char *name )
+   : KPrefsModule( KOPrefs::instance(), parent, name )
+@@ -169,67 +170,25 @@ class KOPrefsDialogTime : public KPrefsM
+       connect( mTimeZoneCombo, SIGNAL( activated( int ) ),
+                SLOT( slotWidChanged() ) );
+ 
+-      FILE *f;
+-      char tempstring[101] = "Unknown";
+-      QString sCurrentlySet(i18n("Unknown"));
++      KTimezones *db;
++      const KTimezone *sCurrentlySet;
+       int nCurrentlySet = 0;
+       QStringList list;
+ 
++      db = new KTimezones();
+       // read the currently set time zone
+-    #if defined(USE_SOLARIS)       // MARCO
+-        char buf[MAXPATHLEN];
+-
+-        snprintf(buf, MAXPATHLEN,
+-                "/bin/fgrep 'TZ=' %s | /bin/head -n 1 | /bin/cut -b 4-",
+-                INITFILE);
+-
+-        if (f = popen(buf, "r"))
+-          {
+-           if (fgets(buf, MAXPATHLEN - 1, f) != NULL)
+-             {
+-               buf[strlen(buf) - 1] = '\0';
+-               sCurrentlySet = QString(buf);
+-             }
+-           pclose(f);
+-          }
+-    #else
+-      if((f = fopen("/etc/timezone", "r")) != NULL) {
+-        // get the currently set timezone
+-        fgets(tempstring, 100, f);
+-        tempstring[strlen(tempstring) - 1] = '\0';
+-        sCurrentlySet = QString(tempstring);
+-        fclose(f);
+-      }
+-    #endif // !USE_SOLARIS
++      sCurrentlySet = db->local();
+ 
+       mTimeZoneCombo->insertItem(i18n("[No selection]"));
+ 
+       // Read all system time zones
+-    #if defined(USE_SOLARIS)       // MARCO
+-        snprintf(buf, MAXPATHLEN,
+-               "/bin/find %s \\( -name src -prune \\) -o -type f -print | /bin/cut -b %d-",
+-               ZONEINFODIR, strlen(ZONEINFODIR) + 2);
+-
+-        if (f = popen(buf, "r"))
+-          {
+-           while(fgets(buf, MAXPATHLEN - 1, f) != NULL)
+-             {
+-               buf[strlen(buf) - 1] = '\0';
+-               list.append(buf);
+-             }
+-           pclose(f);
+-          }
+-
+-    #else
+-      f = popen("grep -e  ^[^#] /usr/share/zoneinfo/zone.tab | cut -f 3","r");
+-      if (!f) return;
+-      while(fgets(tempstring, 100, f) != NULL) {
+-        tempstring[strlen(tempstring)-1] = '\0';
+-        list.append(i18n(tempstring));
+-        tzonenames << tempstring;
++      const KTimezones::ZoneMap zones = db->allZones();
++      for (KTimezones::ZoneMap::ConstIterator it = zones.begin(); it != zones.end(); ++it)
++      {
++        const KTimezone *zone = it.data();
++        list.append(zone->name());
++        tzonenames << zone->name();
+       }
+-      pclose(f);
+-    #endif // !USE_SOLARIS
+       list.sort();
+ 
+       mTimeZoneCombo->insertStringList(list);
+@@ -237,7 +196,7 @@ class KOPrefsDialogTime : public KPrefsM
+         // find the currently set time zone and select it
+       for ( int i = 0; i < mTimeZoneCombo->count(); ++i )
+         {
+-          if (mTimeZoneCombo->text(i) == sCurrentlySet)
++          if (mTimeZoneCombo->text(i) == sCurrentlySet->name())
+             {
+              nCurrentlySet = i;
+              break;
+@@ -246,6 +205,7 @@ class KOPrefsDialogTime : public KPrefsM
+ 
+       mTimeZoneCombo->setCurrentItem(nCurrentlySet);
+       QWhatsThis::add( mTimeZoneCombo, whatsThis );
++      delete db;
+ 
+       // holiday region selection
+       QHBox *holidayRegBox = new QHBox( topFrame );
diff -r ceeaf3863ac3 -r a25723306174 misc/kdepim3/patches/patch-ap
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/kdepim3/patches/patch-ap     Mon Jul 24 12:43:40 2006 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-ap,v 1.1 2006/07/24 12:43:40 markd Exp $
+
+--- korganizer/koprefs.cpp.orig        2006-01-20 05:56:37.000000000 +1300
++++ korganizer/koprefs.cpp
+@@ -41,6 +41,7 @@
+ #include <kemailsettings.h>
+ #include <kstaticdeleter.h>
+ #include <kstringhandler.h>
++#include <ktimezones.h>
+ 
+ #include "koprefs.h"
+ #include <libkpimidentities/identitymanager.h>
+@@ -145,17 +146,12 @@ void KOPrefs::fillMailDefaults()
+ void KOPrefs::setTimeZoneIdDefault()
+ {
+   QString zone;
++  KTimezones *db;
+ 
+-  char zonefilebuf[100];
+-  int len = readlink("/etc/localtime",zonefilebuf,100);
+-  if (len > 0 && len < 100) {
+-    zonefilebuf[len] = '\0';
+-    zone = zonefilebuf;
+-    zone = zone.mid(zone.find("zoneinfo/") + 9);
+-  } else {
+-    tzset();
+-    zone = tzname[0];
+-  }
++  db = new KTimezones();
++
++  zone = (db->local())->name();
++  delete db;
+ 
+   kdDebug () << "----- time zone: " << zone << endl;
+ 



Home | Main Index | Thread Index | Old Index