summaryrefslogtreecommitdiff
path: root/community/cinnamon
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-10-10 01:59:31 -0700
committerroot <root@rshg054.dnsready.net>2013-10-10 01:59:31 -0700
commit361f95d1ff881daf5f87cb14917bd524511abfc5 (patch)
tree80a94568027dded4548d525a8a3ed7621ccf325d /community/cinnamon
parent737832e1bd70820f477143512b5c89a30a6e81d0 (diff)
Thu Oct 10 01:58:46 PDT 2013
Diffstat (limited to 'community/cinnamon')
-rw-r--r--community/cinnamon/PKGBUILD46
-rw-r--r--community/cinnamon/input_keybindings.patch11
-rw-r--r--community/cinnamon/keyboard_applet.patch133
-rw-r--r--community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy20
-rw-r--r--community/cinnamon/remove_GC.patch124
5 files changed, 194 insertions, 140 deletions
diff --git a/community/cinnamon/PKGBUILD b/community/cinnamon/PKGBUILD
index a873998db..d42135311 100644
--- a/community/cinnamon/PKGBUILD
+++ b/community/cinnamon/PKGBUILD
@@ -1,21 +1,21 @@
-# $Id: PKGBUILD 98186 2013-10-07 12:08:20Z jgc $
+# $Id: PKGBUILD 98400 2013-10-09 16:38:23Z faidoc $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: M0Rf30
# Contributor: unifiedlinux
# Contributor: CReimer
pkgname=cinnamon
-pkgver=1.9.2
+pkgver=2.0.2
pkgrel=1
pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64')
url="http://cinnamon.linuxmint.com/"
license=('GPL2')
-depends=('accountsservice' 'caribou' 'clutter-gtk' 'cjs' 'gnome-bluetooth'
- 'gnome-icon-theme' 'gnome-menus' 'cinnamon-settings-daemon' 'cinnamon-session'
- 'gnome-themes-standard' 'gstreamer0.10' 'libgnome-keyring' 'librsvg'
- 'networkmanager' 'muffin' 'pygtk' 'python2-dbus' 'python2-pillow' 'python2-pexpect'
- 'python2-pyinotify' 'python2-lxml' 'webkitgtk' 'gnome-panel' 'python2' 'cinnamon-translations')
+depends=('accountsservice' 'caribou' 'cinnamon-settings-daemon' 'cinnamon-session'
+ 'cinnamon-translations' 'cjs' 'clutter-gtk' 'gconf' 'gnome-icon-theme'
+ 'gnome-menus' 'gnome-themes-standard' 'gstreamer0.10' 'libgnome-keyring'
+ 'librsvg' 'networkmanager' 'muffin' 'pygtk' 'python2-dbus' 'python2-pillow'
+ 'python2-pam' 'python2-pexpect' 'python2-pyinotify' 'python2-lxml' 'webkitgtk')
makedepends=('gnome-common' 'intltool')
optdepends=('cinnamon-control-center: extended configurations for Cinnamon'
'cinnamon-screensaver: lock screen'
@@ -25,13 +25,17 @@ optdepends=('cinnamon-control-center: extended configurations for Cinnamon'
options=('!libtool' '!emptydirs')
install=${pkgname}.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/archive/$pkgver.tar.gz"
- "remove_GC.patch"
"fix-control-center-check.patch"
- "background.patch")
-sha256sums=('0abaa8da02c4d626084aa482adc551af154796c4c35faaebebdac896ce72aa6d'
- '3d362efd15f8cfeca1713f5bcf88d4be787b39d7c7f24b73cd13f867af33a680'
+ "background.patch"
+ "keyboard_applet.patch"
+ "input_keybindings.patch"
+ "org.archlinux.pkexec.cinnamon-settings-users.policy")
+sha256sums=('3b7043a603c19d96bf1e5ccaafde24ca507c93ee51e81e8c5c8754457a18a5ac'
'ee5694bdc997ffa35a817f691b15bae13747137d35ec2aecd0da298d7edbe426'
- '373d80cdb23250fbde846ed493ba422672cc42b03a111c2ce044467ee782df7f')
+ '373d80cdb23250fbde846ed493ba422672cc42b03a111c2ce044467ee782df7f'
+ '6acb07393105ddced8a4c3c869a596350d1a7d81a808ca5307d2ad770653a9d3'
+ 'e28c40eb844105154fa6106f5b4de3151a22805b3a7b2f84be9ea6c15cec3de6'
+ '371beac9e55d36f7629d2fc5cb40d6a3e6c0f4aac014f6fefdcd6743b5194b23')
prepare() {
cd ${srcdir}/Cinnamon*
@@ -40,20 +44,26 @@ prepare() {
sed -i 's:/usr/bin/python :/usr/bin/python2 :' files/usr/bin/cinnamon-menu-editor
find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
- # Fix crasher when disconnecting from wifi
- patch -Np1 -i ../remove_GC.patch
-
# Check for the cc-panel path, not for the unneeded binary
patch -Np1 -i ../fix-control-center-check.patch
# Fix missing backgrounds
patch -Np1 -i ../background.patch
+ # Fix keyboard applet
+ patch -Np1 -i ../keyboard_applet.patch
+
+ # Add input keybindings
+ patch -Np1 -i ../input_keybindings.patch
+
# Prefix 'System Settings' with 'Cinnamon' to avoid confusion with gnome-control-center
- sed -i 's/^Name\(.*\)=\(.*\)/Name\1=Cinnamon \2/' files/usr/share/applications/cinnamon-settings.desktop
+ sed -i 's/^Name\(.*\)=\(.*\)/Name\1=Cinnamon \2/' files/usr/share/applications/cinnamon-settings{,-users}.desktop
# fix for the python2 PAM module
sed -i 's:import PAM:import pam:' files/usr/lib/cinnamon-settings/modules/cs_user.py
+
+ # Use pkexec instead of gksu
+ sed -i 's/gksu/pkexec/' files/usr/bin/cinnamon-settings-users
}
build() {
@@ -76,4 +86,8 @@ package() {
# Remove leftover files after patching
find "$pkgdir" -type f -name *.orig | xargs rm
+
+ # Install policy file
+ install -Dm644 "${srcdir}/org.archlinux.pkexec.cinnamon-settings-users.policy" \
+ "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.cinnamon-settings-users.policy"
}
diff --git a/community/cinnamon/input_keybindings.patch b/community/cinnamon/input_keybindings.patch
new file mode 100644
index 000000000..2e7a4cd66
--- /dev/null
+++ b/community/cinnamon/input_keybindings.patch
@@ -0,0 +1,11 @@
+--- a/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
++++ b/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
+@@ -119,6 +119,8 @@ KEYBINDINGS = [
+ [_("Log out"), MEDIA_KEYS_SCHEMA, "logout", False, "system"],
+ [_("Lock screen"), MEDIA_KEYS_SCHEMA, "screensaver", False, "system"],
+ [_("Toggle recording desktop (must restart Cinnamon)"), MUFFIN_KEYBINDINGS_SCHEMA, "toggle-recording", True, "system"],
++ [_("Switch to next source"), MEDIA_KEYS_SCHEMA, "switch-input-source", False, "system"],
++ [_("Switch to previous source"), MEDIA_KEYS_SCHEMA, "switch-input-source-backward", False, "system"],
+
+ # Launchers
+ [_("Launch help browser"), MEDIA_KEYS_SCHEMA, "help", False, "launchers"],
diff --git a/community/cinnamon/keyboard_applet.patch b/community/cinnamon/keyboard_applet.patch
new file mode 100644
index 000000000..29ea489ce
--- /dev/null
+++ b/community/cinnamon/keyboard_applet.patch
@@ -0,0 +1,133 @@
+--- a/files/usr/share/cinnamon/applets/keyboard@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/keyboard@cinnamon.org/applet.js
+@@ -1,9 +1,10 @@
+ const Applet = imports.ui.applet;
+-const Gkbd = imports.gi.Gkbd;
+ const Lang = imports.lang;
+-const Cinnamon = imports.gi.Cinnamon;
++const Gio = imports.gi.Gio;
++const GLib = imports.gi.GLib;
+ const St = imports.gi.St;
+ const Gtk = imports.gi.Gtk;
++const CinnamonDesktop = imports.gi.CinnamonDesktop;
+ const Main = imports.ui.main;
+ const PopupMenu = imports.ui.popupMenu;
+ const Util = imports.misc.util;
+@@ -16,11 +17,12 @@ function LayoutMenuItem() {
+ LayoutMenuItem.prototype = {
+ __proto__: PopupMenu.PopupBaseMenuItem.prototype,
+
+- _init: function(config, id, indicator, long_name) {
++ _init: function(ipsettings, id, index, indicator, long_name) {
+ PopupMenu.PopupBaseMenuItem.prototype._init.call(this);
+
+- this._config = config;
++ this._ipsettings = ipsettings;
+ this._id = id;
++ this._index = index;
+ this.label = new St.Label({ text: long_name });
+ this.indicator = indicator;
+ this.addActor(this.label);
+@@ -29,7 +31,7 @@ LayoutMenuItem.prototype = {
+
+ activate: function(event) {
+ PopupMenu.PopupBaseMenuItem.prototype.activate.call(this);
+- this._config.lock_group(this._id);
++ this._ipsettings.set_value('current', GLib.Variant.new_uint32(this._index));
+ }
+ };
+
+@@ -62,18 +64,18 @@ MyApplet.prototype = {
+ this._syncConfig,
+ null);
+
+- this._config = Gkbd.Configuration.get();
+- this._config.connect('changed', Lang.bind(this, this._syncConfig));
+- this._config.connect('group-changed', Lang.bind(this, this._syncGroup));
++ this._xkbInfo = new CinnamonDesktop.XkbInfo();
++ this._ipsettings = new Gio.Settings({ schema: 'org.cinnamon.desktop.input-sources' });
++ this._ipsettings.connect('changed::sources', Lang.bind(this, this._syncConfig));
++ this._ipsettings.connect('changed::current', Lang.bind(this, this._syncGroup));
+
+- this._config.start_listen();
+
+ this._syncConfig();
+
+ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+ this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
+ Main.overview.hide();
+- Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
++ Util.spawn(['gkbd-keyboard-display', '-l', this._selectedLayout._id]);
+ }));
+ this.menu.addAction(_("Show Character Table"), Lang.bind(this, function() {
+ Main.overview.hide();
+@@ -113,8 +115,8 @@ MyApplet.prototype = {
+ },
+
+ _syncConfig: function() {
+- let groups = this._config.get_group_names();
+- if (groups.length > 1) {
++ let sources = this._ipsettings.get_value('sources');
++ if (sources.n_children() > 1) {
+ this.actor.show();
+ } else {
+ this.menu.close();
+@@ -127,25 +129,30 @@ MyApplet.prototype = {
+ for (let i = 0; i < this._labelActors.length; i++)
+ this._labelActors[i].destroy();
+
+- let short_names = this._adjustGroupNames(this._config.get_short_group_names());
+
+ this._selectedLayout = null;
+ this._layoutItems = [ ];
+ this._labelActors = [ ];
+- for (let i = 0; i < groups.length; i++) {
+- let icon_name = this._config.get_group_name(i);
++ for (let i = 0; i < sources.n_children(); i++) {
++ let [type, id] = sources.get_child_value(i).deep_unpack();
++ let displayName = id;
++ let shortName = id;
++ let xkbLayout = id;
++ if (type == 'xkb') {
++ [_exists, displayName, shortName, xkbLayout, _xkbVariant] = this._xkbInfo.get_layout_info(id);
++ } // TODO: errorhandling, handle 'ibus'
++ let icon_name = xkbLayout; // FIXME: Really?
+ let actor;
+ if (this._showFlags)
+ actor = new St.Icon({ icon_name: icon_name, icon_type: St.IconType.FULLCOLOR, style_class: 'popup-menu-icon' });
+ else
+- actor = new St.Label({ text: short_names[i] });
+- let item = new LayoutMenuItem(this._config, i, actor, groups[i]);
+- item._short_group_name = short_names[i];
++ actor = new St.Label({ text: shortName });
++ let item = new LayoutMenuItem(this._ipsettings, id, i, actor, displayName);
+ item._icon_name = icon_name;
+ this._layoutItems.push(item);
+ this.menu.addMenuItem(item, i);
+
+- let shortLabel = new St.Label({ text: short_names[i] });
++ let shortLabel = new St.Label({ text: shortName });
+ this._labelActors.push(shortLabel);
+ }
+
+@@ -153,17 +160,17 @@ MyApplet.prototype = {
+ },
+
+ _syncGroup: function() {
+- let selected = this._config.get_current_group();
++ let current = this._ipsettings.get_uint('current');
+
+ if (this._selectedLayout) {
+ this._selectedLayout.setShowDot(false);
+ this._selectedLayout = null;
+ }
+
+- let item = this._layoutItems[selected];
++ let item = this._layoutItems[current];
+ item.setShowDot(true);
+
+- let selectedLabel = this._labelActors[selected];
++ let selectedLabel = this._labelActors[current];
+
+ if (this._showFlags) {
+ this.set_applet_icon_name(item._icon_name);
diff --git a/community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy b/community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy
new file mode 100644
index 000000000..4d30ca9f3
--- /dev/null
+++ b/community/cinnamon/org.archlinux.pkexec.cinnamon-settings-users.policy
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <action id="org.archlinux.pkexec.cinnamon-settings-users">
+ <message>Authentication is required to run the Cinnamon Users and Groups</message>
+ <icon_name>system-users</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>
+
diff --git a/community/cinnamon/remove_GC.patch b/community/cinnamon/remove_GC.patch
deleted file mode 100644
index 7bd8e45a6..000000000
--- a/community/cinnamon/remove_GC.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/src/cinnamon-global.c
-+++ b/src/cinnamon-global.c
-@@ -1399,35 +1399,6 @@ cinnamon_global_reexec_self (CinnamonGlo
- g_ptr_array_free (arr, TRUE);
- }
-
--/**
-- * cinnamon_global_gc:
-- * @global: A #CinnamonGlobal
-- *
-- * Start a garbage collection process. For more information, see
-- * https://developer.mozilla.org/En/JS_GC
-- */
--void
--cinnamon_global_gc (CinnamonGlobal *global)
--{
-- JSContext *context = gjs_context_get_native_context (global->js_context);
--
-- JS_GC (context);
--}
--
--/**
-- * cinnamon_global_maybe_gc:
-- * @global: A #CinnamonGlobal
-- *
-- * Start a garbage collection process when it would free up enough memory
-- * to be worth the amount of time it would take
-- * https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_MaybeGC
-- */
--void
--cinnamon_global_maybe_gc (CinnamonGlobal *global)
--{
-- gjs_context_maybe_gc (global->js_context);
--}
--
- static void
- cinnamon_global_on_gc (GjsContext *context,
- CinnamonGlobal *global)
-@@ -1768,13 +1768,6 @@ run_leisure_functions (gpointer data)
- if (global->work_count > 0)
- return FALSE;
-
-- /* Previously we called gjs_maybe_gc(). However, it simply doesn't
-- * trigger often enough. Garbage collection is very fast here, so
-- * let's just aggressively GC. This will help avoid both heap
-- * fragmentation, and the GC kicking in when we don't want it to.
-- */
-- gjs_context_gc (global->js_context);
--
- /* No leisure closures, so we are done */
- if (global->leisure_closures == NULL)
- return FALSE;
---- a/src/cinnamon-global.h
-+++ b/src/cinnamon-global.h
-@@ -88,10 +88,6 @@ void cinnamon_global_set_pointer
- int y);
-
-
--/* JavaScript utilities */
--void cinnamon_global_gc (CinnamonGlobal *global);
--void cinnamon_global_maybe_gc (CinnamonGlobal *global);
--
- typedef struct {
- guint glibc_uordblks;
-
-
-
---- a/js/perf/core.js
-+++ b/js/perf/core.js
-@@ -1,5 +1,7 @@
- // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
-
-+const System = imports.system;
-+
- const Main = imports.ui.main;
- const Scripting = imports.ui.scripting;
-
-@@ -99,7 +101,7 @@ function run() {
- Main.overview.hide();
- yield Scripting.waitLeisure();
-
-- global.gc();
-+ System.gc();
- yield Scripting.sleep(1000);
- Scripting.collectStatistics();
- Scripting.scriptEvent('afterShowHide');
---- a/js/ui/lookingGlass.js
-+++ b/js/ui/lookingGlass.js
-@@ -11,6 +11,7 @@ const St = imports.gi.St;
- const Cinnamon = imports.gi.Cinnamon;
- const Signals = imports.signals;
- const Lang = imports.lang;
-+const System = imports.system;
-
- const History = imports.misc.history;
- const Extension = imports.ui.extension;
-@@ -680,7 +681,7 @@ Memory.prototype = {
-
- this._gcbutton = new St.Button({ label: 'Full GC',
- style_class: 'lg-obj-inspector-button' });
-- this._gcbutton.connect('clicked', Lang.bind(this, function () { global.gc(); this._renderText(); }));
-+ this._gcbutton.connect('clicked', Lang.bind(this, function () { System.gc(); this._renderText(); }));
- this.actor.add(this._gcbutton, { x_align: St.Align.START,
- x_fill: false });
-
---- a/js/ui/lookingGlassDBus.js
-+++ b/js/ui/lookingGlassDBus.js
-@@ -1,5 +1,7 @@
- // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
-
-+const System = imports.system;
-+
- const Gio = imports.gi.Gio;
- const Main = imports.ui.main;
- const Extension = imports.ui.extension;
-@@ -99,7 +101,7 @@ CinnamonLookingGlass.prototype = {
- },
-
- FullGc: function() {
-- global.gc();
-+ System.gc();
- },
-
- Inspect: function(path) {