cinnamon: added gnome-3.8 patches from Arch.
This commit is contained in:
parent
7d4b36df8f
commit
9d201f64fd
|
@ -0,0 +1,20 @@
|
|||
diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon2d.session linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon2d.session
|
||||
--- linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon2d.session 2013-04-15 15:55:01.000000000 +0200
|
||||
+++ linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon2d.session 2013-04-25 01:30:35.435650613 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
[GNOME Session]
|
||||
Name=Cinnamon (Software Rendering)
|
||||
-RequiredComponents=cinnamon2d;gnome-settings-daemon;
|
||||
+RequiredComponents=cinnamon2d;gnome-settings-daemon;gnome-fallback-media-keys-helper;gnome-fallback-mount-helper;
|
||||
DesktopName=GNOME
|
||||
|
||||
diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon.session linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon.session
|
||||
--- linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon.session 2013-04-15 15:55:01.000000000 +0200
|
||||
+++ linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon.session 2013-04-25 01:30:33.645607769 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
[GNOME Session]
|
||||
Name=Cinnamon
|
||||
-RequiredComponents=cinnamon;gnome-settings-daemon;
|
||||
+RequiredComponents=cinnamon;gnome-settings-daemon;gnome-fallback-media-keys-helper;gnome-fallback-mount-helper;
|
||||
DesktopName=GNOME
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
diff -Naur cinnamon-1.7.1.orig/files/usr/bin/cinnamon-settings cinnamon-1.7.1/files/usr/bin/cinnamon-settings
|
||||
--- cinnamon-1.7.1.orig/files/usr/bin/cinnamon-settings 2013-02-21 17:23:45.000000000 +0100
|
||||
+++ cinnamon-1.7.1/files/usr/bin/cinnamon-settings 2013-03-03 03:03:24.151209998 +0100
|
||||
@@ -7,7 +7,7 @@
|
||||
if os.path.exists("/usr/lib/cinnamon-settings/modules/cs_%s.py" % module):
|
||||
print "Python module"
|
||||
os.execvp("/usr/lib/cinnamon-settings/cinnamon-settings.py", ("",) + tuple(sys.argv[1:]))
|
||||
- elif os.path.exists("/usr/bin/cinnamon-control-center"):
|
||||
+ elif os.path.exists("/usr/lib/cinnamon-control-center-1/panels"):
|
||||
print "Unknown module %s, using cinnamon-control-center" % module
|
||||
os.execvp("/usr/lib/cinnamon-settings/cinnamon-settings.py", ("",) + tuple(sys.argv[1:]))
|
||||
elif os.path.exists("/usr/bin/gnome-control-center"):
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,35 @@
|
|||
diff -Naur linuxmint-Cinnamon-a464dc9.orig/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js linuxmint-Cinnamon-a464dc9/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js
|
||||
--- linuxmint-Cinnamon-a464dc9.orig/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js 2013-04-30 18:01:56.000000000 +0200
|
||||
+++ linuxmint-Cinnamon-a464dc9/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js 2013-05-02 19:32:12.934254811 +0200
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
/* constants */
|
||||
const DimSettingsSchema = "org.gnome.settings-daemon.plugins.power";
|
||||
-const DimSettingsAc = "idle-dim-ac";
|
||||
-const DimSettingsBattery = "idle-dim-battery";
|
||||
+const DimSettings = "idle-dim";
|
||||
const PowerBusName = 'org.gnome.SettingsDaemon';
|
||||
const PowerObjectPath = '/org/gnome/SettingsDaemon/Power';
|
||||
|
||||
@@ -116,10 +115,8 @@
|
||||
|
||||
this._settingsMenu = new PopupMenu.PopupSubMenuMenuItem(_("Dimming settings"));
|
||||
|
||||
- let dimSwitchAc = this._buildItem(_("Dim screen on AC power"), DimSettingsSchema, DimSettingsAc);
|
||||
- this._settingsMenu.menu.addMenuItem(dimSwitchAc);
|
||||
- let dimSwitchBattery = this._buildItem(_("Dim screen on battery"), DimSettingsSchema, DimSettingsBattery);
|
||||
- this._settingsMenu.menu.addMenuItem(dimSwitchBattery);
|
||||
+ let dimSwitch = this._buildItem(_("Dim screen"), DimSettingsSchema, DimSettings);
|
||||
+ this._settingsMenu.menu.addMenuItem(dimSwitch);
|
||||
|
||||
//initial update.
|
||||
//We have to wait until dbus calls back to decide whether to display brightness controls.
|
||||
@@ -145,7 +142,7 @@
|
||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
}
|
||||
|
||||
- this.menu.addSettingsAction(_("Settings"), "screen");
|
||||
+ this.menu.addSettingsAction(_("Settings"), "screensaver");
|
||||
}));
|
||||
}
|
||||
catch (e) {
|
|
@ -0,0 +1,142 @@
|
|||
diff --git a/applet.js b/applet.js
|
||||
--- 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 GnomeDesktop = imports.gi.GnomeDesktop;
|
||||
const Main = imports.ui.main;
|
||||
const PopupMenu = imports.ui.popupMenu;
|
||||
const Util = imports.misc.util;
|
||||
@@ -15,11 +16,12 @@
|
||||
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);
|
||||
@@ -28,7 +30,7 @@
|
||||
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,18 +56,18 @@
|
||||
this._layoutItems = [ ];
|
||||
|
||||
this._showFlags = global.settings.get_boolean("keyboard-applet-use-flags");
|
||||
- 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 GnomeDesktop.XkbInfo();
|
||||
+ this._ipsettings = new Gio.Settings({ schema: 'org.gnome.desktop.input-sources' });
|
||||
+ this._ipsettings.connect('changed::sources', Lang.bind(this, this._syncConfig));
|
||||
+ this._ipsettings.connect('changed::current', Lang.bind(this, this._syncGroup));
|
||||
global.settings.connect('changed::keyboard-applet-use-flags', Lang.bind(this, this._reload_settings));
|
||||
- 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();
|
||||
@@ -98,7 +100,6 @@
|
||||
},
|
||||
|
||||
_reload_settings: function() {
|
||||
- this._showFlags = global.settings.get_boolean("keyboard-applet-use-flags");
|
||||
this._syncConfig();
|
||||
},
|
||||
|
||||
@@ -127,8 +128,8 @@
|
||||
_syncConfig: function() {
|
||||
this._showFlags = global.settings.get_boolean("keyboard-applet-use-flags");
|
||||
|
||||
- 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();
|
||||
@@ -141,25 +142,29 @@
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -167,17 +172,17 @@
|
||||
},
|
||||
|
||||
_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);
|
|
@ -0,0 +1,31 @@
|
|||
diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py linuxmint-Cinnamon-b41bad0/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py
|
||||
--- linuxmint-Cinnamon-b41bad0.orig/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py 2013-04-15 15:55:01.000000000 +0200
|
||||
+++ linuxmint-Cinnamon-b41bad0/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py 2013-04-24 21:19:49.262020614 +0200
|
||||
@@ -43,8 +43,8 @@
|
||||
# Cinnamon stuff
|
||||
[_("Toggle Scale"), "org.gnome.desktop.wm.keybindings", "switch-to-workspace-down", True, "cinnamon"],
|
||||
[_("Toggle Expo"), "org.gnome.desktop.wm.keybindings", "switch-to-workspace-up", True, "cinnamon"],
|
||||
- [_("Cycle through open windows"), "org.gnome.desktop.wm.keybindings", "switch-windows", True, "cinnamon"],
|
||||
- [_("Cycle backwards though open windows"), "org.gnome.desktop.wm.keybindings", "switch-windows-backward", True, "cinnamon"],
|
||||
+ [_("Cycle through open windows"), "org.gnome.desktop.wm.keybindings", "switch-applications", True, "cinnamon"],
|
||||
+ [_("Cycle backwards though open windows"), "org.gnome.desktop.wm.keybindings", "switch-applications-backward", True, "cinnamon"],
|
||||
[_("Run dialog (must restart Cinnamon)"), "org.gnome.desktop.wm.keybindings", "panel-run-dialog", True, "cinnamon"],
|
||||
[_("Menu button (must restart Cinnamon)"), "org.cinnamon.muffin", "overlay-key", False, "cinnamon"],
|
||||
|
||||
diff -Naur linuxmint-Cinnamon-b41bad0.orig/js/ui/windowManager.js linuxmint-Cinnamon-b41bad0/js/ui/windowManager.js
|
||||
--- linuxmint-Cinnamon-b41bad0.orig/js/ui/windowManager.js 2013-04-15 15:55:01.000000000 +0200
|
||||
+++ linuxmint-Cinnamon-b41bad0/js/ui/windowManager.js 2013-04-24 21:21:22.447677094 +0200
|
||||
@@ -131,11 +131,11 @@
|
||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||
Meta.keybindings_set_custom_handler('switch-to-workspace-down',
|
||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||
- Meta.keybindings_set_custom_handler('switch-windows',
|
||||
+ Meta.keybindings_set_custom_handler('switch-applications',
|
||||
Lang.bind(this, this._startAppSwitcher));
|
||||
Meta.keybindings_set_custom_handler('switch-group',
|
||||
Lang.bind(this, this._startAppSwitcher));
|
||||
- Meta.keybindings_set_custom_handler('switch-windows-backward',
|
||||
+ Meta.keybindings_set_custom_handler('switch-applications-backward',
|
||||
Lang.bind(this, this._startAppSwitcher));
|
||||
Meta.keybindings_set_custom_handler('switch-group-backward',
|
||||
Lang.bind(this, this._startAppSwitcher));
|
|
@ -1,7 +1,8 @@
|
|||
# Template file for 'cinnamon'
|
||||
pkgname=cinnamon
|
||||
version=1.8.8
|
||||
revision=1
|
||||
revision=2
|
||||
patch_args="-Np1"
|
||||
short_desc="The Cinnamon desktop (gnome-shell fork)"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
license="GPL-2"
|
||||
|
@ -47,15 +48,6 @@ pre_configure() {
|
|||
sed -i -e "s|${_cur}|${_new}|g" \
|
||||
files/usr/share/gnome-session/sessions/cinnamon.session
|
||||
./autogen.sh
|
||||
|
||||
# Workaround for 'Unknown attribute IN (Gtk.ShadowType)' in
|
||||
# cinnamon-settings.
|
||||
sed -i -e "s|Gtk.ShadowType.IN|Gtk.ShadowType.NONE|g" \
|
||||
files/usr/lib/cinnamon-settings/cinnamon-settings.py
|
||||
# Workaround for 'Unknown attribute MODIFIER_TAP in
|
||||
# Gtk.CellRendererAccelMode in cinnamon-settings.
|
||||
sed -i -e "s|Gtk.CellRendererAccelMode.MODIFIER_TAP|Gtk.CellRendererAccelMode.GTK|g" \
|
||||
files/usr/lib/cinnamon-settings/cinnamon-settings.py
|
||||
}
|
||||
|
||||
cinnamon_package() {
|
||||
|
|
Loading…
Reference in New Issue