On Wed, Oct 20, 2010 at 03:06:59PM +0200, David Coppa wrote:
> On Wed, 20 Oct 2010, Jacob Meuser wrote:
> 
> > On Tue, Oct 19, 2010 at 11:22:41AM +0200, David Coppa wrote:
> > > Hi all, 
> > > the following diff updates minitube to version 1.2.
> > > 
> > > It should also fix the problem reported by Antti Harri with minitube not
> > > having icons under KDE3.
> > > 
> > > Please test 
> > 
> > works for me, video downloads too, though I don't see the mute icon.
> > using fvwm if that matters.
> 
> Second revision of this diff attached.
> 
> Please try this, it fixes missing icons problem for me.

hmm.  is this because we don't have the icons or because the paths
are hardcoded for /usr instead of /usr/local, or what?

> Cheers, 
> david
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/minitube/Makefile,v
> retrieving revision 1.5
> diff -u -p -r1.5 Makefile
> --- Makefile  26 Aug 2010 21:30:42 -0000      1.5
> +++ Makefile  20 Oct 2010 13:00:02 -0000
> @@ -2,8 +2,7 @@
>  
>  COMMENT =    standalone YouTube.com video browser/player
>  
> -DISTNAME =   minitube-1.1
> -REVISION =   1
> +DISTNAME =   minitube-1.2
>  CATEGORIES = www multimedia
>  
>  HOMEPAGE =   http://flavio.tordini.org/minitube
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/www/minitube/distinfo,v
> retrieving revision 1.2
> diff -u -p -r1.2 distinfo
> --- distinfo  2 Aug 2010 07:23:04 -0000       1.2
> +++ distinfo  20 Oct 2010 13:00:02 -0000
> @@ -1,5 +1,5 @@
> -MD5 (minitube-1.1.tar.gz) = B1hBMiYxSGqLtpV17AX1yg==
> -RMD160 (minitube-1.1.tar.gz) = onwuY7j8B/O6Th2iiGGuV7a7oMs=
> -SHA1 (minitube-1.1.tar.gz) = RTHkIda63h6EIqqAQaEwBbHqXns=
> -SHA256 (minitube-1.1.tar.gz) = E+6kefz032cJK4j3UlILHzmdFHd+skkBiyM1ZnXKYFg=
> -SIZE (minitube-1.1.tar.gz) = 206135
> +MD5 (minitube-1.2.tar.gz) = wOK643zoT6xQWVDtGysfNg==
> +RMD160 (minitube-1.2.tar.gz) = Idf9LzhyR3eqHNW5H+wHzD+heVg=
> +SHA1 (minitube-1.2.tar.gz) = +LHf8cuPJHsSChft8xPzBNryDtw=
> +SHA256 (minitube-1.2.tar.gz) = V7au4U3T5WNI2Pm8HDkg2MhxLkMtAG0TvQgfE5/R24w=
> +SIZE (minitube-1.2.tar.gz) = 231768
> Index: patches/patch-src_MainWindow_cpp
> ===================================================================
> RCS file: /cvs/ports/www/minitube/patches/patch-src_MainWindow_cpp,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-src_MainWindow_cpp
> --- patches/patch-src_MainWindow_cpp  2 Aug 2010 07:23:04 -0000       1.2
> +++ patches/patch-src_MainWindow_cpp  20 Oct 2010 13:00:02 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-src_MainWindow_cpp,v 1.2 2010/08/02 07:23:04 dcoppa Exp $
> ---- src/MainWindow.cpp.orig  Tue Jul 27 00:39:16 2010
> -+++ src/MainWindow.cpp       Thu Jul 29 19:26:37 2010
> -@@ -478,7 +478,9 @@ void MainWindow::visitSite() {
> +--- src/MainWindow.cpp.orig  Mon Oct 11 23:44:46 2010
> ++++ src/MainWindow.cpp       Tue Oct 19 09:34:23 2010
> +@@ -559,7 +559,9 @@ void MainWindow::visitSite() {
>   }
>   
>   void MainWindow::donate() {
> Index: patches/patch-src_iconloader_qticonloader_cpp
> ===================================================================
> RCS file: patches/patch-src_iconloader_qticonloader_cpp
> diff -N patches/patch-src_iconloader_qticonloader_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_iconloader_qticonloader_cpp     20 Oct 2010 13:00:02 
> -0000
> @@ -0,0 +1,164 @@
> +$OpenBSD$
> +
> +Use the gnome icon theme unconditionally: fixes a problem with minitube
> +GUI not having icons.
> +
> +--- src/iconloader/qticonloader.cpp.orig     Mon Oct 11 23:44:46 2010
> ++++ src/iconloader/qticonloader.cpp  Wed Oct 20 14:23:44 2010
> +@@ -104,7 +104,6 @@ Q_GLOBAL_STATIC(QtIconLoaderImplementation, iconLoader
> +     QIcon icon;
> + 
> + #ifdef Q_WS_X11
> +-#if QT_VERSION < 0x040600
> +     QString pngExtension(QLatin1String(".png"));
> +     QList<int> iconSizes;
> +     iconSizes << 16 << 22 << 24 << 32 << 48;
> +@@ -112,9 +111,6 @@ Q_GLOBAL_STATIC(QtIconLoaderImplementation, iconLoader
> +         icon.addPixmap(iconLoaderInstance()->findIcon(size, name));
> +     }
> + #else
> +-    icon = QIcon::fromTheme(name);
> +-#endif
> +-#else
> +         icon = QIcon(QString(":/images/%1.png").arg(name));
> +         if (!icon.isNull()) {
> +             icon.addPixmap(QString(":/images/%1_active.png").arg(name), 
> QIcon::Active);
> +@@ -132,47 +128,6 @@ QtIconLoaderImplementation::QtIconLoaderImplementation
> +     lookupIconTheme();
> + }
> + 
> +-extern "C" {
> +-    struct GConfClient;
> +-    struct GError;
> +-    typedef void (*Ptr_g_type_init)();
> +-    typedef GConfClient* (*Ptr_gconf_client_get_default)();
> +-    typedef char* (*Ptr_gconf_client_get_string)(GConfClient*, const char*, 
> GError **);
> +-    typedef void (*Ptr_g_object_unref)(void *);
> +-    typedef void (*Ptr_g_error_free)(GError *);
> +-    typedef void (*Ptr_g_free)(void*);
> +-    static Ptr_g_type_init p_g_type_init = 0;
> +-    static Ptr_gconf_client_get_default p_gconf_client_get_default = 0;
> +-    static Ptr_gconf_client_get_string p_gconf_client_get_string = 0;
> +-    static Ptr_g_object_unref p_g_object_unref = 0;
> +-    static Ptr_g_error_free p_g_error_free = 0;
> +-    static Ptr_g_free p_g_free = 0;
> +-}
> +-
> +-
> +-static int kdeVersion()
> +-{
> +-    static int version = qgetenv("KDE_SESSION_VERSION").toInt();
> +-    return version;
> +-}
> +-
> +-static QString kdeHome()
> +-{
> +-    static QString kdeHomePath;
> +-    if (kdeHomePath.isEmpty()) {
> +-        kdeHomePath = QFile::decodeName(qgetenv("KDEHOME"));
> +-        if (kdeHomePath.isEmpty()) {
> +-            int kdeSessionVersion = kdeVersion();
> +-            QDir homeDir(QDir::homePath());
> +-            QString kdeConfDir(QLatin1String("/.kde"));
> +-            if (4 == kdeSessionVersion && 
> homeDir.exists(QLatin1String(".kde4")))
> +-                kdeConfDir = QLatin1String("/.kde4");
> +-            kdeHomePath = QDir::homePath() + kdeConfDir;
> +-        }
> +-    }
> +-    return kdeHomePath;
> +-}
> +-
> + void QtIconLoaderImplementation::lookupIconTheme() const
> + {
> +     
> +@@ -183,67 +138,12 @@ void QtIconLoaderImplementation::lookupIconTheme() con
> +     
> +     dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
> +     iconDirs = dataDirs.split(QLatin1Char(':'));
> +-    
> +-    // If we are running GNOME we resolve and use GConf. In all other
> +-    // cases we currently use the KDE icon theme
> +-    
> +-    if (qgetenv("DESKTOP_SESSION") == "gnome" ||
> +-        !qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty()) {
> ++   
> ++    if (themeName.isEmpty())
> ++        themeName = QLatin1String("gnome");
> +         
> +-        if (themeName.isEmpty()) {
> +-            // Resolve glib and gconf
> +-            
> +-            p_g_type_init =              
> (Ptr_g_type_init)QLibrary::resolve(QLatin1String("gobject-2.0"), 0, 
> "g_type_init");
> +-            p_gconf_client_get_default = 
> (Ptr_gconf_client_get_default)QLibrary::resolve(QLatin1String("gconf-2"), 4, 
> "gconf_client_get_default");
> +-            p_gconf_client_get_string =  
> (Ptr_gconf_client_get_string)QLibrary::resolve(QLatin1String("gconf-2"), 4, 
> "gconf_client_get_string");
> +-            p_g_object_unref =           
> (Ptr_g_object_unref)QLibrary::resolve(QLatin1String("gobject-2.0"), 0, 
> "g_object_unref");
> +-            p_g_error_free =             
> (Ptr_g_error_free)QLibrary::resolve(QLatin1String("glib-2.0"), 0, 
> "g_error_free");
> +-            p_g_free =                   
> (Ptr_g_free)QLibrary::resolve(QLatin1String("glib-2.0"), 0, "g_free");
> +-            
> +-            if (p_g_type_init && p_gconf_client_get_default &&
> +-                p_gconf_client_get_string && p_g_object_unref &&
> +-                p_g_error_free && p_g_free) {
> +-                
> +-                p_g_type_init();
> +-                GConfClient* client = p_gconf_client_get_default();
> +-                GError *err = 0;
> +-                
> +-                char *str = p_gconf_client_get_string(client, 
> "/desktop/gnome/interface/icon_theme", &err);
> +-                if (!err) {
> +-                    themeName = QString::fromUtf8(str);
> +-                    p_g_free(str);
> +-                }
> +-                
> +-                p_g_object_unref(client);
> +-                if (err)
> +-                    p_g_error_free (err);
> +-            }
> +-            if (themeName.isEmpty())
> +-                themeName = QLatin1String("gnome");
> +-        }
> +-        
> +-        if (!themeName.isEmpty())
> +-            return;
> +-    }
> +-    
> +-    // KDE (and others)
> +-    if (dataDirs.isEmpty())
> +-        dataDirs = QLatin1String("/usr/local/share/:/usr/share/");
> +-    
> +-    dataDirs += QLatin1Char(':') + kdeHome() + QLatin1String("/share");
> +-    dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
> +-    QStringList kdeDirs = 
> QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':'));
> +-    Q_FOREACH (const QString dirName, kdeDirs)
> +-            dataDirs.append(QLatin1Char(':') + dirName + 
> QLatin1String("/share"));
> +-    iconDirs = dataDirs.split(QLatin1Char(':'));
> +-    
> +-    QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde"));
> +-    QDir dir(fileInfo.canonicalFilePath());
> +-    QString kdeDefault = kdeVersion() >= 4 ? QString::fromLatin1("oxygen") 
> : QString::fromLatin1("crystalsvg");
> +-    QString defaultTheme = fileInfo.exists() ? dir.dirName() : kdeDefault;
> +-    QSettings settings(kdeHome() + 
> QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat);
> +-    settings.beginGroup(QLatin1String("Icons"));
> +-    themeName = settings.value(QLatin1String("Theme"), 
> defaultTheme).toString();
> ++    if (!themeName.isEmpty())
> ++        return;
> + #endif
> + }
> + 
> +@@ -275,17 +175,6 @@ QIconTheme QtIconLoaderImplementation::parseIndexFile(
> + 
> +     }
> + 
> +-    if (kdeVersion() >= 3) {
> +-        QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde"));
> +-        QDir dir(fileInfo.canonicalFilePath());
> +-        QString defaultKDETheme = dir.exists() ? dir.dirName() : 
> kdeVersion() == 3 ?
> +-                                  QString::fromLatin1("crystalsvg") : 
> QString::fromLatin1("oxygen");
> +-        if (!parents.contains(defaultKDETheme) && themeName != 
> defaultKDETheme)
> +-            parents.append(defaultKDETheme);
> +-    } else if (parents.isEmpty() && themeName != QLatin1String("hicolor")) {
> +-        parents.append(QLatin1String("hicolor"));
> +-    }
> +-    
> +     theme = QIconTheme(dirList, parents);
> +     return theme;
> + }
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/www/minitube/pkg/PLIST,v
> retrieving revision 1.2
> diff -u -p -r1.2 PLIST
> --- pkg/PLIST 2 Aug 2010 07:23:04 -0000       1.2
> +++ pkg/PLIST 20 Oct 2010 13:00:02 -0000
> @@ -34,6 +34,7 @@ share/minitube/locale/bg_BG.qm
>  share/minitube/locale/cs_CZ.qm
>  share/minitube/locale/de_DE.qm
>  share/minitube/locale/el_GR.qm
> +share/minitube/locale/en_US.qm
>  share/minitube/locale/es.qm
>  share/minitube/locale/fi_FI.qm
>  share/minitube/locale/fr_FR.qm

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/minitube/Makefile,v
> retrieving revision 1.5
> diff -u -p -r1.5 Makefile
> --- Makefile  26 Aug 2010 21:30:42 -0000      1.5
> +++ Makefile  20 Oct 2010 13:00:02 -0000
> @@ -2,8 +2,7 @@
>  
>  COMMENT =    standalone YouTube.com video browser/player
>  
> -DISTNAME =   minitube-1.1
> -REVISION =   1
> +DISTNAME =   minitube-1.2
>  CATEGORIES = www multimedia
>  
>  HOMEPAGE =   http://flavio.tordini.org/minitube
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/www/minitube/distinfo,v
> retrieving revision 1.2
> diff -u -p -r1.2 distinfo
> --- distinfo  2 Aug 2010 07:23:04 -0000       1.2
> +++ distinfo  20 Oct 2010 13:00:02 -0000
> @@ -1,5 +1,5 @@
> -MD5 (minitube-1.1.tar.gz) = B1hBMiYxSGqLtpV17AX1yg==
> -RMD160 (minitube-1.1.tar.gz) = onwuY7j8B/O6Th2iiGGuV7a7oMs=
> -SHA1 (minitube-1.1.tar.gz) = RTHkIda63h6EIqqAQaEwBbHqXns=
> -SHA256 (minitube-1.1.tar.gz) = E+6kefz032cJK4j3UlILHzmdFHd+skkBiyM1ZnXKYFg=
> -SIZE (minitube-1.1.tar.gz) = 206135
> +MD5 (minitube-1.2.tar.gz) = wOK643zoT6xQWVDtGysfNg==
> +RMD160 (minitube-1.2.tar.gz) = Idf9LzhyR3eqHNW5H+wHzD+heVg=
> +SHA1 (minitube-1.2.tar.gz) = +LHf8cuPJHsSChft8xPzBNryDtw=
> +SHA256 (minitube-1.2.tar.gz) = V7au4U3T5WNI2Pm8HDkg2MhxLkMtAG0TvQgfE5/R24w=
> +SIZE (minitube-1.2.tar.gz) = 231768
> Index: patches/patch-src_MainWindow_cpp
> ===================================================================
> RCS file: /cvs/ports/www/minitube/patches/patch-src_MainWindow_cpp,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-src_MainWindow_cpp
> --- patches/patch-src_MainWindow_cpp  2 Aug 2010 07:23:04 -0000       1.2
> +++ patches/patch-src_MainWindow_cpp  20 Oct 2010 13:00:02 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-src_MainWindow_cpp,v 1.2 2010/08/02 07:23:04 dcoppa Exp $
> ---- src/MainWindow.cpp.orig  Tue Jul 27 00:39:16 2010
> -+++ src/MainWindow.cpp       Thu Jul 29 19:26:37 2010
> -@@ -478,7 +478,9 @@ void MainWindow::visitSite() {
> +--- src/MainWindow.cpp.orig  Mon Oct 11 23:44:46 2010
> ++++ src/MainWindow.cpp       Tue Oct 19 09:34:23 2010
> +@@ -559,7 +559,9 @@ void MainWindow::visitSite() {
>   }
>   
>   void MainWindow::donate() {
> Index: patches/patch-src_iconloader_qticonloader_cpp
> ===================================================================
> RCS file: patches/patch-src_iconloader_qticonloader_cpp
> diff -N patches/patch-src_iconloader_qticonloader_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_iconloader_qticonloader_cpp     20 Oct 2010 13:00:02 
> -0000
> @@ -0,0 +1,164 @@
> +$OpenBSD$
> +
> +Use the gnome icon theme unconditionally: fixes a problem with minitube
> +GUI not having icons.
> +
> +--- src/iconloader/qticonloader.cpp.orig     Mon Oct 11 23:44:46 2010
> ++++ src/iconloader/qticonloader.cpp  Wed Oct 20 14:23:44 2010
> +@@ -104,7 +104,6 @@ Q_GLOBAL_STATIC(QtIconLoaderImplementation, iconLoader
> +     QIcon icon;
> + 
> + #ifdef Q_WS_X11
> +-#if QT_VERSION < 0x040600
> +     QString pngExtension(QLatin1String(".png"));
> +     QList<int> iconSizes;
> +     iconSizes << 16 << 22 << 24 << 32 << 48;
> +@@ -112,9 +111,6 @@ Q_GLOBAL_STATIC(QtIconLoaderImplementation, iconLoader
> +         icon.addPixmap(iconLoaderInstance()->findIcon(size, name));
> +     }
> + #else
> +-    icon = QIcon::fromTheme(name);
> +-#endif
> +-#else
> +         icon = QIcon(QString(":/images/%1.png").arg(name));
> +         if (!icon.isNull()) {
> +             icon.addPixmap(QString(":/images/%1_active.png").arg(name), 
> QIcon::Active);
> +@@ -132,47 +128,6 @@ QtIconLoaderImplementation::QtIconLoaderImplementation
> +     lookupIconTheme();
> + }
> + 
> +-extern "C" {
> +-    struct GConfClient;
> +-    struct GError;
> +-    typedef void (*Ptr_g_type_init)();
> +-    typedef GConfClient* (*Ptr_gconf_client_get_default)();
> +-    typedef char* (*Ptr_gconf_client_get_string)(GConfClient*, const char*, 
> GError **);
> +-    typedef void (*Ptr_g_object_unref)(void *);
> +-    typedef void (*Ptr_g_error_free)(GError *);
> +-    typedef void (*Ptr_g_free)(void*);
> +-    static Ptr_g_type_init p_g_type_init = 0;
> +-    static Ptr_gconf_client_get_default p_gconf_client_get_default = 0;
> +-    static Ptr_gconf_client_get_string p_gconf_client_get_string = 0;
> +-    static Ptr_g_object_unref p_g_object_unref = 0;
> +-    static Ptr_g_error_free p_g_error_free = 0;
> +-    static Ptr_g_free p_g_free = 0;
> +-}
> +-
> +-
> +-static int kdeVersion()
> +-{
> +-    static int version = qgetenv("KDE_SESSION_VERSION").toInt();
> +-    return version;
> +-}
> +-
> +-static QString kdeHome()
> +-{
> +-    static QString kdeHomePath;
> +-    if (kdeHomePath.isEmpty()) {
> +-        kdeHomePath = QFile::decodeName(qgetenv("KDEHOME"));
> +-        if (kdeHomePath.isEmpty()) {
> +-            int kdeSessionVersion = kdeVersion();
> +-            QDir homeDir(QDir::homePath());
> +-            QString kdeConfDir(QLatin1String("/.kde"));
> +-            if (4 == kdeSessionVersion && 
> homeDir.exists(QLatin1String(".kde4")))
> +-                kdeConfDir = QLatin1String("/.kde4");
> +-            kdeHomePath = QDir::homePath() + kdeConfDir;
> +-        }
> +-    }
> +-    return kdeHomePath;
> +-}
> +-
> + void QtIconLoaderImplementation::lookupIconTheme() const
> + {
> +     
> +@@ -183,67 +138,12 @@ void QtIconLoaderImplementation::lookupIconTheme() con
> +     
> +     dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
> +     iconDirs = dataDirs.split(QLatin1Char(':'));
> +-    
> +-    // If we are running GNOME we resolve and use GConf. In all other
> +-    // cases we currently use the KDE icon theme
> +-    
> +-    if (qgetenv("DESKTOP_SESSION") == "gnome" ||
> +-        !qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty()) {
> ++   
> ++    if (themeName.isEmpty())
> ++        themeName = QLatin1String("gnome");
> +         
> +-        if (themeName.isEmpty()) {
> +-            // Resolve glib and gconf
> +-            
> +-            p_g_type_init =              
> (Ptr_g_type_init)QLibrary::resolve(QLatin1String("gobject-2.0"), 0, 
> "g_type_init");
> +-            p_gconf_client_get_default = 
> (Ptr_gconf_client_get_default)QLibrary::resolve(QLatin1String("gconf-2"), 4, 
> "gconf_client_get_default");
> +-            p_gconf_client_get_string =  
> (Ptr_gconf_client_get_string)QLibrary::resolve(QLatin1String("gconf-2"), 4, 
> "gconf_client_get_string");
> +-            p_g_object_unref =           
> (Ptr_g_object_unref)QLibrary::resolve(QLatin1String("gobject-2.0"), 0, 
> "g_object_unref");
> +-            p_g_error_free =             
> (Ptr_g_error_free)QLibrary::resolve(QLatin1String("glib-2.0"), 0, 
> "g_error_free");
> +-            p_g_free =                   
> (Ptr_g_free)QLibrary::resolve(QLatin1String("glib-2.0"), 0, "g_free");
> +-            
> +-            if (p_g_type_init && p_gconf_client_get_default &&
> +-                p_gconf_client_get_string && p_g_object_unref &&
> +-                p_g_error_free && p_g_free) {
> +-                
> +-                p_g_type_init();
> +-                GConfClient* client = p_gconf_client_get_default();
> +-                GError *err = 0;
> +-                
> +-                char *str = p_gconf_client_get_string(client, 
> "/desktop/gnome/interface/icon_theme", &err);
> +-                if (!err) {
> +-                    themeName = QString::fromUtf8(str);
> +-                    p_g_free(str);
> +-                }
> +-                
> +-                p_g_object_unref(client);
> +-                if (err)
> +-                    p_g_error_free (err);
> +-            }
> +-            if (themeName.isEmpty())
> +-                themeName = QLatin1String("gnome");
> +-        }
> +-        
> +-        if (!themeName.isEmpty())
> +-            return;
> +-    }
> +-    
> +-    // KDE (and others)
> +-    if (dataDirs.isEmpty())
> +-        dataDirs = QLatin1String("/usr/local/share/:/usr/share/");
> +-    
> +-    dataDirs += QLatin1Char(':') + kdeHome() + QLatin1String("/share");
> +-    dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
> +-    QStringList kdeDirs = 
> QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':'));
> +-    Q_FOREACH (const QString dirName, kdeDirs)
> +-            dataDirs.append(QLatin1Char(':') + dirName + 
> QLatin1String("/share"));
> +-    iconDirs = dataDirs.split(QLatin1Char(':'));
> +-    
> +-    QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde"));
> +-    QDir dir(fileInfo.canonicalFilePath());
> +-    QString kdeDefault = kdeVersion() >= 4 ? QString::fromLatin1("oxygen") 
> : QString::fromLatin1("crystalsvg");
> +-    QString defaultTheme = fileInfo.exists() ? dir.dirName() : kdeDefault;
> +-    QSettings settings(kdeHome() + 
> QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat);
> +-    settings.beginGroup(QLatin1String("Icons"));
> +-    themeName = settings.value(QLatin1String("Theme"), 
> defaultTheme).toString();
> ++    if (!themeName.isEmpty())
> ++        return;
> + #endif
> + }
> + 
> +@@ -275,17 +175,6 @@ QIconTheme QtIconLoaderImplementation::parseIndexFile(
> + 
> +     }
> + 
> +-    if (kdeVersion() >= 3) {
> +-        QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde"));
> +-        QDir dir(fileInfo.canonicalFilePath());
> +-        QString defaultKDETheme = dir.exists() ? dir.dirName() : 
> kdeVersion() == 3 ?
> +-                                  QString::fromLatin1("crystalsvg") : 
> QString::fromLatin1("oxygen");
> +-        if (!parents.contains(defaultKDETheme) && themeName != 
> defaultKDETheme)
> +-            parents.append(defaultKDETheme);
> +-    } else if (parents.isEmpty() && themeName != QLatin1String("hicolor")) {
> +-        parents.append(QLatin1String("hicolor"));
> +-    }
> +-    
> +     theme = QIconTheme(dirList, parents);
> +     return theme;
> + }
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/www/minitube/pkg/PLIST,v
> retrieving revision 1.2
> diff -u -p -r1.2 PLIST
> --- pkg/PLIST 2 Aug 2010 07:23:04 -0000       1.2
> +++ pkg/PLIST 20 Oct 2010 13:00:02 -0000
> @@ -34,6 +34,7 @@ share/minitube/locale/bg_BG.qm
>  share/minitube/locale/cs_CZ.qm
>  share/minitube/locale/de_DE.qm
>  share/minitube/locale/el_GR.qm
> +share/minitube/locale/en_US.qm
>  share/minitube/locale/es.qm
>  share/minitube/locale/fi_FI.qm
>  share/minitube/locale/fr_FR.qm


-- 
[email protected]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to