[SCM] breeze packaging branch, kubuntu_vivid_archive, updated. 4cc5d186e588e41a1400d05a3f26ca1b9777537b

Jonathan Riddell jriddell-guest at moszumanska.debian.org
Fri Jan 9 13:46:15 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/plasma/breeze.git;a=commitdiff;h=6e6ad18

The following commit has been merged in the kubuntu_vivid_archive branch:
commit 6e6ad18f2abe636c0d6bf75d5e94e4cd83e833c3
Author: Harald Sitter <sitter at kde.org>
Date:   Wed Oct 29 11:04:53 2014 +0100

    remove upstream patches
---
 debian/patches/series                  |   1 -
 debian/patches/upstream_gtkbreeze.diff | 238 ---------------------------------
 2 files changed, 239 deletions(-)

diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 648ae1e..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-upstream_gtkbreeze.diff
diff --git a/debian/patches/upstream_gtkbreeze.diff b/debian/patches/upstream_gtkbreeze.diff
deleted file mode 100644
index 382aa34..0000000
--- a/debian/patches/upstream_gtkbreeze.diff
+++ /dev/null
@@ -1,238 +0,0 @@
-Description: add gtkbreeze
- gtkbreeze sets default settings for breeze on first login
-Author: Jonathan Riddell <jriddell at ubuntu.com>
-Origin: upstream, https://git.reviewboard.kde.org/r/120624/
-Bug: https://bugs.kde.org/show_bug.cgi?id=339868
-Forwarded: not-needed, it came from upstream
-Last-Update: 2014-10-17
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt
-index ff891a9..4cb1ba9 100644
---- a/misc/CMakeLists.txt
-+++ b/misc/CMakeLists.txt
-@@ -1,2 +1,3 @@
- add_subdirectory(qtcurvepreset)
- add_subdirectory(kde4breeze)
-+add_subdirectory(gtkbreeze)
-diff --git a/misc/gtkbreeze/CMakeLists.txt b/misc/gtkbreeze/CMakeLists.txt
-new file mode 100644
-index 0000000..2dfc439
---- /dev/null
-+++ b/misc/gtkbreeze/CMakeLists.txt
-@@ -0,0 +1,9 @@
-+find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
-+find_package(KF5 REQUIRED COMPONENTS CoreAddons Config)
-+
-+add_executable(gtkbreeze main.cpp)
-+
-+target_link_libraries(gtkbreeze Qt5::Widgets KF5::CoreAddons KF5::ConfigCore)
-+
-+install(TARGETS gtkbreeze DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin/)
-+install(FILES gtkbreeze.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
-diff --git a/misc/gtkbreeze/gtkbreeze.upd b/misc/gtkbreeze/gtkbreeze.upd
-new file mode 100644
-index 0000000..165308b
---- /dev/null
-+++ b/misc/gtkbreeze/gtkbreeze.upd
-@@ -0,0 +1,2 @@
-+Id=GTKBreeze
-+Script=gtkbreeze
-diff --git a/misc/gtkbreeze/main.cpp b/misc/gtkbreeze/main.cpp
-new file mode 100644
-index 0000000..6d250e4
---- /dev/null
-+++ b/misc/gtkbreeze/main.cpp
-@@ -0,0 +1,192 @@
-+/*
-+ Copyright 2014 Jonathan Riddell <jriddell at ubuntu.com>
-+
-+ This program is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU General Public License as
-+ published by the Free Software Foundation; either version 2 of 
-+ the License, or (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+*/
-+
-+// Wee program to be run at login by kconf_update
-+// checks if gtk theme is set
-+// if not or if it is set to oxygen, update to new theme which matches breeze theme
-+
-+#include <QCoreApplication>
-+#include <QStandardPaths>
-+#include <QDebug>
-+#include <QFile>
-+#include <QLoggingCategory>
-+#include <QSettings>
-+#include <QDir>
-+
-+Q_DECLARE_LOGGING_CATEGORY(GTKBREEZE)
-+Q_LOGGING_CATEGORY(GTKBREEZE, "gtkbreeze")
-+
-+/*
-+ * returns a path to the installed gtk if it can be found
-+ * themeName: gtk theme
-+ * settingsFile: a file installed with the theme to set default options
-+ */
-+QString isGtkThemeInstalled(QString themeName, QString settingsFile)
-+{
-+    foreach (const QString& themesDir, QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "themes", QStandardPaths::LocateDirectory)) {
-+        if (QFile::exists(themesDir + QDir::separator() + themeName + QDir::separator() + settingsFile)) {
-+            return themesDir + "/" + themeName;
-+        }
-+    }
-+    return 0;
-+}
-+
-+/*
-+ * Check if gtk theme is already set to oxygen, if it is then we want to upgrade to the breeze theme
-+ * gtkSettingsFile: filename to use
-+ * settingsKey: ini group to read from
-+ * returns: full path to settings file
-+ */
-+QString isGtkThemeSetToOxygen(QString gtkSettingsFile, QString settingsKey)
-+{
-+    QString gtkSettingsPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first() + QDir::separator() + gtkSettingsFile;
-+    qCDebug(GTKBREEZE) << "looking for" << gtkSettingsPath;
-+    if (QFile::exists(gtkSettingsPath)) {
-+        qCDebug(GTKBREEZE) << "found settings file" << gtkSettingsPath;
-+        QSettings gtkrcSettings(gtkSettingsPath, QSettings::IniFormat);
-+        if (!settingsKey.isNull()) {
-+            gtkrcSettings.beginGroup(settingsKey);
-+        }
-+        if (gtkrcSettings.value("gtk-theme-name") != QStringLiteral("oxygen-gtk")) {
-+            qCDebug(GTKBREEZE) << "gtk settings file " + gtkSettingsFile + " already exists and is not using oxygen, will not change";
-+            return QString();
-+        }
-+    }
-+    return gtkSettingsPath;
-+}
-+
-+/*
-+ * Set gtk2 theme if no theme is set or if oxygen is set and gtk theme is installed
-+ */
-+int setGtk2()
-+{
-+    const QString gtk2Theme = QStringLiteral("Orion"); // Orion looks kindae like breeze
-+    const QString gtk2ThemeSettings = QStringLiteral("gtk-2.0/gtkrc"); // system installed file to check for
-+
-+    const QString gtkThemeDirectory = isGtkThemeInstalled(gtk2Theme, gtk2ThemeSettings);
-+
-+    if (gtkThemeDirectory == 0) {
-+        qCDebug(GTKBREEZE) << "not found, quitting";
-+        return 0;
-+    }
-+    qCDebug(GTKBREEZE) << "found gtktheme: " << gtkThemeDirectory;
-+
-+    QString gtkrc2path = isGtkThemeSetToOxygen(".gtkrc-2.0", QString());
-+    if (gtkrc2path.isEmpty()) {
-+        qCDebug(GTKBREEZE) << "gtkrc2 already exists and is not using oxygen, quitting";
-+        return 0;
-+    }
-+
-+    qCDebug(GTKBREEZE) << "no gtkrc2 file or oxygen being used, setting to new theme";
-+    QFile gtkrc2writer(gtkrc2path);
-+    bool opened = gtkrc2writer.open(QIODevice::WriteOnly | QIODevice::Text);
-+    if (!opened) {
-+        qCWarning(GTKBREEZE) << "failed to open " << gtkrc2path;
-+        return 1;
-+    }
-+    QTextStream out(&gtkrc2writer);
-+    out << QStringLiteral("include \"") << gtkThemeDirectory << QStringLiteral("/gtk-2.0/gtkrc\"
");
-+    out << QStringLiteral("style \"user-font\"
");
-+    out << QStringLiteral("{
");
-+    out << QStringLiteral("    font_name=\"Oxygen-Sans Sans-Book\"
");
-+    out << QStringLiteral("}
");
-+    out << QStringLiteral("widget_class \"*\" style \"user-font\"
");
-+    out << QStringLiteral("gtk-font-name=\"Oxygen-Sans Sans-Book 10\"
"); // matches plasma-workspace:startkde/startkde.cmake
-+    out << QStringLiteral("gtk-theme-name=\"Orion\"
");
-+    out << QStringLiteral("gtk-icon-theme-name=\"oxygen\"
"); // breeze icons don't seem to work with gtk
-+    out << QStringLiteral("gtk-fallback-icon-theme=\"gnome\"
");
-+    out << QStringLiteral("gtk-toolbar-style=GTK_TOOLBAR_ICONS
");
-+    out << QStringLiteral("gtk-menu-images=1
");
-+    out << QStringLiteral("gtk-button-images=1
");
-+    qCDebug(GTKBREEZE) << "gtk2rc written";
-+    return 0;
-+}
-+
-+/*
-+ * Set gtk3 theme if no theme is set or if oxygen is set and gtk theme is installed
-+ */
-+int setGtk3()
-+{
-+    qCDebug(GTKBREEZE) << "setGtk3()";
-+
-+    const QString gtk3Theme = QStringLiteral("Orion"); // Orion looks kindae like breeze
-+    const QString gtk3ThemeSettings = QStringLiteral("gtk-3.0/settings.ini"); // check for installed /usr/share/themes/Orion/gtk-3.0/settings.ini
-+
-+    const QString gtkThemeDirectory = isGtkThemeInstalled(gtk3Theme, gtk3ThemeSettings);
-+    if (gtkThemeDirectory == 0) {
-+        qCDebug(GTKBREEZE) << "not found, quitting";
-+        return 0;
-+    }
-+    qCDebug(GTKBREEZE) << "found gtk3theme:" << gtkThemeDirectory;
-+
-+    QString gtkrc3path = isGtkThemeSetToOxygen(".config/gtk-3.0/settings.ini", "Settings");
-+    if ( gtkrc3path.isEmpty() ) {
-+        qCDebug(GTKBREEZE) << "gtkrc3 already exists and is not using oxygen, quitting";
-+        return 0;
-+    }
-+
-+    qCDebug(GTKBREEZE) << "no gtkrc3 file or oxygen being used, setting to new theme";
-+    QFile gtkrc3writer(gtkrc3path);
-+    bool opened = gtkrc3writer.open(QIODevice::WriteOnly | QIODevice::Text);
-+    if (!opened) {
-+        qCWarning(GTKBREEZE) << "failed to open " << gtkrc3path;
-+        return 1;
-+    }
-+    QTextStream out(&gtkrc3writer);
-+    out << QStringLiteral("[Settings]
");
-+    out << QStringLiteral("gtk-font-name=Oxygen-Sans 10
"); // matches plasma-workspace:startkde/startkde.cmake
-+    out << QStringLiteral("gtk-theme-name=")+gtk3Theme+QStringLiteral("
");
-+    out << QStringLiteral("gtk-icon-theme-name=oxygen
"); // breeze icons don't seem to work with gtk
-+    out << QStringLiteral("gtk-fallback-icon-theme=gnome
");
-+    out << QStringLiteral("gtk-toolbar-style=GTK_TOOLBAR_ICONS
");
-+    out << QStringLiteral("gtk-menu-images=1
");
-+    out << QStringLiteral("gtk-button-images=1
");
-+    qCDebug(GTKBREEZE) << "gtk3rc written";
-+
-+    QString cssFile = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first() +
-+                      QDir::separator() + ".config/gtk-3.0/gtk.css";
-+    QFile gtkcss3writer(cssFile);
-+    opened = gtkcss3writer.open(QIODevice::WriteOnly | QIODevice::Text);
-+    if (!opened) {
-+        qCWarning(GTKBREEZE) << "failed to open " << cssFile;
-+        return 1;
-+    }
-+    QTextStream outcss(&gtkcss3writer);
-+    outcss << QStringLiteral(".window-frame, .window-frame:backdrop {
");
-+    outcss << QStringLiteral("box-shadow: 0 0 0 black;
");
-+    outcss << QStringLiteral("border-style: none;
");
-+    outcss << QStringLiteral("margin: 0;
");
-+    outcss << QStringLiteral("border-radius: 0;
");
-+    outcss << QStringLiteral("}
");
-+    outcss << QStringLiteral(".titlebar {
");
-+    outcss << QStringLiteral("border-radius: 0;
");
-+    outcss << QStringLiteral("}
");
-+    qCDebug(GTKBREEZE) << ".config/gtk-3.0/gtk.css written";
-+    return 0;
-+}
-+
-+int main(/*int argc, char **argv*/)
-+{
-+    QLoggingCategory::setFilterRules(QStringLiteral("gtkbreeze.debug = true"));
-+    qCDebug(GTKBREEZE) << "updateGtk2()";
-+
-+    int result = 0;
-+    result = setGtk2();
-+    result = setGtk3();
-+
-+    return result;
-+}

-- 
breeze packaging



More information about the pkg-kde-commits mailing list