[cinnamon] add nm-applet to required components
leigh123linux
leigh123linux at fedoraproject.org
Thu Oct 17 16:15:06 UTC 2013
commit 055dbf6886ca084627ff496d4d22b1b64f055dbb
Author: leigh123linux <leigh123linux at googlemail.com>
Date: Thu Oct 17 17:15:00 2013 +0100
add nm-applet to required components
autostart_nemo.patch | 4 +-
cinnamon.spec | 5 +
git_rollup_fixes.patch | 267 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 274 insertions(+), 2 deletions(-)
---
diff --git a/autostart_nemo.patch b/autostart_nemo.patch
index f98eda6..9949612 100644
--- a/autostart_nemo.patch
+++ b/autostart_nemo.patch
@@ -4,7 +4,7 @@
[Cinnamon Session]
Name=Cinnamon
-RequiredComponents=cinnamon;cinnamon-settings-daemon;
-+RequiredComponents=cinnamon;cinnamon-settings-daemon;nemo-autostart;
++RequiredComponents=cinnamon;cinnamon-settings-daemon;nemo-autostart;nm-applet;
DesktopName=GNOME
--- a/files/usr/share/cinnamon-session/sessions/cinnamon2d.session
@@ -13,6 +13,6 @@
[Cinnamon Session]
Name=Cinnamon (Software Rendering)
-RequiredComponents=cinnamon2d;cinnamon-settings-daemon;
-+RequiredComponents=cinnamon2d;cinnamon-settings-daemon;nemo-autostart;
++RequiredComponents=cinnamon2d;cinnamon-settings-daemon;nemo-autostart;nm-applet;
DesktopName=GNOME
diff --git a/cinnamon.spec b/cinnamon.spec
index 3298edf..b67902d 100644
--- a/cinnamon.spec
+++ b/cinnamon.spec
@@ -22,6 +22,8 @@ Patch3: cinnamon-settings-apps.patch
Patch4: keyboard_applet.patch
Patch5: input_keybindings.patch
Patch6: bluetooth.patch
+# upstream commits
+Patch7: git_rollup_fixes.patch
%global clutter_version 1.12.2
%global cjs_version 1.9.1
@@ -142,6 +144,7 @@ The emphasis is put on making users feel at home and providing
%if 0%{?fedora} < 20
%patch6 -p1
%endif
+%patch7 -p1
NOCONFIGURE=1 ./autogen.sh
%build
@@ -220,6 +223,8 @@ fi
%changelog
* Thu Oct 10 2013 Leigh Scott <leigh123linux at googlemail.com> - 2.0.2-2
- add policy file for "users and groups" setting
+- add nm-applet to required components
+- add upstream commits
* Wed Oct 09 2013 Leigh Scott <leigh123linux at googlemail.com> - 2.0.2-1
- update to 2.0.2
diff --git a/git_rollup_fixes.patch b/git_rollup_fixes.patch
new file mode 100644
index 0000000..6558325
--- /dev/null
+++ b/git_rollup_fixes.patch
@@ -0,0 +1,267 @@
+diff --git a/files/usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py b/files/usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py
+index 18f9764..22bbaa0 100755
+--- a/files/usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py
++++ b/files/usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py
+@@ -3,6 +3,9 @@
+ import sys
+ import os
+ import json
++import subprocess
++from gi.repository import GLib
++from optparse import OptionParser
+ try:
+ import polib
+ except:
+@@ -15,21 +18,54 @@ except:
+ """
+ quit()
+
++home = os.path.expanduser("~")
++locale_inst = '%s/.local/share/locale' % home
++
++
++def remove_empty_folders(path):
++ if not os.path.isdir(path):
++ return
++
++ # remove empty subfolders
++ files = os.listdir(path)
++ if len(files):
++ for f in files:
++ fullpath = os.path.join(path, f)
++ if os.path.isdir(fullpath):
++ remove_empty_folders(fullpath)
++
++ # if folder empty, delete it
++ files = os.listdir(path)
++ if len(files) == 0:
++ print "Removing empty folder:", path
++ os.rmdir(path)
++
+
+ class Main:
+ def __init__(self):
+- if (len(sys.argv) < 2 or len(sys.argv) > 3) or \
+- (len(sys.argv) == 2 and sys.argv[1] == "-js") or \
+- (len(sys.argv) == 3 and sys.argv[1] != "-js"):
+- print """
++
++ usage = """
+ Usage:
+
+- cinnamon-json-makepot [-js] <potfile name>
++ cinnamon-json-makepot -i | -r | [-js] <potfile name>
+
+- -js - Runs xgettext on any javascript files in your directory before
++ -js, --js - Runs xgettext on any javascript files in your directory before
+ scanning the settings-schema.json file. This allows you to generate
+ a .pot file for your entire applet at once.
+
++ ***
++ The following two options should only be run in your applet, desklet, or
++ extension's directory
++ ***
++
++ -i, --install - Compiles and installs any .po files contained in a po folder
++ to the system locale store. Use this option to test your translations
++ locally before uploading to Spices. It will use the applet, desklet,
++ or extension UUID as the translation domain
++
++ -r, --remove - The opposite of install, removes translations from the store.
++ Again, it uses the UUID to find the correct files to remove
++
+ <potfile name> - name of the .pot file to work with. This can be pre-existing,
+ or the name of a new file to use. If you leave off the .pot extension, it will
+ be automatically appended to the file name.
+@@ -49,16 +85,36 @@ class Main:
+ Will create "fr.po" for the French language. A translator can use a utility
+ such as poedit to add translations to this file, or edit the file manually.
+
++ If you get duplicate message definition errors when running msginit, run:
++
++ msguniq myapplet.pot > fixed.pot
++
++ This will combine any duplicate definitions and allow you to then run msginit with
++ fixed.pot.
++
+ .po files can be added to a "po" folder in your applet's directory,
+ and will be compiled and installed into the system when the applet is installed
+ via Cinnamon Settings.
+- """
++ """
++
++ parser = OptionParser(usage=usage)
++ parser.add_option("-j", "--js", action="store_true", dest="js", default=False)
++ parser.add_option("-i", "--install", action="store_true", dest="install", default=False)
++ parser.add_option("-r", "--remove", action="store_true", dest="remove", default=False)
++
++ (options, args) = parser.parse_args()
++
++ if options.install:
++ self.do_install()
++
++ if options.remove:
++ self.do_remove()
++
++ if not args:
++ parser.print_help()
+ quit()
+
+- if len(sys.argv) == 2:
+- self.potname = sys.argv[1]
+- else:
+- self.potname = sys.argv[2]
++ self.potname = args[0]
+
+ if not self.potname.endswith(".pot"):
+ self.potname = self.potname + ".pot"
+@@ -66,7 +122,7 @@ class Main:
+ self.domain = self.potname.replace(".pot", "")
+ self.potpath = os.path.join(os.getcwd(), self.potname)
+
+- if sys.argv[1] == "-js":
++ if options.js:
+ try:
+ import subprocess
+ subprocess.call(["xgettext", "--version"])
+@@ -99,6 +155,51 @@ class Main:
+ print "Extraction complete"
+ quit()
+
++ def get_uuid(self):
++ try:
++ file = open(os.path.join(os.getcwd(), "metadata.json"), 'r')
++ raw_meta = file.read()
++ file.close()
++ md = json.loads(raw_meta)
++ return md["uuid"]
++ except Exception, detail:
++ print "Failed to get UUID - missing, corrupt, or incomplete metadata.json file"
++ print detail
++ quit()
++
++ def do_install(self):
++ podir = os.path.join(os.getcwd(), "po")
++ done_one = False
++ for root, subFolders, files in os.walk(podir, topdown=False):
++ for file in files:
++ parts = os.path.splitext(file)
++ if parts[1] == '.po':
++ this_locale_dir = os.path.join(locale_inst, parts[0], 'LC_MESSAGES')
++ GLib.mkdir_with_parents(this_locale_dir, 0755)
++ print "/usr/bin/msgfmt -c %s -o %s" % (os.path.join(root, file), os.path.join(this_locale_dir, '%s.mo' % self.get_uuid()))
++ #subprocess.call(["msgfmt", "-c", os.path.join(root, file), "-o", os.path.join(this_locale_dir, '%s.mo' % self.get_uuid())])
++ done_one = True
++ if done_one:
++ print "Install complete for domain: %s" % self.get_uuid()
++ else:
++ print "Nothing installed"
++ quit()
++
++ def do_remove(self):
++ done_one = False
++ if (os.path.exists(locale_inst)):
++ i19_folders = os.listdir(locale_inst)
++ for i19_folder in i19_folders:
++ if os.path.isfile(os.path.join(locale_inst, i19_folder, 'LC_MESSAGES', "%s.mo" % self.get_uuid())):
++ done_one = True
++ os.remove(os.path.join(locale_inst, i19_folder, 'LC_MESSAGES', "%s.mo" % self.get_uuid()))
++ remove_empty_folders(os.path.join(locale_inst, i19_folder))
++ if done_one:
++ print "Removal complete for domain: %s" % self.get_uuid()
++ else:
++ print "Nothing to remove"
++ quit()
++
+ def scan_dirs(self):
+ for root, subFolders, files in os.walk(os.getcwd(), topdown=False):
+ for file in files:
+diff --git a/files/usr/lib/cinnamon-settings/cinnamon-settings.py b/files/usr/lib/cinnamon-settings/cinnamon-settings.py
+index 04665a6..04794c3 100755
+--- a/files/usr/lib/cinnamon-settings/cinnamon-settings.py
++++ b/files/usr/lib/cinnamon-settings/cinnamon-settings.py
+@@ -313,7 +313,12 @@ class MainWindow:
+ widget.set_hexpand(True)
+ widget.set_vexpand(False)
+ css_provider = Gtk.CssProvider()
+- css_provider.load_from_data("GtkIconView {background-color: transparent;}")
++ css_provider.load_from_data("GtkIconView { \
++ background-color: transparent; \
++ } \
++ GtkIconView.view.cell:selected { \
++ background-color: @selected_bg_color; \
++ }")
+ c = widget.get_style_context()
+ c.add_provider(css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+ self.side_view[category["id"]] = widget
+diff --git a/files/usr/lib/cinnamon-settings/modules/cs_mouse.py b/files/usr/lib/cinnamon-settings/modules/cs_mouse.py
+index 2b1c8c2..8648e9a 100644
+--- a/files/usr/lib/cinnamon-settings/modules/cs_mouse.py
++++ b/files/usr/lib/cinnamon-settings/modules/cs_mouse.py
+@@ -120,6 +120,9 @@ class MouseTouchpadSidepage (SidePage):
+ box.add(scroll_method_combo)
+ self.add_widget(box, 1)
+ box = IndentedHBox()
++ box.add(GSettingsCheckButton(_("Enable natural scrolling"), "org.cinnamon.settings-daemon.peripherals.touchpad", "natural-scroll", "org.cinnamon.settings-daemon.peripherals.touchpad/touchpad-enabled"))
++ self.add_widget(box, 1)
++ box = IndentedHBox()
+ box.add(GSettingsCheckButton(_("Enable horizontal scrolling"), "org.cinnamon.settings-daemon.peripherals.touchpad", "horiz-scroll-enabled", "org.cinnamon.settings-daemon.peripherals.touchpad/touchpad-enabled"))
+ self.add_widget(box, 1)
+
+diff --git a/files/usr/share/cinnamon/applets/menu at cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/menu at cinnamon.org/applet.js
+index d79db51..af07c6a 100644
+--- a/files/usr/share/cinnamon/applets/menu at cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/menu at cinnamon.org/applet.js
+@@ -394,7 +394,10 @@ PlaceButton.prototype = {
+ this.actor._delegate = this;
+ this.label = new St.Label({ text: this.button_name, style_class: 'menu-application-button-label' });
+ this.icon = place.iconFactory(APPLICATION_ICON_SIZE);
+- this.addActor(this.icon);
++ if (!this.icon)
++ this.icon = new St.Icon({icon_name: "folder", icon_size: APPLICATION_ICON_SIZE, icon_type: St.IconType.FULLCOLOR});
++ if (this.icon)
++ this.addActor(this.icon);
+ this.addActor(this.label);
+ },
+
+diff --git a/files/usr/share/cinnamon/applets/recent at cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/recent at cinnamon.org/applet.js
+index 56cc620..a17ded8 100644
+--- a/files/usr/share/cinnamon/applets/recent at cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/recent at cinnamon.org/applet.js
+@@ -80,8 +80,8 @@ MyApplet.prototype = {
+ this._display();
+ },
+
+- _launchFile: function(a, b, c) {
+- Gio.app_info_launch_default_for_uri(c, global.create_app_launch_context());
++ _launchFile: function(a, b, c, d) {
++ Gio.app_info_launch_default_for_uri(d, global.create_app_launch_context());
+ },
+
+ _clearAll: function() {
+diff --git a/js/ui/applet.js b/js/ui/applet.js
+index 192c4da..0fe9e8a 100644
+--- a/js/ui/applet.js
++++ b/js/ui/applet.js
+@@ -511,15 +511,16 @@ IconApplet.prototype = {
+
+ if (icon_path){
+ let file = Gio.file_new_for_path(icon_path);
+- let icon_uri = file.get_uri();
+- let square_size = 22;
++ let gicon = new Gio.FileIcon({ file: file });
+ if (this._scaleMode) {
+- square_size = Math.floor(this._panelHeight * COLOR_ICON_HEIGHT_FACTOR);
++ this._applet_icon = new St.Icon({gicon: gicon, icon_size: this._panelHeight * COLOR_ICON_HEIGHT_FACTOR,
++ icon_type: St.IconType.FULLCOLOR, reactive: true, track_hover: true, style_class: 'applet-icon' });
++ } else {
++ this._applet_icon = new St.Icon({gicon: gicon, icon_size: 22, icon_type: St.IconType.FULLCOLOR, reactive: true, track_hover: true, style_class: 'applet-icon' });
+ }
+- this._applet_icon = St.TextureCache.get_default().load_uri_async(icon_uri, square_size, square_size);
+ this._applet_icon_box.child = this._applet_icon;
+ }
+- this.__icon_type = -1;
++ this.__icon_type = St.IconType.FULLCOLOR;
+ this.__icon_name = icon_path;
+ },
+
More information about the scm-commits
mailing list