commit cinnamon for openSUSE:Factory
Hello community, here is the log from the commit of package cinnamon for openSUSE:Factory checked in at 2016-11-28 15:06:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cinnamon (Old) and /work/SRC/openSUSE:Factory/.cinnamon.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "cinnamon" Changes: -------- --- /work/SRC/openSUSE:Factory/cinnamon/cinnamon.changes 2016-11-15 18:00:55.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.cinnamon.new/cinnamon.changes 2016-11-28 15:06:50.000000000 +0100 @@ -1,0 +2,33 @@ +Thu Nov 24 10:25:32 UTC 2016 - sor.alexei@meowr.ru + +- Update to version 3.2.2: + * build: Make AX_ macros optional. + * [Xlet settings] Fix for icon choosers stuck dialogues. + * [cinnamon-json-makepot] Add support for "title" key. + * Ensure a default icon size of 16px if the icon-size is not set + in the indicator icon theme class. + * [workspace-switcher] Fix buttons' size Buttons didn't get + proper height (or width in vertical mode) if the auto-scale + font setting was not enabled. + * Restore the ability to theme the menu applet menu separately + from other menus. + * cs_effects: Disable menu animations when turning of window + effects. + * [applet.js] Re add ability to display a separator on applets + context menus. + * [applet.js] Add a mechanism to highlight applets with open + menus. + * [menu-applet] Fix keynav issues with TAB and right. + * Use the Gio library for establish the file permissions in + replace of the spawnCommandLine usage. + * panel-launchers: Close the menu before destroying when removing + a launcher. + * [Xlet settings] Add a translation mechanism to xlets settings + windows. + * cs_backgrounds.py: Fix thumb generation on Debian Jessie. + * [sound-applet] Remove a show percentage label for slider option. + * theme: Fix theming of the workspace switcher. +- Rebase cinnamon-no-gksu-requirement.patch. +- Remove cinnamon-optional-ax-macros.patch: fixed upstream. + +------------------------------------------------------------------- Old: ---- cinnamon-3.2.1.tar.gz cinnamon-optional-ax-macros.patch New: ---- cinnamon-3.2.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cinnamon.spec ++++++ --- /var/tmp/diff_new_pack.nKAE7D/_old 2016-11-28 15:06:52.000000000 +0100 +++ /var/tmp/diff_new_pack.nKAE7D/_new 2016-11-28 15:06:52.000000000 +0100 @@ -21,7 +21,7 @@ %define _name Cinnamon %define _version 3.2.0 Name: cinnamon -Version: 3.2.1 +Version: 3.2.2 Release: 0 Summary: GNU/Linux Desktop featuring a traditional layout License: GPL-2.0+ and LGPL-2.1 @@ -46,8 +46,6 @@ Patch6: %{name}-fix-typelib-false-positive.patch # PATCH-FEATURE-OPENSUSE cinnamon-fallback-icewm.patch sor.alexei@meowr.ru -- Use IceWM as fallback. Patch7: %{name}-fallback-icewm.patch -# PATCH-FIX-UPSTREAM cinnamon-optional-ax-macros.patch -- Make AX_ macros optional (commit 023c17f). -Patch8: %{name}-optional-ax-macros.patch BuildRequires: autoconf BuildRequires: autoconf-archive BuildRequires: automake @@ -184,7 +182,6 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 cp -a %{SOURCE1} . %build ++++++ cinnamon-3.2.1.tar.gz -> cinnamon-3.2.2.tar.gz ++++++ ++++ 2157 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/configure.ac new/Cinnamon-3.2.2/configure.ac --- old/Cinnamon-3.2.1/configure.ac 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/configure.ac 2016-11-23 14:03:02.000000000 +0100 @@ -1,12 +1,12 @@ AC_PREREQ(2.63) -AC_INIT([cinnamon],[3.2.1],[https://github.com/linuxmint/Cinnamon/issues],[cinnamon]) +AC_INIT([cinnamon],[3.2.2],[https://github.com/linuxmint/Cinnamon/issues],[cinnamon]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([src/cinnamon-global.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([config]) -AX_IS_RELEASE([always]) +m4_ifdef([AX_IS_RELEASE], [AX_IS_RELEASE([always])]) AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"]) AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"]) @@ -161,7 +161,8 @@ TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" AC_SUBST(TYPELIBDIR) -AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS]) +m4_ifdef([AX_COMPILER_FLAGS], + [AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])]) AC_ARG_ENABLE(jhbuild-wrapper-script, AS_HELP_STRING([--jhbuild-wrapper-script=yes],[Make "cinnamon" script work for jhbuild]),,enable_jhbuild_wrapper_script=no) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/data/theme/cinnamon.css new/Cinnamon-3.2.2/data/theme/cinnamon.css --- old/Cinnamon-3.2.1/data/theme/cinnamon.css 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/data/theme/cinnamon.css 2016-11-23 14:03:02.000000000 +0100 @@ -1,6 +1,6 @@ /* ################################################################### * Section common with Gnome Shell - * ... contains a few cinnamon specific styles (rare occurrences) + * ... contains a few cinnamon specific styles (rare occurrences) * ###################################################################*/ stage { font-family: sans, sans-serif; @@ -78,10 +78,10 @@ text-align: center; } /* =================================================================== - * Shared button properties + * Shared button properties * ===================================================================*/ .notification-button, .notification-icon-button, -.modal-dialog-button, +.modal-dialog-button, .sound-player-overlay StButton { color: white; border: 1px solid #8b8b8b; @@ -108,7 +108,7 @@ background-gradient-end: rgba(255, 255, 255, 0.2); } /* =================================================================== - * PopupMenu (popupMenu.js) + * PopupMenu (popupMenu.js) * ===================================================================*/ /* .popup-menu-boxpointer and .popup-menu are kept for compatibility with cinnamon version under 3.2. Use .menu in version 3.2 and above */ @@ -382,7 +382,7 @@ .panel-button:active, .panel-button:overview, .panel-button:focus { - + } .panel-button:active > .system-status-icon, .panel-button:checked > .system-status-icon, @@ -398,7 +398,7 @@ icon-size: 1.14em; } /* =================================================================== - * Overview + * Overview * ===================================================================*/ #overview { spacing: 12px; @@ -515,7 +515,7 @@ } /* =================================================================== - * Looking Glass + * Looking Glass * ===================================================================*/ #LookingGlassDialog { background-color: rgba(85,85,85,0.85); @@ -526,7 +526,7 @@ color: #CCCCCC; } /* =================================================================== - * Date applet + * Date applet * ===================================================================*/ .calendar { padding: .4em 1.75em; @@ -868,7 +868,7 @@ padding-top: 15px; spacing: 5px; } -.run-dialog-completion-box { +.run-dialog-completion-box { padding-left: 15px; font-size: 10px; } @@ -1019,7 +1019,7 @@ -boxpointer-gap: 5px; } /* ################################################################### - * Cinnamon Specific Section + * Cinnamon Specific Section * ###################################################################*/ /* =================================================================== * Menu (menu.js) @@ -1105,10 +1105,10 @@ /* This style is used in menu application buttons for applications which were newly installed */ font-weight: bold; } -.menu-application-button-label:ltr { +.menu-application-button-label:ltr { padding-left: 5px; } -.menu-application-button-label:rtl { +.menu-application-button-label:rtl { padding-right: 5px; } .menu-category-button { @@ -1246,14 +1246,14 @@ } .window-list-item-box:active, .window-list-item-box:checked, -.window-list-item-box:focus { +.window-list-item-box:focus { background-gradient-direction: vertical; background-gradient-start: rgba(226,226,226,0.5); background-gradient-end: rgba(122,122,122,0.5); box-shadow: inset 0px 0px 1px 1px rgba(170,170,170,0.5); border-radius: 2px 2px 0px 0px; } -.window-list-item-box:hover { +.window-list-item-box:hover { box-shadow: inset 0px 0px 1px 1px rgba(170,170,170,1.0); border-radius: 2px 2px 0px 0px; } @@ -1339,23 +1339,29 @@ * Workspace Switcher applet (workspaceSwitcher.js) * ===================================================================*/ /* Controls the styling when using the "Simple buttons" option */ -.workspace-switcher { +.panel-top .workspace-switcher, +.panel-bottom .workspace-switcher { padding-left: 3px; padding-right: 3px; } +.panel-left .workspace-switcher +.panel-right .workspace-switcher { + padding-top: 3px; + padding-bottom: 3px; +} + .workspace-button { width: 20px; height: 10px; color: #cccccc; border: 1px; border-color: #a6a6a6; - padding: 2px; + padding-top: 2px; transition-duration: 300; } .workspace-button:outlined { - padding: 1px; background: #cccccc; color: #555555; box-shadow: inset 0px 0px 8px 1px rgba(255,255,255, 0.7); @@ -1493,7 +1499,7 @@ background-image: url("overview-hover.png"); } /* =================================================================== - * Applets (applet.js) + * Applets (applet.js) * ===================================================================*/ .applet-separator { padding: 5px 4px; @@ -1527,9 +1533,9 @@ .applet-box:highlight { background-color: #aa5555; } -.applet-label { +.applet-label { font-weight: bold; - color: #ccc; + color: #ccc; } .applet-box:hover > .applet-label { color: #fff; @@ -1548,10 +1554,10 @@ .applet-box.vertical:hover .applet-icon { } /* =================================================================== - * Desklets (desklet.js) + * Desklets (desklet.js) * ===================================================================*/ -.desklet { - color: #fff; +.desklet { + color: #fff; } .desklet:highlight, .desklet:highlight-with-borders, .desklet:highlight-with-borders-and-header { @@ -1577,7 +1583,7 @@ border-radius-bottomright: 12px; } -.desklet-header { +.desklet-header { border-radius-topleft: 12px; border-radius-topright: 12px; font-size: 10.5pt; @@ -1588,7 +1594,7 @@ padding: 6px; } -.desklet-drag-placeholder { +.desklet-drag-placeholder { border: 2px solid #6daa00; background-color: rgba(109,170, 0, 0.3); } @@ -1635,7 +1641,7 @@ /* =================================================================== - * Clock Desklet (desklet.js) + * Clock Desklet (desklet.js) * ===================================================================*/ .clock-desklet-label { } @@ -1648,7 +1654,7 @@ color: #ffffff; text-shadow: black 5px 5px 5px; font-weight: bold; - font-size: 48pt; + font-size: 48pt; } .expo-workspaces-name-entry { @@ -1663,9 +1669,9 @@ caret-color: rgb(128, 128, 128); caret-size: 1px; width: 250px; - height: 15px; + height: 15px; box-shadow: inset 0px 2px 4px rgba(0,0,0,0.6); - text-align: center; + text-align: center; } .expo-workspaces-name-entry#selected { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/debian/changelog new/Cinnamon-3.2.2/debian/changelog --- old/Cinnamon-3.2.1/debian/changelog 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/debian/changelog 2016-11-23 14:03:02.000000000 +0100 @@ -1,3 +1,61 @@ +cinnamon (3.2.2) serena; urgency=medium + + [ Clement Lefebvre ] + * build: Make AX_ macros optional + + [ Odyseus ] + * [Xlet settings] Fix for icon choosers stuck dialogs + * [cinnamon-json-makepot] Added support for "title" key + + [ lestcape ] + * Ensure a default icon size of 16px if the icon-size is not set in the indicator icon theme class. + + [ Germán Franco ] + * [workspace-switcher] Fix buttons' size Buttons didn't get proper height (or width in vertical mode) if the auto-scale font setting was not enabled. + + [ NikoKrause ] + * [sound-applet] removed ancient code for timeLabel + * uniform names + + [ Stephen Collins ] + * Restore ability to theme the menu applet menu separately from other menus + + [ JosephMcc ] + * cs_effects: Disable menu animations when turning of window effects + + [ Odyseus ] + * [applet.js] Re added ability to display a separator on applets context menus. + * [applet.js] Added a mechanism to highlight applets with open menus. + + [ NikoKrause ] + * [menu-applet] fix keynav issues with TAB and right + + [ lestcape ] + * Use the Gio library for establish the file permissions in replace of the spawnCommandLine usage. + + [ itzexor ] + * panel-launchers: close the menu before destroying when removing launcher + + [ Odyseus ] + * [Xlet settings] Added translation mechanism to xlets settings windows + + [ itzexor ] + * cs_backgrounds.py: fix thumb generation on LMDE2 + + [ NikoKrause ] + * [sound-applet] remove show percentage label for slider option + + [ JosephMcc ] + * theme: Fix theming of the workspace switcher + + [ NikoKrause ] + * typo + + [ Clement Lefebvre ] + * l10n: Update POT file + + -- Clement Lefebvre <root@linuxmint.com> Wed, 23 Nov 2016 13:02:10 +0000 + cinnamon (3.2.1) serena; urgency=medium [ kloun ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js 2016-11-23 14:03:02.000000000 +0100 @@ -142,8 +142,7 @@ let destFile = Gio.file_new_for_path(USER_DESKTOP_PATH+"/"+this._appButton.app.get_id()); try{ file.copy(destFile, 0, null, function(){}); - // Need to find a way to do that using the Gio library, but modifying the access::can-execute attribute on the file object seems unsupported - Util.spawnCommandLine("chmod +x \""+USER_DESKTOP_PATH+"/"+this._appButton.app.get_id()+"\""); + FileUtils.changeModeGFile(destFile, 755); }catch(e){ global.log(e); } @@ -1150,7 +1149,7 @@ this.settings.bind("activate-on-hover", "activateOnHover", this._updateActivateOnHover); this._updateActivateOnHover(); - this.menu.actor.add_style_class_name('menu-background'); + this.menu.setCustomStyleClass('menu-background'); this.menu.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged)); this.settings.bind("menu-icon-custom", "menuIconCustom", this._updateIconAndLabel); @@ -1624,8 +1623,8 @@ whichWay = "right"; if (this._activeContainer === this.applicationsBox) whichWay = "none"; - else if ((this.categoriesBox.get_child_at_index(index))._delegate instanceof RecentCategoryButton && - this.noRecentDocuments) + else if (this._activeContainer === this.categoriesBox && this.noRecentDocuments && + (this.categoriesBox.get_child_at_index(index))._delegate instanceof RecentCategoryButton) whichWay = "none"; break; case Clutter.KEY_Left: @@ -1715,6 +1714,8 @@ if(this.favBoxShow) { this._previousSelectedActor = this.categoriesBox.get_child_at_index(index); item_actor = this.favBoxIter.getFirstVisible(); + } else { + item_actor = this.categoriesBox.get_child_at_index(index); } } else { @@ -1728,9 +1729,14 @@ this._previousSelectedActor = this.categoriesBox.get_child_at_index(index); item_actor = this.favBoxIter.getFirstVisible(); } else { - item_actor = (this._previousVisibleIndex != null) ? - this.appBoxIter.getVisibleItem(this._previousVisibleIndex) : - this.appBoxIter.getFirstVisible(); + if ((this.categoriesBox.get_child_at_index(index))._delegate instanceof RecentCategoryButton && + this.noRecentDocuments) { + item_actor = this.categoriesBox.get_child_at_index(index); + } else { + item_actor = (this._previousVisibleIndex != null) ? + this.appBoxIter.getVisibleItem(this._previousVisibleIndex) : + this.appBoxIter.getFirstVisible(); + } } break; case "top": diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/panel-launchers@cinnamon.org/applet.js new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/panel-launchers@cinnamon.org/applet.js --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/panel-launchers@cinnamon.org/applet.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/panel-launchers@cinnamon.org/applet.js 2016-11-23 14:03:02.000000000 +0100 @@ -95,6 +95,7 @@ }, _onRemoveActivate: function(item, event) { + this.close(); this._launcher.launchersBox.removeLauncher(this._launcher, this._launcher.isCustom()); this._launcher.actor.destroy(); }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js 2016-11-23 14:03:02.000000000 +0100 @@ -35,15 +35,6 @@ const ICON_SIZE = 28; -function _getDigitWidth(actor){ - let context = actor.get_pango_context(); - let themeNode = actor.get_theme_node(); - let font = themeNode.get_font(); - let metrics = context.get_metrics(font, context.get_language()); - let width = metrics.get_approximate_digit_width(); - return width; -} - function ControlButton() { this._init.apply(this, arguments); } @@ -121,19 +112,9 @@ this.addActor(this.icon, {span: 0}); this.addActor(this._slider, {span: -1, expand: true}); - this.label = new St.Label({ text: "" }); - this.label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE); - - this.actor.connect('style-changed', Lang.bind(this, this.onStyleChanged)); - this.connectWithStream(stream); }, - onStyleChanged: function(actor, event) { - let digitWidth = _getDigitWidth(this.actor) / Pango.SCALE; - this.label.set_width(digitWidth * 5); - }, - connectWithStream: function(stream){ if(!stream){ this.actor.hide(); @@ -186,8 +167,6 @@ } this.setValue(value); - this.label.set_text(percentage); - // send data to applet this.emit("values-changed", iconName, percentage); }, @@ -204,16 +183,6 @@ icon = "high"; return this.isMic? "microphone-sensitivity-" + icon : "audio-volume-" + icon; - }, - - _togglePercentageDisplay: function(showPercentage) { - if (!showPercentage) - this.removeActor(this.label); - else { - this.removeActor(this._slider); - this.addActor(this.label, {span: 0}); - this.addActor(this._slider, {span: -1, expand: true}); - } } } @@ -420,8 +389,6 @@ // Position slider this._positionSlider = new Slider.Slider(0, true); - this._currentTimeLabel = new St.Label({text: "0:00"}); - this._songLengthLabel = new St.Label({text: "0:00"}); this._seeking = false; this._positionSlider.connect('drag-begin', Lang.bind(this, function(item) { this._seeking = true; @@ -432,9 +399,7 @@ })); this._positionSlider.connect('value-changed', Lang.bind(this, function(item) { //update the label virtually if we are seeking, else set the value (scroll event) - if(this._seeking) - this._updateTimeLabel(item._value * this._songLength); - else + if(!this._seeking) this._setPosition("slider"); })); this.vertBox.add_actor(this._positionSlider.actor); @@ -537,7 +502,6 @@ let time = this._positionSlider._value * this._songLength; this._wantedSeekValue = Math.round(time * 1000000); this._mediaServerPlayer.SetPositionRemote(this._trackObj, time * 1000000); - this._updateTimeLabel(time); } else if (value == null && this._playerStatus != 'Stopped') { this._updatePositionSlider(false); @@ -728,19 +692,6 @@ else this._positionSlider.setValue(0); } - if(!this._seeking) - this._updateTimeLabel(); - }, - - _updateTimeLabel: function(time){ - if(time === undefined) - time = this._currentTime; - - this._currentTimeLabel.text = this._formatTime(time); - if(this._applet.positionLabelType === "length") - this._songLengthLabel.text = this._formatTime(this._songLength); - else - this._songLengthLabel.text = "-" + this._formatTime(this._songLength - time); }, _runTimerCallback: function() { @@ -788,25 +739,6 @@ this._updateTimer(); }, - _formatTime: function(s) { - let ms = s * 1000; - let msSecs = (1000); - let msMins = (msSecs * 60); - let msHours = (msMins * 60); - let numHours = Math.floor(ms/msHours); - let numMins = Math.floor((ms - (numHours * msHours)) / msMins); - let numSecs = Math.floor((ms - (numHours * msHours) - (numMins * msMins))/ msSecs); - if (numSecs < 10) - numSecs = "0" + numSecs.toString(); - if (numMins < 10 && numHours > 0) - numMins = "0" + numMins.toString(); - if (numHours > 0) - numHours = numHours.toString() + ":"; - else - numHours = ""; - return numHours + numMins.toString() + ":" + numSecs.toString(); - }, - _onDownloadedCover: function() { let cover_path = this._trackCoverFileTmp.get_path(); this._showCover(cover_path); @@ -922,11 +854,6 @@ for(let i in this._players) this._players[i].onSettingsChanged(); }); - this.settings.bind("positionLabelType", "positionLabelType", function(){ - for(let i in this._players) - this._players[i].onSettingsChanged(); - }); - this.settings.bind("showSliderPercentage", "showSliderPercentage", this._showPercentageChanged); this.settings.bind("_knownPlayers", "_knownPlayers"); if (this.hideSystray) this.registerSystrayIcons(); @@ -1350,7 +1277,6 @@ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem); this._outputVolumeSection = new VolumeSlider(this, null, _("Volume"), null); this._outputVolumeSection.connect("values-changed", Lang.bind(this, this._outputValuesChanged)); - this._showPercentageChanged(); this.menu.addMenuItem(this._outputVolumeSection); this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem); @@ -1438,10 +1364,6 @@ this.mute_in_switch.setIconSymbolicName(iconName); }, - _showPercentageChanged: function() { - this._outputVolumeSection._togglePercentageDisplay(this.showSliderPercentage); - }, - _onControlStateChanged: function() { if (this._control.get_state() == Cvc.MixerControlState.READY) { this._readOutput(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json 2016-11-23 14:03:02.000000000 +0100 @@ -15,22 +15,6 @@ "dependency": "playerControl", "indent": true }, - "positionLabelType": { - "type": "combobox", - "default": "length", - "description": "Position label", - "options": { - "Song length": "length", - "Countdown": "countdown" - }, - "dependency": "playerControl", - "indent": true - }, - "showSliderPercentage": { - "type": "switch", - "default": false, - "description": "Show percentage value of the slider" - }, "_knownPlayers": { "type": "generic", "default": ["banshee", "vlc"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js 2016-11-23 14:03:02.000000000 +0100 @@ -185,13 +185,11 @@ this.actor.add_style_pseudo_class('outlined'); } - if (applet._scaleMode) { - if (applet.orientation == St.Side.TOP || applet.orientation == St.Side.BOTTOM) { - this.actor.set_height(applet._panelHeight); - } else { - this.actor.set_height(0.6 * applet._panelHeight); // factors are completely empirical - this.actor.set_width(0.9 * applet._panelHeight); - } + if (applet.orientation == St.Side.TOP || applet.orientation == St.Side.BOTTOM) { + this.actor.set_height(applet._panelHeight); + } else { + this.actor.set_height(0.6 * applet._panelHeight); // factors are completely empirical + this.actor.set_width(0.9 * applet._panelHeight); } if (applet.orientation == St.Side.LEFT || applet.orientation == St.Side.RIGHT) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-json-makepot/cinnamon-json-makepot.py new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-json-makepot/cinnamon-json-makepot.py --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-json-makepot/cinnamon-json-makepot.py 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-json-makepot/cinnamon-json-makepot.py 2016-11-23 14:03:02.000000000 +0100 @@ -217,7 +217,7 @@ def extract_strings(self, data, parent=""): for key in data.keys(): - if key in ("description", "tooltip", "units"): + if key in ("description", "tooltip", "units", "title"): comment = "%s->settings-schema.json->%s->%s" % (self.current_parent_dir, parent, key) self.save_entry(data[key], comment) elif key in "options": diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py 2016-11-23 14:03:02.000000000 +0100 @@ -962,11 +962,11 @@ self.preview.set_from_icon_name(val, Gtk.IconSize.BUTTON) def on_button_pressed(self, widget): - dialog = Gtk.FileChooserDialog(_("Choose an Icon"), - None, - Gtk.FileChooserAction.OPEN, - (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, - Gtk.STOCK_OPEN, Gtk.ResponseType.OK)) + dialog = Gtk.FileChooserDialog(title=_("Choose an Icon"), + action=Gtk.FileChooserAction.OPEN, + transient_for=self.get_toplevel(), + buttons=(_("_Cancel"), Gtk.ResponseType.CANCEL, + _("_Open"), Gtk.ResponseType.OK)) filter_text = Gtk.FileFilter() filter_text.set_name(_("Image files")) @@ -982,22 +982,23 @@ if response == Gtk.ResponseType.OK: filename = dialog.get_filename() self.bind_object.set_text(filename) - self.set_val(filename) + self.set_value(filename) dialog.destroy() def update_icon_preview_cb(self, dialog, preview): filename = dialog.get_preview_filename() dialog.set_preview_widget_active(False) - if os.path.isfile(filename): - pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename) - if pixbuf is not None: - if pixbuf.get_width() > 128: - pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(filename, 128, -1) - elif pixbuf.get_height() > 128: - pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(filename, -1, 128) - preview.set_from_pixbuf(pixbuf) - dialog.set_preview_widget_active(True) + if filename is not None: + if os.path.isfile(filename): + pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename) + if pixbuf is not None: + if pixbuf.get_width() > 128: + pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(filename, 128, -1) + elif pixbuf.get_height() > 128: + pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(filename, -1, 128) + preview.set_from_pixbuf(pixbuf) + dialog.set_preview_widget_active(True) class TweenChooser(SettingsWidget): bind_prop = "tween" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py 2016-11-23 14:03:02.000000000 +0100 @@ -67,7 +67,7 @@ CONTROL_CENTER_MODULES = [ # Label Module ID Icon Category Keywords for filter - [_("Networking"), "network", "cs-network", "hardware", _("network, wireless, wifi, ethernet, broadband, internet")], + [_("Network"), "network", "cs-network", "hardware", _("network, wireless, wifi, ethernet, broadband, internet")], [_("Display"), "display", "cs-display", "hardware", _("display, screen, monitor, layout, resolution, dual, lcd")], [_("Color"), "color", "cs-color", "hardware", _("color, profile, display, printer, output")], [_("Graphics Tablet"), "wacom", "cs-tablet", "hardware", _("wacom, digitize, tablet, graphics, calibrate, stylus")] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py 2016-11-23 14:03:02.000000000 +0100 @@ -601,10 +601,11 @@ # Convert RGBA PIL Image to Pixbuf def _image_to_pixbuf(self, img): + [w, h] = img.size return GdkPixbuf.Pixbuf.new_from_bytes(GLib.Bytes.new(img.tobytes()), GdkPixbuf.Colorspace.RGB, - True, 8, img.width, img.height, - img.width * 4) + True, 8, w, h, + w * 4) PIX_CACHE = PixCache() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/modules/cs_effects.py new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/modules/cs_effects.py --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/modules/cs_effects.py 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/modules/cs_effects.py 2016-11-23 14:03:02.000000000 +0100 @@ -66,7 +66,7 @@ self.bind_prop = "tween" self.bind_dir = Gio.SettingsBindFlags.DEFAULT self.bind_object = self - + if schema not in settings_objects.keys(): settings_objects[schema] = Gio.Settings.new(schema) self.settings = settings_objects[schema] @@ -80,7 +80,7 @@ self.bind_prop = "effect" self.bind_dir = Gio.SettingsBindFlags.DEFAULT self.bind_object = self - + if schema not in settings_objects.keys(): settings_objects[schema] = Gio.Settings.new(schema) self.settings = settings_objects[schema] @@ -259,4 +259,7 @@ if not active and schema.get_boolean("desktop-effects-on-dialogs"): schema.set_boolean("desktop-effects-on-dialogs", False) + if not active and schema.get_boolean("desktop-effects-on-menus"): + schema.set_boolean("desktop-effects-on-menus", False) + self.update_effects(self.custom_switch, None) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/xlet-settings.py new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/xlet-settings.py --- old/Cinnamon-3.2.1/files/usr/share/cinnamon/cinnamon-settings/xlet-settings.py 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/files/usr/share/cinnamon/cinnamon-settings/xlet-settings.py 2016-11-23 14:03:02.000000000 +0100 @@ -52,10 +52,10 @@ #check for a translation for this xlet if uuid not in translations: try: - translations[uuid] = gettext.translation(uuid, home + "/.local/share/locale").ugettext + translations[uuid] = gettext.translation(uuid, home + "/.local/share/locale").gettext except IOError: try: - translations[uuid] = gettext.translation(uuid, "/usr/share/locale").ugettext + translations[uuid] = gettext.translation(uuid, "/usr/share/locale").gettext except IOError: translations[uuid] = None @@ -65,6 +65,12 @@ if translations[uuid]: result = translations[uuid](string) + + try: + result = result.decode("utf-8") + except: + result = result + if result != string: return result return _(string) @@ -74,7 +80,7 @@ self.type = xlet_type self.uuid = uuid self.selected_instance = None - + self.load_xlet_data() self.build_window() self.load_instances() @@ -180,7 +186,7 @@ icon_path = os.path.join(self.xlet_dir, "icon.png") if os.path.exists(icon_path): self.window.set_icon_from_file(icon_path) - self.window.set_title(self.xlet_meta["name"]) + self.window.set_title(translate(self.uuid, self.xlet_meta["name"])) self.window.connect("destroy", self.quit) self.prev_button.connect("clicked", self.previous_instance) @@ -207,17 +213,37 @@ settings_map = settings.get_settings() first_key = next(iter(settings_map.values())) - # if a layout is not expicitly defined, generate the settings - # widgets based on the order they occur - if first_key["type"] == "layout": - self.build_with_layout(settings_map, info, instance_box, first_key) - else: - self.build_from_order(settings_map, info, instance_box, first_key) - - if self.selected_instance is None: - self.selected_instance = info - if "stack" in info: - self.stack_switcher.set_stack(info["stack"]) + + try: + for setting in settings_map.keys(): + if setting == "__md5__": + continue + for key in settings_map[setting].keys(): + if key in ("description", "tooltip", "units"): + try: + settings_map[setting][key] = translate(self.uuid, settings_map[setting][key]) + except: + pass + elif key in "options": + new_opt_data = collections.OrderedDict() + opt_data = settings_map[setting][key] + for option in opt_data.keys(): + if opt_data[option] == "custom": + continue + new_opt_data[translate(self.uuid, option)] = opt_data[option] + settings_map[setting][key] = new_opt_data + finally: + # if a layout is not expicitly defined, generate the settings + # widgets based on the order they occur + if first_key["type"] == "layout": + self.build_with_layout(settings_map, info, instance_box, first_key) + else: + self.build_from_order(settings_map, info, instance_box, first_key) + + if self.selected_instance is None: + self.selected_instance = info + if "stack" in info: + self.stack_switcher.set_stack(info["stack"]) def build_with_layout(self, settings_map, info, box, first_key): layout = first_key @@ -230,10 +256,10 @@ for page_key in layout["pages"]: page_def = layout[page_key] page = SettingsPage() - page_stack.add_titled(page, page_key, page_def["title"]) + page_stack.add_titled(page, page_key, translate(self.uuid, page_def["title"])) for section_key in page_def["sections"]: section_def = layout[section_key] - section = page.add_section(section_def["title"]) + section = page.add_section(translate(self.uuid, section_def["title"])) for key in section_def["keys"]: item = settings_map[key] settings_type = item["type"] @@ -241,7 +267,7 @@ widget = XLETSettingsButton(item, self.uuid, info["id"]) section.add_row(widget) elif settings_type == "label": - widget = Text(item["description"]) + widget = Text(translate(self.uuid, item["description"])) section.add_row(widget) elif settings_type in XLET_SETTINGS_WIDGETS: widget = globals()[XLET_SETTINGS_WIDGETS[settings_type]](key, info["settings"], item) @@ -261,12 +287,12 @@ if "type" in item.keys(): settings_type = item["type"] if settings_type in ("header", "section"): - section = page.add_section(item["description"]) + section = page.add_section(translate(self.uuid, item["description"])) elif settings_type == "button": widget = XLETSettingsButton(item, self.uuid, info["id"]) section.add_row(widget) elif settings_type == "label": - widget = Text(item["description"]) + widget = Text(translate(self.uuid, item["description"])) section.add_row(widget) elif settings_type in XLET_SETTINGS_WIDGETS: widget = globals()[XLET_SETTINGS_WIDGETS[settings_type]](key, info["settings"], item) @@ -274,7 +300,7 @@ def notify_dbus(self, handler, key, value): proxy.updateSetting('(ssss)', self.uuid, handler.instance_id, key, json.dumps(value)) - + def set_instance(self, info): self.instance_stack.set_visible_child_name(info["id"]) if "stack" in info: @@ -351,7 +377,7 @@ def quit(self, *args): if proxy: proxy.highlightXlet('(ssb)', self.uuid, self.selected_instance["id"], False) - + self.window.destroy() Gtk.main_quit() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/js/misc/fileUtils.js new/Cinnamon-3.2.2/js/misc/fileUtils.js --- old/Cinnamon-3.2.1/js/misc/fileUtils.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/js/misc/fileUtils.js 2016-11-23 14:03:02.000000000 +0100 @@ -28,6 +28,14 @@ return file['delete'](null); } +function changeModeGFile(file, octal) { + if(file.query_exists(null)) { + let info = file.query_info("unix::mode", Gio.FileQueryInfoFlags.NONE, null); + info.set_attribute_uint32("unix::mode", parseInt(octal, 8)); + file.set_attributes_from_info(info, Gio.FileQueryInfoFlags.NONE, null); + } +} + function recursivelyDeleteDir(dir) { let children = dir.enumerate_children('standard::name,standard::type', Gio.FileQueryInfoFlags.NONE, null); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/js/ui/applet.js new/Cinnamon-3.2.2/js/ui/applet.js --- old/Cinnamon-3.2.1/js/ui/applet.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/js/ui/applet.js 2016-11-23 14:03:02.000000000 +0100 @@ -27,7 +27,7 @@ VERTICAL: 'vertical', HORIZONTAL: 'horizontal', BOTH: 'both' -} +}; /** * #MenuItem @@ -42,9 +42,9 @@ /** * #AppletContextMenu * @short_description: Applet right-click menu - * + * * A context menu (right-click menu) to be used by an applet - * + * * Inherits: PopupMenu.PopupMenu */ function AppletContextMenu(launcher, orientation) { @@ -58,25 +58,30 @@ * _init: * @launcher (Applet.Applet): The applet that contains the context menu * @orientation (St.Side): The orientation of the applet - * + * * Constructor function */ - _init: function(launcher, orientation) { + _init: function(launcher, orientation) { PopupMenu.PopupMenu.prototype._init.call(this, launcher.actor, orientation); Main.uiGroup.add_actor(this.actor); - this.actor.hide(); + this.actor.hide(); + this.connect("open-state-changed", Lang.bind(this, this._onOpenStateChanged, launcher.actor)); launcher.connect("orientation-changed", Lang.bind(this, function(a, orientation) { this.setArrowSide(orientation); - })) - } + })); + }, + + _onOpenStateChanged: function(menu, open, sourceActor) { + sourceActor.change_style_pseudo_class("checked", open); + } }; /** * #AppletPopupMenu: * @short_description: Applet left-click menu - * + * * A popupmenu menu (left-click menu) to be used by an applet - * + * * Inherits: PopupMenu.PopupMenu */ function AppletPopupMenu(launcher, orientation) { @@ -90,7 +95,7 @@ * _init: * @launcher (Applet.Applet): The applet that contains the context menu * @orientation (St.Side): The orientation of the applet - * + * * Constructor function */ _init: function(launcher, orientation) { @@ -98,16 +103,23 @@ Main.uiGroup.add_actor(this.actor); this.actor.hide(); this.launcher = launcher; - if (launcher instanceof Applet) + if (launcher instanceof Applet) { + this.connect("open-state-changed", Lang.bind(this, this._onOpenStateChanged, launcher)); launcher.connect("orientation-changed", Lang.bind(this, this._onOrientationChanged)); - else if (launcher._applet) + } else if (launcher._applet) { launcher._applet.connect("orientation-changed", Lang.bind(this, this._onOrientationChanged)); + } }, _onOrientationChanged: function(a, orientation) { this.setArrowSide(orientation); + }, + + _onOpenStateChanged: function(menu, open, sourceActor) { + if (!sourceActor._applet_context_menu.isOpen) + sourceActor.actor.change_style_pseudo_class("checked", open); } -} +}; /** * #Applet @@ -134,7 +146,7 @@ * @_allowedLayout (Applet.AllowedLayout): The allowed layout of the applet. This * determines the type of panel an applet is allowed in. By default this is set * to Applet.AllowedLayout.HORIZONTAL - * + * * Base applet class that other applets can inherit */ function Applet(orientation, panelHeight, instance_id) { @@ -157,18 +169,18 @@ this._allowedLayout = AllowedLayout.HORIZONTAL; this.setOrientationInternal(orientation); - - this._applet_tooltip = new Tooltips.PanelItemTooltip(this, "", orientation); - this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPressEvent)); + + this._applet_tooltip = new Tooltips.PanelItemTooltip(this, "", orientation); + this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPressEvent)); this._menuManager = new PopupMenu.PopupMenuManager(this); this._applet_context_menu = new AppletContextMenu(this, orientation); - this._menuManager.addMenu(this._applet_context_menu); + this._menuManager.addMenu(this._applet_context_menu); - this.actor._applet = this; // Backlink to get the applet from its actor + this.actor._applet = this; // Backlink to get the applet from its actor // (handy when we want to know stuff about a particular applet within the panel) this.actor._delegate = this; - this._order = 0; // Defined in gsettings, this is the order of the applet within a panel location. + this._order = 0; // Defined in gsettings, this is the order of the applet within a panel location. // This value is set by Cinnamon when loading/listening_to gsettings. this._newOrder = null; // Used when moving an applet this._panelLocation = null; // Backlink to the panel location our applet is in, set by Cinnamon. @@ -181,11 +193,11 @@ this._uuid = null; // Defined in gsettings, set by Cinnamon. this._hook = null; // Defined in metadata.json, set by appletManager this._meta = null; // set by appletManager - this._dragging = false; + this._dragging = false; this._draggable = DND.makeDraggable(this.actor); this._draggable.connect('drag-begin', Lang.bind(this, this._onDragBegin)); this._draggable.connect('drag-cancelled', Lang.bind(this, this._onDragCancelled)); - this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd)); + this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd)); try { this._scaleMode = AppletManager.enabledAppletDefinitions.idMap[instance_id].panel.scaleMode; @@ -205,7 +217,7 @@ this._setAppletReactivity(); this._panelEditModeChangedId = global.settings.connect('changed::panel-edit-mode', Lang.bind(this, function() { - this._setAppletReactivity(); + this._setAppletReactivity(); })); }, @@ -220,17 +232,17 @@ _onDragBegin: function() { this._dragging = true; this._applet_tooltip.hide(); - this._applet_tooltip.preventShow = true; + this._applet_tooltip.preventShow = true; }, _onDragEnd: function() { this._dragging = false; - this._applet_tooltip.preventShow = false; + this._applet_tooltip.preventShow = false; }, _onDragCancelled: function() { this._dragging = false; - this._applet_tooltip.preventShow = false; + this._applet_tooltip.preventShow = false; }, getDragActor: function() { @@ -258,9 +270,9 @@ this.on_applet_clicked(event); } } - if (event.get_button() == 3) { + if (event.get_button() == 3) { if (this._applet_context_menu._getMenuItems().length > 0) { - this._applet_context_menu.toggle(); + this._applet_context_menu.toggle(); } } } @@ -270,7 +282,7 @@ /** * set_applet_tooltip: * @text (string): the tooltip text to be set - * + * * Sets the tooltip of the applet */ set_applet_tooltip: function (text) { @@ -283,7 +295,7 @@ /** * set_applet_enabled: * @enabled (boolean): whether this applet is enabled or not - * + * * Sets whether the applet is enabled or not. A disabled applet sets its * padding to 0px and doesn't react to clicks */ @@ -297,13 +309,13 @@ /** * on_applet_clicked: * @event (Clutter.Event): the event object - * + * * This function is called when the applet is clicked. - * + * * This is meant to be overridden in individual applets. */ on_applet_clicked: function(event) { - // Implemented by Applets + // Implemented by Applets }, @@ -313,7 +325,7 @@ * This function is called when an applet *of the same uuid* is added or * removed from the panels. It is intended to assist in delegation of * responsibilities between duplicate applet instances. - * + * * This is meant to be overridden in individual applets */ on_applet_instances_changed: function() { @@ -338,9 +350,9 @@ /** * on_applet_added_to_panel: - * + * * This function is called by appletManager when the applet is added to the panel. - * + * * This is meant to be overridden in individual applets. */ on_applet_added_to_panel: function(userEnabled) { @@ -348,9 +360,9 @@ /** * on_applet_removed_from_panel: - * + * * This function is called by appletManager when the applet is removed from the panel. - * + * * This is meant to be overridden in individual applets. */ on_applet_removed_from_panel: function() { @@ -386,9 +398,9 @@ /** * setOrientation: * @orientation (St.Side): the orientation - * + * * Sets the orientation of the applet. - * + * * This function should only be called by appletManager */ setOrientation: function (orientation) { @@ -424,19 +436,19 @@ /** * on_orientation_changed: * @orientation (St.Side): new orientation of the applet - * + * * This function is called when the applet is changes orientation. - * + * * This is meant to be overridden in individual applets. - */ + */ on_orientation_changed: function(orientation) { - // Implemented by Applets + // Implemented by Applets }, /** * setPanelHeight: * @panelHeight (int): panelHeight - * + * * Sets the panel height property of the applet. */ setPanelHeight: function (panel_height) { @@ -446,7 +458,7 @@ this._scaleMode = AppletManager.enabledAppletDefinitions.idMap[this.instance_id].panel.scaleMode; this.on_panel_height_changed_internal(); }, - + /** * on_panel_height_changed_internal: * @@ -458,18 +470,18 @@ /** * on_panel_height_changed: - * + * * This function is called when the panel containing the applet changes height - * + * * This is meant to be overridden in individual applets. - */ + */ on_panel_height_changed: function() { // Implemented byApplets }, - + finalizeContextMenu: function () { - // Add default context menus if we're in panel edit mode, ensure their removal if we're not + // Add default context menus if we're in panel edit mode, ensure their removal if we're not let items = this._applet_context_menu._getMenuItems(); if (this.context_menu_item_remove == null) { @@ -492,12 +504,16 @@ this.context_menu_separator = new PopupMenu.PopupSeparatorMenuItem(); } + if (this._applet_context_menu._getMenuItems().length > 0) { + this._applet_context_menu.addMenuItem(this.context_menu_separator); + } + if (items.indexOf(this.context_menu_item_about) == -1) { this._applet_context_menu.addMenuItem(this.context_menu_item_about); } if (!this._meta["hide-configuration"] && GLib.file_test(this._meta["path"] + "/settings-schema.json", GLib.FileTest.EXISTS)) { - if (this.context_menu_item_configure == null) { + if (this.context_menu_item_configure == null) { this.context_menu_item_configure = new PopupMenu.PopupIconMenuItem(_("Configure..."), "system-run", St.IconType.SYMBOLIC); @@ -538,9 +554,9 @@ * @short_description: Applet with icon * * @_applet_icon (St.Icon): Actor of the icon - * + * * Applet that contains an icon - * + * * Inherits: Applet.Applet */ function IconApplet(orientation, panel_height, instance_id) { @@ -569,13 +585,13 @@ /** * set_applet_icon_name: * @icon_name (string): Name of the icon - * + * * Sets the icon of the applet to @icon_name. - * + * * The icon will be full color */ set_applet_icon_name: function (icon_name) { - this._ensureIcon() + this._ensureIcon(); this._applet_icon.set_icon_name(icon_name); this._applet_icon.set_icon_type(St.IconType.FULLCOLOR); @@ -585,13 +601,13 @@ /** * set_applet_icon_symbolic_name: * @icon_name (string): Name of the icon - * + * * Sets the icon of the applet to @icon_name. - * + * * The icon will be symbolic */ set_applet_icon_symbolic_name: function (icon_name) { - this._ensureIcon() + this._ensureIcon(); this._applet_icon.set_icon_name(icon_name); this._applet_icon.set_icon_type(St.IconType.SYMBOLIC); @@ -601,13 +617,13 @@ /** * set_applet_icon_path: * @icon_path (string): path of the icon - * + * * Sets the icon of the applet to the image file at @icon_path - * + * * The icon will be full color */ set_applet_icon_path: function (icon_path) { - this._ensureIcon() + this._ensureIcon(); try { let file = Gio.file_new_for_path(icon_path); @@ -622,13 +638,13 @@ /** * set_applet_icon_symbolic_path: * @icon_path (string): path of the icon - * + * * Sets the icon of the applet to the image file at @icon_path - * + * * The icon will be symbolic */ set_applet_icon_symbolic_path: function(icon_path) { - this._ensureIcon() + this._ensureIcon(); try { let file = Gio.file_new_for_path(icon_path); @@ -687,7 +703,7 @@ * @_applet_label (St.Label): Label of the applet * * Applet that displays a text - * + * * Inherits: Applet.Applet */ function TextApplet(orientation, panel_height, instance_id) { @@ -708,15 +724,15 @@ */ _init: function(orientation, panel_height, instance_id) { Applet.prototype._init.call(this, orientation, panel_height, instance_id); - this._applet_label = new St.Label({ reactive: true, - track_hover: true, + this._applet_label = new St.Label({ reactive: true, + track_hover: true, style_class: 'applet-label'}); this._applet_label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; this._layoutBin = new St.Bin(); this._layoutBin.set_child(this._applet_label); - this.actor.add(this._layoutBin, { y_align: St.Align.MIDDLE, + this.actor.add(this._layoutBin, { y_align: St.Align.MIDDLE, y_fill: false }); this.actor.set_label_actor(this._applet_label); }, @@ -724,14 +740,14 @@ /** * set_applet_label: * @text (string): text to be displayed at the label - * + * * Sets the text of the actor to @text */ set_applet_label: function (text) { this._applet_label.set_text(text); }, - - on_applet_added_to_panel: function() { + + on_applet_added_to_panel: function() { } }; @@ -741,7 +757,7 @@ * @_applet_label (St.Label): Label of the applet * * Applet that displays an icon and a text. The icon is on the left of the text - * + * * Inherits: Applet.IconApplet * Note that suitability for display in a vertical panel is handled by having applets declare * they work OK, handled elsewhere @@ -761,15 +777,15 @@ */ _init: function(orientation, panel_height, instance_id) { IconApplet.prototype._init.call(this, orientation, panel_height, instance_id); - this._applet_label = new St.Label({ reactive: true, - track_hover: true, + this._applet_label = new St.Label({ reactive: true, + track_hover: true, style_class: 'applet-label'}); this._applet_label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; this._layoutBin = new St.Bin(); this._layoutBin.set_child(this._applet_label); - this.actor.add(this._layoutBin, { y_align: St.Align.MIDDLE, + this.actor.add(this._layoutBin, { y_align: St.Align.MIDDLE, y_fill: false }); this.actor.set_label_actor(this._applet_label); }, @@ -781,7 +797,7 @@ * empty string. The margin is always set to zero in a vertical panel */ update_label_margin: function () { - let text = this._applet_label.get_text() + let text = this._applet_label.get_text(); if ((text && text != "") && this._applet_icon_box.child && (this._orientation == St.Side.TOP || this._orientation == St.Side.BOTTOM)) { @@ -794,7 +810,7 @@ /** * set_applet_label: * @text (string): text to be displayed at the label - * + * * Sets the text of the actor to @text */ set_applet_label: function (text) { @@ -805,7 +821,7 @@ /** * set_applet_enabled: * @enabled (boolean): whether this applet is enabled or not - * + * * Sets whether the applet is enabled or not. A disabled applet sets its * padding to 0px and doesn't react to clicks */ @@ -841,14 +857,14 @@ /** * hide_applet_icon: - * + * * Hides the icon of the applet */ hide_applet_icon: function () { this._applet_icon_box.child = null; }, - - on_applet_added_to_panel: function() { - + + on_applet_added_to_panel: function() { + } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/js/ui/indicatorManager.js new/Cinnamon-3.2.2/js/ui/indicatorManager.js --- old/Cinnamon-3.2.1/js/ui/indicatorManager.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/js/ui/indicatorManager.js 2016-11-23 14:03:02.000000000 +0100 @@ -1200,15 +1200,18 @@ return [path, realSize]; }, - _createIconByName: function(path, realSize) { + _createIconByName: function(path, iconSize) { try { let pixbuf = GdkPixbuf.Pixbuf.new_from_file(path); let icon = new St.Icon({ style_class: 'applet-icon',//FIXME: Use instead the status icon style class. gicon: pixbuf, }); - if (realSize) - icon.set_icon_size(realSize); + if (iconSize) + icon.set_icon_size(iconSize); + //Connect this always, because the user can enable/disable the panel scale mode + //when he want, otherwise we need to control the scale mode internally. + icon.connect('notify::mapped', Lang.bind(this, this._onIconMapped)); return icon; } catch (e) { // the image data was probably bogus. We don't really know why, but it _does_ happen. @@ -1252,6 +1255,9 @@ }); if (iconSize) icon.set_icon_size(iconSize); + //Connect this always, because the user can enable/disable the panel scale mode + //when he want, otherwise we need to control the scale mode internally. + icon.connect('notify::mapped', Lang.bind(this, this._onIconMapped)); return icon; } catch (e) { // the image data was probably bogus. We don't really know why, but it _does_ happen. @@ -1261,6 +1267,15 @@ return null; }, + _onIconMapped: function(actor, event) { + if (!this._iconSize) { + let themeNode = actor.get_theme_node(); + let [found, size] = themeNode.lookup_length('icon-size', false); + if (!found) + actor.set_icon_size(16); + } + }, + // updates the base icon _updateIcon: function() { // remove old icon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/js/ui/panel.js new/Cinnamon-3.2.2/js/ui/panel.js --- old/Cinnamon-3.2.1/js/ui/panel.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/js/ui/panel.js 2016-11-23 14:03:02.000000000 +0100 @@ -1672,7 +1672,7 @@ let menuItem = new SettingsLauncher(_("Themes"), "themes", "applications-graphics"); this.addMenuItem(menuItem); - let menuSetting = new SettingsLauncher(_("All settings"), "", "preferences-system"); + let menuSetting = new SettingsLauncher(_("System Settings"), "", "preferences-system"); this.addMenuItem(menuSetting); populateSettingsMenu(this, panelId); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Cinnamon-3.2.1/js/ui/popupMenu.js new/Cinnamon-3.2.2/js/ui/popupMenu.js --- old/Cinnamon-3.2.1/js/ui/popupMenu.js 2016-11-08 15:27:01.000000000 +0100 +++ new/Cinnamon-3.2.2/js/ui/popupMenu.js 2016-11-23 14:03:02.000000000 +0100 @@ -2175,7 +2175,22 @@ this._orientation = orientation; }, - /* + /** + * setCustomStyleClass: + * @className (string): the custom class name to add + * + * Adds a custom class name to the menu which allows it to be styled separately from other menus. + */ + setCustomStyleClass: function(className) { + this.customStyleClass = className; + if (this.actor.get_style_class_name()) { + this.actor.set_style_class_name(this.actor.get_style_class_name() + "" + className) + } else { + this.actor.set_style_class_name(className); + } + }, + + /** * setSourceAlignment: * @alignment (real): the position of the arrow relative to the source * actor. @@ -2481,6 +2496,7 @@ } let xPos, yPos; + let styleClasses = ["menu"]; switch (this._orientation) { case St.Side.TOP: case St.Side.BOTTOM: @@ -2496,12 +2512,12 @@ if (this._orientation == St.Side.BOTTOM) { this.sideFlipped = true; yPos = sourceBox.y1 - natHeight; - this.actor.set_style_class_name('menu bottom'); + styleClasses.push("bottom"); } else { this.sideFlipped = false; yPos = sourceBox.y2; - this.actor.set_style_class_name('menu top'); + styleClasses.push("top"); } break; case St.Side.LEFT: @@ -2518,15 +2534,17 @@ if (this._orientation == St.Side.RIGHT || x2 - sourceBox.x2 < natWidth) { this.sideFlipped = true; xPos = sourceBox.x1 - natWidth; - this.actor.set_style_class_name('menu right'); + styleClasses.push("right"); } else { this.sideFlipped = false; xPos = sourceBox.x2; - this.actor.set_style_class_name('menu left'); + styleClasses.push("left"); } break; } + if (this.customStyleClass) styleClasses.push(this.customStyleClass); + this.actor.set_style_class_name(styleClasses.join(" ")); return [Math.round(xPos), Math.round(yPos)]; }, ++++++ cinnamon-no-gksu-requirement.patch ++++++ --- /var/tmp/diff_new_pack.nKAE7D/_old 2016-11-28 15:06:52.000000000 +0100 +++ /var/tmp/diff_new_pack.nKAE7D/_new 2016-11-28 15:06:52.000000000 +0100 @@ -8,7 +8,7 @@ +os.system("xdg-su -c '/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py'") --- a/files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js +++ b/files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js -@@ -157,10 +157,6 @@ ApplicationContextMenuItem.prototype = { +@@ -156,10 +156,6 @@ ApplicationContextMenuItem.prototype = { AppFavorites.getAppFavorites().removeFavorite(this._appButton.app.get_id()); this._appButton.toggleMenu(); break;
participants (1)
-
root@hilbert.suse.de