Browse Source

Imported Upstream version 2.6.0

upstream upstream/2.6.0
Maximiliano Curia 9 years ago
parent
commit
689916f550
  1. 2
      Makefile.am
  2. 4714
      cinnamon.pot
  3. 34
      configure.ac
  4. 3
      data/Makefile.am
  5. 161
      data/org.cinnamon.gschema.xml.in
  6. 196
      data/theme/cinnamon.css
  7. 12
      data/theme/player-paused.svg
  8. 9
      data/theme/player-playing.svg
  9. 9
      data/theme/player-stopped.svg
  10. 37
      doc/README.md
  11. 64
      doc/create-doc.py
  12. 250
      doc/jstoxml.py
  13. 82
      doc/style.css
  14. 189
      doc/xmltohtml.py
  15. 1
      docs/Makefile.am
  16. 488
      docs/applets-examples/finder@cinnamon.org/applet.js
  17. 6
      docs/applets-examples/finder@cinnamon.org/metadata.json
  18. 7
      docs/applets-examples/finder@cinnamon.org/settings-schema.json
  19. 1
      docs/reference/Makefile.am
  20. 106
      docs/reference/cinnamon-js/Makefile.am
  21. 283
      docs/reference/cinnamon-js/gen_doc.py
  22. 624
      docs/reference/cinnamon-js/gen_lib.py
  23. 13
      docs/reference/cinnamon-js/tutorials.xml
  24. 89
      docs/reference/cinnamon-js/tutorials/building.xml
  25. 184
      docs/reference/cinnamon-js/tutorials/documenting-source.xml
  26. 30
      docs/reference/cinnamon-js/tutorials/documenting-tutorial.xml
  27. 132
      docs/reference/cinnamon-js/tutorials/using-documentation.xml
  28. 276
      docs/reference/cinnamon-js/tutorials/write-applet.xml
  29. 213
      docs/reference/cinnamon-js/tutorials/xlet-settings.xml
  30. 43
      docs/reference/cinnamon-js/tutorials/xlet-versioning.xml
  31. 114
      docs/reference/cinnamon/Makefile.am
  32. 62
      docs/reference/cinnamon/cinnamon-docs.sgml.in
  33. 104
      docs/reference/st/Makefile.am
  34. 64
      docs/reference/st/cinnamon-st-docs.sgml.in
  35. 5
      docs/search-providers-examples/apt@cinnamon.org/metadata.json
  36. 30
      docs/search-providers-examples/apt@cinnamon.org/search_provider.js
  37. 19
      docs/search-providers-examples/apt@cinnamon.org/search_provider.py
  38. 5
      docs/search-providers-examples/calc@cinnamon.org/metadata.json
  39. 35
      docs/search-providers-examples/calc@cinnamon.org/search_provider.js
  40. 5
      docs/search-providers-examples/chromium-history@cinnamon.org/metadata.json
  41. 38
      docs/search-providers-examples/chromium-history@cinnamon.org/search_provider.js
  42. 80
      docs/search-providers-examples/chromium-history@cinnamon.org/search_provider.py
  43. 5
      docs/search-providers-examples/trackerprovider@cinnamon.org/metadata.json
  44. 62
      docs/search-providers-examples/trackerprovider@cinnamon.org/search_provider.js
  45. 62
      docs/search-providers-examples/trackerprovider@cinnamon.org/search_provider.py
  46. 11
      docs/search-providers-examples/wikipedia@cinnamon.org/metadata.json
  47. 65
      docs/search-providers-examples/wikipedia@cinnamon.org/search_provider.js
  48. 11
      docs/search-providers-examples/yahoo@cinnamon.org/metadata.json
  49. 26
      docs/search-providers-examples/yahoo@cinnamon.org/search_provider.js
  50. 1
      files/etc/cinnamon/preload/iconthemes.d/cinnamon.list
  51. 2
      files/generate_desktop_files
  52. 2
      files/usr/bin/cinnamon-desktop-editor
  53. 60
      files/usr/bin/cinnamon-file-dialog
  54. 2
      files/usr/bin/cinnamon-json-makepot
  55. 2
      files/usr/bin/cinnamon-launcher
  56. 2
      files/usr/bin/cinnamon-looking-glass
  57. 2
      files/usr/bin/cinnamon-menu-editor
  58. 55
      files/usr/bin/cinnamon-preload
  59. 4
      files/usr/bin/cinnamon-preload-wrapper
  60. 2
      files/usr/bin/cinnamon-preview-gtk-theme
  61. 2
      files/usr/bin/cinnamon-screensaver-lock-dialog
  62. 2
      files/usr/bin/cinnamon-settings
  63. 2
      files/usr/bin/cinnamon-settings-users
  64. 2
      files/usr/bin/cinnamon-slideshow
  65. 14
      files/usr/bin/cinnamon-subprocess-wrapper
  66. 20
      files/usr/lib/cinnamon-desktop-editor/cinnamon-desktop-editor.py
  67. 9
      files/usr/lib/cinnamon-desktop-editor/directory-editor.ui
  68. 9
      files/usr/lib/cinnamon-desktop-editor/launcher-editor.ui
  69. 49
      files/usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py
  70. 58
      files/usr/lib/cinnamon-looking-glass/cinnamon-looking-glass.py
  71. 41
      files/usr/lib/cinnamon-looking-glass/page_extensions.py
  72. 3
      files/usr/lib/cinnamon-looking-glass/page_inspect.py
  73. 13
      files/usr/lib/cinnamon-looking-glass/page_log.py
  74. 3
      files/usr/lib/cinnamon-looking-glass/page_memory.py
  75. 27
      files/usr/lib/cinnamon-looking-glass/page_results.py
  76. 3
      files/usr/lib/cinnamon-looking-glass/page_windows.py
  77. 2
      files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py
  78. 37
      files/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py
  79. 613
      files/usr/lib/cinnamon-settings/bin/ExtensionCore.py
  80. 1333
      files/usr/lib/cinnamon-settings/bin/SettingsWidgets.py
  81. 313
      files/usr/lib/cinnamon-settings/bin/Spices.py
  82. 32
      files/usr/lib/cinnamon-settings/bin/XletSettings.py
  83. 287
      files/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.py
  84. 4
      files/usr/lib/cinnamon-settings/bin/imtools.py
  85. 2
      files/usr/lib/cinnamon-settings/bin/installSchema.py
  86. 2
      files/usr/lib/cinnamon-settings/bin/removeSchema.py
  87. 309
      files/usr/lib/cinnamon-settings/bin/tweenEquations.py
  88. 219
      files/usr/lib/cinnamon-settings/bin/windowEffects.py
  89. 163
      files/usr/lib/cinnamon-settings/cinnamon-settings.py
  90. 124
      files/usr/lib/cinnamon-settings/cinnamon-settings.ui
  91. 21
      files/usr/lib/cinnamon-settings/modules/cs_applets.py
  92. 185
      files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py
  93. 48
      files/usr/lib/cinnamon-settings/modules/cs_calendar.py
  94. 212
      files/usr/lib/cinnamon-settings/modules/cs_default.py
  95. 54
      files/usr/lib/cinnamon-settings/modules/cs_desklets.py
  96. 43
      files/usr/lib/cinnamon-settings/modules/cs_desktop.py
  97. 571
      files/usr/lib/cinnamon-settings/modules/cs_effects.py
  98. 9
      files/usr/lib/cinnamon-settings/modules/cs_extensions.py
  99. 92
      files/usr/lib/cinnamon-settings/modules/cs_fonts.py
  100. 55
      files/usr/lib/cinnamon-settings/modules/cs_general.py

2
Makefile.am

@ -1,7 +1,7 @@
# Point to our macro directory and pick up user flags from the environment
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = data js src tests po man files
SUBDIRS = data js src tests po man files docs
EXTRA_DIST = \
.project \

4714
cinnamon.pot

File diff suppressed because it is too large

34
configure.ac

@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([cinnamon],[2.4.8],[https://bugzilla.gnome.org/enter_bug.cgi?product=cinnamon],[cinnamon])
AC_INIT([cinnamon],[2.6.0],[https://github.com/linuxmint/Cinnamon/issues],[cinnamon])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/cinnamon-global.c])
@ -9,7 +9,7 @@ AC_CONFIG_AUX_DIR([config])
AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign])
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign subdir-objects])
AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@ -61,11 +61,11 @@ fi
AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
CLUTTER_MIN_VERSION=1.7.5
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
CLUTTER_MIN_VERSION=1.10.0
GOBJECT_INTROSPECTION_MIN_VERSION=0.9.2
GJS_MIN_VERSION=2.3.1
MUFFIN_MIN_VERSION=1.9.1
GTK_MIN_VERSION=3.0.0
MUFFIN_MIN_VERSION=2.4.0
GTK_MIN_VERSION=3.9.12
GIO_MIN_VERSION=2.29.10
POLKIT_MIN_VERSION=0.100
STARTUP_NOTIFICATION_MIN_VERSION=0.11
@ -82,7 +82,7 @@ PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $GIO_MIN_VERSION
libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
libnm-glib libnm-util gnome-keyring-1)
libnm-glib libnm-util gnome-keyring-1 atk-bridge-2.0)
PKG_CHECK_MODULES(CINNAMON_JS, gio-2.0 cjs-internals-1.0 >= $GJS_MIN_VERSION)
@ -106,11 +106,11 @@ AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier)
CFLAGS=$saved_CFLAGS
LIBS=$saved_LIBS
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 cinnamon-desktop >= 1.0.0 x11)
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 cinnamon-desktop >= 2.4.0 x11)
PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-3.0)
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, cinnamon-desktop >= 1.0.0)
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, cinnamon-desktop >= 2.4.0)
AC_MSG_CHECKING([for bluetooth support])
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
@ -166,7 +166,7 @@ AC_SUBST(TYPELIBDIR)
# minimum/yes/maximum are the same, however.
AC_ARG_ENABLE(compile_warnings,
AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),,
enable_compile_warnings=error)
enable_compile_warnings=yes)
changequote(,)dnl
if test "$enable_compile_warnings" != no ; then
@ -193,6 +193,12 @@ AC_ARG_ENABLE(jhbuild-wrapper-script,
AS_HELP_STRING([--jhbuild-wrapper-script=yes],[Make "cinnamon" script work for jhbuild]),,enable_jhbuild_wrapper_script=no)
AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes)
AC_ARG_ENABLE([gtk-doc],
AC_HELP_STRING([--enable-gtk-doc],
[use gtk-doc to build documentation [[default=yes]]]),,
enable_gtk_doc=yes)
AC_MSG_CHECKING([location of system Certificate Authority list])
AC_ARG_WITH(ca-certificates,
[AC_HELP_STRING([--with-ca-certificates=@<:@path@:>@],
@ -221,10 +227,18 @@ AC_SUBST(CINNAMON_SYSTEM_CA_FILE,["$with_ca_certificates"])
BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
AC_CONFIG_FILES([
Makefile
data/Makefile
data/icons/Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/cinnamon/Makefile
docs/reference/cinnamon/cinnamon-docs.sgml
docs/reference/cinnamon-js/Makefile
docs/reference/st/Makefile
docs/reference/st/cinnamon-st-docs.sgml
js/Makefile
js/misc/config.js
src/Makefile

3
data/Makefile.am

@ -35,9 +35,6 @@ dist_theme_DATA = \
theme/menu-symbolic.svg \
theme/overview-hover.png \
theme/overview.png \
theme/player-paused.svg \
theme/player-playing.svg \
theme/player-stopped.svg \
theme/process-working.svg \
theme/radiobutton-off.svg \
theme/radiobutton.svg \

161
data/org.cinnamon.gschema.xml.in

@ -17,7 +17,8 @@
<_description>
Cinnamon extensions have a uuid property; this key lists extensions
which should be loaded. disabled-extensions overrides this setting for
extensions that appear in both lists.
extensions that appear in both lists. Append ! in front of uuid to
override version check
</_description>
</key>
@ -26,7 +27,8 @@
<_summary>Uuids of applets to enable</_summary>
<_description>
Cinnamon applets have a uuid property; this key lists applets
which should be loaded.
which should be loaded. Append ! in front of uuid to override version
check.
</_description>
</key>
@ -47,7 +49,16 @@
<_summary>Uuids of desklets to enable</_summary>
<_description>
Cinnamon desklets have a uuid property; this key lists desklets
which should be loaded. uuids should be put in the form uuid:id:x:y, where id is used to distinguish between multiple instances of the same desklet
which should be loaded. uuids should be put in the form uuid:id:x:y, where id is used to distinguish between multiple instances of the same desklet. Append ! in front of uuid to override version check.
</_description>
</key>
<key name="enabled-search-providers" type="as">
<default>[]</default>
<_summary>Uuids of search providers to enable</_summary>
<_description>
Cinnamon search providers have a uuid property; this key lists search providers
which should be loaded.
</_description>
</key>
@ -63,79 +74,72 @@
<_description>If desklet-snap is enabled, the possible positions of desklets will be all integer multiples of the value of "desklet-snap-size"</_description>
</key>
<key name="panel-autohide" type="b">
<default>false</default>
<_summary>Auto-hide panel</_summary>
<key name="panels-enabled" type="as">
<default>['1:0:bottom']</default>
<_summary>List of panels used</_summary>
<_description>
Whether the panel autohides or not.
Panels are listed in the following format: panelID:monitor:position, where monitor is the monitor number (0 for primary), and position is either top or bottom
</_description>
</key>
<key type="i" name="panel-show-delay">
<default>0</default>
<summary>Duration of the delay before a hidden panel is shown</summary>
<description>Duration of the delay (in milliseconds)</description>
</key>
<key type="i" name="panel-hide-delay">
<default>0</default>
<summary>Duration of the delay before a shown panel is hidden</summary>
<description>Duration of the delay (in milliseconds)</description>
</key>
<key name="panel2-autohide" type="b">
<default>false</default>
<key name="panels-autohide" type="as">
<default>['1:false']</default>
<_summary>Auto-hide panel</_summary>
<_description>
Whether the panel autohides or not.
</_description>
</key>
<key type="i" name="panel2-show-delay">
<default>0</default>
<key name="panels-show-delay" type="as">
<default>['1:0']</default>
<summary>Duration of the delay before a hidden panel is shown</summary>
<description>Duration of the delay (in milliseconds)</description>
</key>
<key type="i" name="panel2-hide-delay">
<default>0</default>
<key name="panels-hide-delay" type="as">
<default>['1:0']</default>
<summary>Duration of the delay before a shown panel is hidden</summary>
<description>Duration of the delay (in milliseconds)</description>
</key>
<key name="panel-resizable" type="b">
<default>false</default>
<key name="panels-resizable" type="as">
<default>['1:false']</default>
<_summary>Resizable panel</_summary>
<_description>
Whether the panel uses a user-defined height
</_description>
</key>
<key name="panel-top-height" type="i">
<default>25</default>
<range min="20" max="100" />
<key name="panels-height" type="as">
<default>['1:25']</default>
<_summary>Panel size</_summary>
<_description>
User-defined panel-height for top panel. Note, this value may or may not be the true value in use at runtime, depending
User-defined panel-height for panels. Note, this value may or may not be the true value in use at runtime, depending
on any scaling that may be occurring (on hidpi screens, for instance).
</_description>
</key>
<key name="panel-bottom-height" type="i">
<default>25</default>
<range min="20" max="100"/>
<_summary>Panel size</_summary>
<key name="panels-scale-text-icons" type="as">
<default>['1:false']</default>
<_summary>Scale panel applet text and icons</_summary>
<_description>
User-defined panel-height for bottom panel. Note, this value may or may not be the true value in use at runtime, depending
on any scaling that may be occurring (on hidpi screens, for instance).
Whether the panel icons and text from applets is resized according to the custom panel height
</_description>
</key>
<key name="panel-resizable" type="b">
<default>false</default>
<_summary>(Deprecated) Resizable panel</_summary>
<_description>
(Deprecated) Retained to avoid applets who read the property from crashing Cinnamon
</_description>
</key>
<key name="panel-scale-text-icons" type="b">
<default>false</default>
<_summary>Scale panel applet text and icons</_summary>
<_summary>(Deprecated) Scale panel applet text and icons</_summary>
<_description>
Whether the panel icons and text from applets is resized according to the custom panel height
(Deprecated) Retained to avoid applets who read the property from crashing Cinnamon
</_description>
</key>
@ -154,7 +158,15 @@
Whether to enable desktop effects on dialog boxes.
</_description>
</key>
<key type="s" name="desktop-effects-style">
<default>"cinnamon"</default>
<_summary>The style of desktop effects</_summary>
<_description>
An overall style used for desktop effects
</_description>
</key>
<key type="s" name="desktop-effects-close-effect">
<default>"none"</default>
<_summary>Effect used when closing windows</_summary>
@ -309,10 +321,10 @@
</key>
<key name="desktop-layout" type="s">
<default>"traditional"</default>
<_summary>Layout style</_summary>
<default>""</default>
<_summary>(Deprecated) Layout style</_summary>
<_description>
Layout styles: traditional (1 panel at the bottom), flipped (1 panel on top), classic (1 panel on top, 1 panel at the bottom)
(Deprecated) Layout styles - pre-2.6
</_description>
</key>
@ -325,10 +337,9 @@
</key>
<key type="i" name="number-workspaces">
<default>2</default>
<_summary>Number of workspaces in Cinnamon session</_summary>
<_description>
Number of Workspaces</_description>
<default>0</default>
<_summary>(Deprecated) Number of workspaces</_summary>
<_description>(Deprecated) Number of Workspaces - pre-2.6, even though you shouldn't use it even on &lt;2.6 releases. Use org.cinnamon.desktop.wm.preferences num-workspaces instead.</_description>
</key>
<key name="overview-corner" type="as">
@ -364,10 +375,10 @@
</key>
<key name="workspace-name-overrides" type="as">
<default>[]</default>
<_summary>List of non-default workspace names</_summary>
<default>['DEPRECATED']</default>
<_summary>(Deprecated) List of non-default workspace names</_summary>
<_description>
The user-set names of the workspaces.
(Deprecated) The user-set names of the workspaces. Deprecated since 2.6. Use org.cinnamon.desktop.wm.preferences workspace-names instead.
</_description>
</key>
@ -446,6 +457,11 @@
<_summary></_summary>
</key>
<key name="no-adjacent-panel-barriers" type="b">
<default>false</default>
<_summary>Whether to omit pointer barriers between adjacent panels.</_summary>
</key>
<key type="b" name="panel-edit-mode">
<default>false</default>
<_summary>Panel edit mode</_summary>
@ -476,22 +492,6 @@
<_description>Duration of the effect (in milliseconds)</_description>
</key>
<key name="window-list-applet-scroll" type="b">
<default>false</default>
<summary>Enable mouse-scroll in window-list applet</summary>
<description>
When enabled the mouse wheel can scroll through the items in the window list applet.
</description>
</key>
<key name="window-list-applet-alert" type="b">
<default>true</default>
<summary>Enable window list alerts</summary>
<description>
Enable window list alerts
</description>
</key>
<key name="bring-windows-to-current-workspace" type="b">
<default>false</default>
<summary>Brings windows requiring attention to the current workspace</summary>
@ -537,6 +537,15 @@
<default>true</default>
<_summary>Whether or not to show possible completions in the run dialog (Alt-F2)</_summary>
</key>
<key type="s" name="show-media-keys-osd">
<default>"medium"</default>
<_summary>Whether the media keys osd is disabled or its relative display size</_summary>
<_description>
Allows setting of the default size of the media keys osd or disables it completely.
Possible values are "small", "medium", "large", or "disabled".
</_description>
</key>
<child name="theme" schema="org.cinnamon.theme"/>
<child name="recorder" schema="org.cinnamon.recorder"/>
@ -552,14 +561,22 @@
</_description>
</key>
<key name="hide-snap-osd" type="b">
<default>false</default>
<_summary>Prevent the tile/snap OSD from showing</_summary>
<key name="show-snap-osd" type="b">
<default>true</default>
<_summary>Show the tile/snap OSD</_summary>
<_description>
Hide the snap OSD.
</_description>
</key>
<key name="show-tile-hud" type="b">
<default>true</default>
<_summary>Show the tile HUD</_summary>
<_description>
Hide the tile HUD.
</_description>
</key>
<key type="i" name="active-display-scale">
<range min="1" max="4" />
<default>1</default>

196
data/theme/cinnamon.css

@ -218,6 +218,15 @@ StScrollBar StButton#vhandle:hover {
font-weight: normal;
height: 25px;
}
#panel:highlight {
background-color: #aa5555;
}
.panel-dummy {
background-color: rgba(50, 50, 50, 0.4);
}
.panel-dummy:entered {
background-color: rgba(255, 35, 35, 0.4);
}
#panelLeft {
spacing: 4px;
}
@ -456,85 +465,6 @@ StScrollBar StButton#vhandle:hover {
border-radius: 4px;
color: #CCCCCC;
}
#LookingGlassDialog > #Toolbar {
border: 1px solid grey;
border-radius: 4px;
}
#LookingGlassDialog .labels {
spacing: 4px;
}
#LookingGlassDialog .notebook-tab {
padding: 2px;
}
#LookingGlassDialog .notebook-tab:hover {
color: #FFFFFF;
}
#LookingGlassDialog .notebook-tab:selected {
border: 1px solid #CCCCCC;
border-radius: 4px;
padding: 5px;
}
#LookingGlassDialog .lg-inspector-title {
font-weight: bold;
padding-bottom: 8px;
}
.lg-dialog StLabel {
color: #cccccc;
}
.lg-dialog StEntry {
color: #cccccc;
selection-background-color: #cccccc;
selected-color: black;
}
.lg-obj-inspector-title {
spacing: 4px;
}
.lg-obj-inspector-button {
border: 1px solid #cccccc;
padding: 4px;
border-radius: 4px;
}
.lg-obj-inspector-button:hover {
border: 1px solid #ffffff;
}
.lg-dialog .cinnamon-link {
color: #cccccc;
}
.lg-dialog .cinnamon-link:hover {
color: #ffffff;
}
#LookingGlassDialog StBoxLayout#EvalBox {
padding: 4px;
spacing: 4px;
}
#LookingGlassDialog StBoxLayout#ResultsArea {
spacing: 4px;
}
#lookingGlassExtensions {
padding: 4px;
}
.lg-extension-list {
padding: 4px;
spacing: 6px;
}
.lg-extension {
border: 1px solid #6f6f6f;
border-radius: 4px;
padding: 4px;
}
.lg-extension-name {
font-weight: bold;
}
.lg-extension-meta {
spacing: 6px;
}
#LookingGlassPropertyInspector {
background: rgba(0, 0, 0, 0.9);
border: 2px solid grey;
border-radius: 4px;
padding: 6px;
color: #cccccc;
}
/* ===================================================================
* Date applet
* ===================================================================*/
@ -848,6 +778,21 @@ StScrollBar StButton#vhandle:hover {
.modal-dialog-button:focus {
padding: 3px 31px 4px;
}
/* Info OSD popup */
.info-osd {
font-size: 18pt;
border-radius: 24px;
background-color: rgba(85, 85, 85, 0.9);
border: 2px solid #868686;
color: #babdb6;
padding-right: 20px;
padding-left: 20px;
padding-bottom: 20px;
padding-top: 20px;
text-align: center;
}
/* ===================================================================
* Run dialog
* ===================================================================*/
@ -1227,8 +1172,6 @@ StScrollBar StButton#vhandle:hover {
background-gradient-end: rgba(255,255,255,0.2);
box-shadow: inset 0px 0px 1px 1px rgba(170,170,170,0.5);
border-radius: 2px 2px 0px 0px;
padding-left: 5px;
padding-right: 5px;
transition-duration: 100;
}
.window-list-item-box:active,
@ -1262,7 +1205,7 @@ StScrollBar StButton#vhandle:hover {
border-radius: 4px;
padding: 5px;
}
.sound-button:hover {
.sound-button:hover, .sound-button:active {
border: 1px solid white;
}
.sound-button StIcon {
@ -1303,14 +1246,6 @@ StScrollBar StButton#vhandle:hover {
.sound-seek-slider {
width: 140px;
}
.sound-volume-menu-item {
padding: .4em 1.75em;
}
.sound-volume-menu-item StIcon {
icon-size: 1.14em;
padding-left: 8px;
padding-right: 8px;
}
.sound-playback-control {
padding-top: 5px;
padding-bottom: 10px;
@ -1652,17 +1587,74 @@ StScrollBar StButton#vhandle:hover {
background-color: white;
}
/* Snap/tile OSD popup */
/* Media keys OSD popup */
.osd-window {
background: rgba(80,80,80,0.8);
border: 2px solid #a5a5a5;
border-radius: 8px;
padding: 20px;
color: white;
spacing: 1em;
}
.snap-osd {
font-size: 18pt;
border-radius: 24px;
background-color: rgba(85, 85, 85, 0.9);
border: 2px solid #868686;
color: #babdb6;
padding-right: 20px;
padding-left: 20px;
padding-bottom: 20px;
padding-top: 20px;
text-align: center;
.osd-window .level {
height: 0.7em;
border-radius: 0.3em;
background-color: rgba(190,190,190,0.2);
}
.tile-preview,
.tile-hud {
background-color: rgba(85, 85, 85, 0.5);
border: 2px solid rgba(134, 134, 134, 0.8);
}
.tile-preview.snap,
.tile-hud.snap {
background-color: rgba(134, 134, 170, 0.5);
border: 2px solid rgba(85, 85, 85, 0.8);
}
.tile-hud:top {
border-top-width: 0px;
border-radius: 0px 0px 8px 8px;
}
.tile-hud:bottom {
border-bottom-width: 0px;
border-radius: 8px 8px 0px 0px;
}
.tile-hud:left {
border-left-width: 0px;
border-radius: 0px 8px 8px 0px;
}
.tile-hud:right {
border-right-width: 0px;
border-radius: 8px 0px 0px 8px;
}
.tile-hud:top-left {
border-top-width: 0px;
border-left-width: 0px;
border-radius: 0px 0px 8px 0px;
}
.tile-hud:top-right {
border-top-width: 0px;
border-right-width: 0px;
border-radius: 0px 0px 0px 8px;
}
.tile-hud:bottom-left {
border-bottom-width: 0px;
border-left-width: 0px;
border-radius: 0px 8px 0px 0px;
}
.tile-hud:bottom-right {
border-bottom-width: 0px;
border-right-width: 0px;
border-radius: 8px 0px 0px 0px;
}

12
data/theme/player-paused.svg

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1">
<g fill="#bebebe">
<rect rx=".53250" ry=".53250" height="12" width="2" y="1" x="6.1621"/>
<rect rx=".49537" ry=".49537" height="2" width="4.6952" y="1" x="6.1621"/>
<path stroke-linejoin="round" d="m7.6573 12.516a2.9953 2.9953 0 0 1 -5.9905 0 2.9953 2.9953 0 1 1 5.9905 0z" stroke="#bebebe" stroke-width="1.0095"/>
</g>
<g fill="#fcaf3e">
<path d="m9.6735 10.986v4.2707h1.6015v-4.271h-1.6015z"/>
<path d="m12.343 10.986v4.2707h1.6015v-4.271h-1.601z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 611 B

9
data/theme/player-playing.svg

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1">
<g fill="#bebebe">
<rect rx=".53250" ry=".53250" height="12" width="2" y="1" x="6.1621"/>
<rect rx=".49537" ry=".49537" height="2" width="4.6952" y="1" x="6.1621"/>
<path stroke-linejoin="round" d="m7.6573 12.516a2.9953 2.9953 0 0 1 -5.9905 0 2.9953 2.9953 0 1 1 5.9905 0z" stroke="#bebebe" stroke-width="1.0095"/>
</g>
<path d="m9.6734 10.461v4.7956h0.47968c0.08388 0.00048 0.16678-0.01861 0.23978-0.05994l3.3569-1.9182c0.149-0.08243 0.22479-0.25103 0.22479-0.41962s-0.0758-0.33718-0.22479-0.41962l-3.3569-1.9182c-0.073-0.044-0.156-0.063-0.24-0.063h-0.04496z" fill="#8ae234"/>
</svg>

Before

Width:  |  Height:  |  Size: 727 B

9
data/theme/player-stopped.svg

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1">
<g fill="#bebebe">
<rect rx=".53250" ry=".53250" height="12" width="2" y="1" x="6.1621"/>
<rect rx=".49537" ry=".49537" height="2" width="4.6952" y="1" x="6.1621"/>
<path stroke-linejoin="round" d="m7.6573 12.516a2.9953 2.9953 0 0 1 -5.9905 0 2.9953 2.9953 0 1 1 5.9905 0z" stroke="#bebebe" stroke-width="1.0095"/>
</g>
<path d="m9.6734 10.832v4.425h4.425v-4.425h-4.4242z" fill="#ef2929"/>
</svg>

Before

Width:  |  Height:  |  Size: 539 B

37
doc/README.md

@ -1,37 +0,0 @@
Running ./create-do.py will parse JS code in js/ui/ into html documentation.
The html files will be created in Cinnamon/doc/output-html/
Format of Documentation
=======================
Functions
---------
/**
* function_name:
* @agrument_one (ArgumentType): argument description
* @agrument_two (ArgumentType): argument description
*
* How the function works. Long description (capitalize first letter)
*
* Returns (ReturnType): what the function returns
*/
Objects
-------
/**
* #ObjectName:
* @variable1_of_object (VarType): variable description
* @variable2_of_object (VarType): variable description
*
* Description of object
*/
File
----
/**
* FILE:filename.js
*
* Description of file
*/

64
doc/create-doc.py

@ -1,64 +0,0 @@
#!/usr/bin/env python
#-*- indent-tabs-mode: nil-*-
import sys
import os
import shutil
import jstoxml
import xmltohtml
CURRDIR = os.path.abspath(os.path.dirname(sys.argv[0])) + "/"
JS_DIR = CURRDIR + "../js/ui/"
XML_DIR = CURRDIR + "output-xml/"
HTML_DIR = CURRDIR + "output-html/"
if __name__ == "__main__":
files = os.listdir(JS_DIR)
files.sort()
try:
os.mkdir(XML_DIR)
except Exception:
pass
try:
os.mkdir(HTML_DIR)
except Exception:
pass
errors = [] # Store the files that failed to parse
# Removing them in loop will break the loop
for _file in files:
print "Parsing " + _file
__file = _file[:-3]
try:
xml = jstoxml.convertJStoXML(JS_DIR + __file + ".js")
xml.write(XML_DIR + __file + ".xml")
html = xmltohtml.convertXMLtoHTML(XML_DIR + __file + ".xml")
open(HTML_DIR + __file + ".html", "w").write(html)
except:
print "Error parsing " + _file + ". Skipping"
errors.append(_file)
shutil.copy2('style.css', HTML_DIR)
html = []
html.extend(["<!DOCTYPE html>",
"<html>",
"<head>",
"<title>Cinnamon Documentation Index</title>",
"<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />\n</head>",
"<body>",
"<p class=\"page-header\">Cinnamon JS Documentation</p>",
"<ul class=\"index-page-list\">"])
for _file in files:
if _file not in errors:
html.extend(["<li><a href=\"%s.html\">%s</a></li>" % (_file[:-3], _file)])
html.extend(["</ul>",
"</body>",
"</html>"])
open(HTML_DIR + "index.html", "w").write("\n".join(html))

250
doc/jstoxml.py

@ -1,250 +0,0 @@
#!/usr/bin/env python
#-*- indent-tabs-mode: nil-*-
import sys
import io
import os
import xml.etree.ElementTree as ET
# Constant objects
ITEM_TYPE_OBJECT = 0
ITEM_TYPE_FUNCTION = 1
ITEM_TYPE_FILE = 2
# Reads a file and return the lines (as an array)
def readFile(filename):
_file = open(filename, "r")
content = _file.readlines()
_file.close()
return content
# Gets a "function block", i.e. those starting and ending with "{" and "}",
# e.g. a function/prototype declaration
#
# Returns [start, end], where "start" and "end" are the line numbers of the start and end of the block
def getFunctionBlock(lines, init_line = 0):
brackets = 0 # Number of "{" - Number of "}"
start = 0 # Starting line number of the block
end = 0 # Ending line number of the block
i = init_line
try:
while "{" not in lines[i]:
i = i + 1
# Now we are at the first line of the block
start = i
brackets = brackets + lines[i].count("{") - lines[i].count("}")
except:
start = i-1
try:
while brackets > 0:
i = i + 1
brackets = brackets + lines[i].count("{") - lines[i].count("}")
end = i
except:
end = i - 1
return [start,end]
def getCommentBlock(lines, init_line = 0):
i = init_line
try:
while "/**" not in lines[i]:
i = i + 1
except:
i = i - 1
start = i
try:
while "*/" not in lines[i]:
i = i + 1
except:
i = i - 1
end = i
return [start,end]
def parseCommentBlock(lines):
try:
del lines[0], lines[-1] # Strip first and last line
itemType = None
itemName = ""
itemProps = []
itemDescription = ""
# Parse the file
# Strip the " * " part
for i in range(len(lines)):
lines[i] = lines[i].lstrip()
lines[i] = lines[i][1:]
lines[i] = lines[i].lstrip()
lines[i] = lines[i].replace("\n", "")
nameLine = lines[0].strip()
if nameLine.find("#") == 0:
itemType = ITEM_TYPE_OBJECT
itemName = nameLine[1:]
elif nameLine.find("FILE:") == 0:
itemType = ITEM_TYPE_FILE
itemName = nameLine[5:].lstrip()
else:
itemType = ITEM_TYPE_FUNCTION
itemName = nameLine
itemName = itemName.replace(":","") # Remove the : at the end of definition
del lines[0]
# Item properties
propName = ""
i = 0
while len(lines) > 0 and len(lines[0].strip()) != 0:
line = lines[0]
if ("@" in line):
line = line[1:] # Strip "@" sign
propName = line[:line.find(":")].encode()
line = line[line.find(":")+1:]
itemProps.append([propName, ""])
itemProps[-1][1] = itemProps[-1][1] + line + " "
del lines[0]
# Item description
if len(lines) > 0:
del lines[0] # Remove separating linebreak
while len(lines) > 0 and lines[0].find("Returns") == -1:
itemDescription = itemDescription + " " + lines[0].strip()
del lines[0]
itemDescription = itemDescription.replace(" ", "\n\n")
# Return data
returnData = " ".join(lines)
if len(returnData.strip()) > 0:
returnData = returnData.strip()[7:] # Strip "Returns"
returnData = returnData.split(":") # Split into return type and
returnData[0] = returnData[0].strip() # Strip whitespaces again
returnData[0] = returnData[0][1:-1] # Remove brackets
returnData[1] = returnData[1].strip() # Strip whitespaces
else:
returnData = ["void", None]
return [itemType, itemName, itemProps, itemDescription, returnData]
except Exception:
return [None, None, None, None, None]
def addVariables(element, variables):
for i in variables:
_name = i[0]
_desc = i[1]
hasType = "(" in _name
if hasType:
propName = _name[:_name.find("(")].strip()
propType = _name[_name.find("(") + 1: _name.rfind(")")]
else:
propName = _name
propType = ""
prop = ET.SubElement(element, 'prop', {'name': propName, 'type': propType})
prop.text = _desc
def createFunctionElement(element, itemName, itemProps, itemDescription, itemReturn):
name = ET.SubElement(element, 'name')
name.text = itemName
desc = ET.SubElement(element, 'description')
desc.text = itemDescription
addVariables(element, itemProps)
# Set the return
ret = ET.SubElement(element, 'return', {'type': itemReturn[0]})
if itemReturn[1]:
ret.text = itemReturn[1]
return element
def convertJStoXML(filename):
lines = readFile(filename)
shortFileName = filename[filename.rfind("/")+1:]
root = ET.Element('file')
name = ET.SubElement(root, 'name')
name.text = shortFileName
xmlTree = ET.ElementTree(root)
while (len(lines)> 0):
[start, end] = getCommentBlock(lines)
if start == end:
break
newlines = lines[start:end+1]
[itemType, itemName, itemProps, itemDescription, itemReturn] = parseCommentBlock(newlines)
if itemType == ITEM_TYPE_FILE:
# Check that this refers to the current file
if itemName != shortFileName:
del lines[:end]
continue;
desc = ET.SubElement(root, 'description')
desc.text = itemDescription
addVariables(root, itemProps)
if itemType == ITEM_TYPE_FUNCTION:
# Check that this refers to the correct function
_start = end
[_start, _end] = getFunctionBlock(lines, _start)
if "function" + itemName + "(" not in lines[_start].replace(" ",""):
del lines[:_end]
continue
element = ET.SubElement(root, 'function')
createFunctionElement(element, itemName, itemProps, itemDescription, itemReturn)
if itemType == ITEM_TYPE_OBJECT:
element = ET.SubElement(root, 'object')
name = ET.SubElement(element, 'name')
name.text = itemName
desc = ET.SubElement(element, 'description')
desc.text = itemDescription
addVariables(element, itemProps)
# Find range of object declaration
_start = end
[_start, _end] = getFunctionBlock(lines, _start)
while lines[_start].strip().find(itemName + ".prototype") != 0:
_start = _end
[_start, _end] = getFunctionBlock(lines, _start)
inlines = lines[_start:_end+1]
end = _end
# Parse the functions inside
while len(inlines) > 0:
[inStart, inEnd] = getCommentBlock(inlines)
if inStart == inEnd:
break
newLines = inlines[inStart:inEnd+1]
[itemType, itemName, itemProps, itemDescription, itemReturn] = parseCommentBlock(newLines)
if itemType == ITEM_TYPE_FUNCTION:
__start = inStart
[__start, __end] = getFunctionBlock(inlines, __start)
if itemName + ":function(" not in inlines[__start].replace(" ", ""):
del inlines[:__end]
continue
subelement = ET.SubElement(element, 'function')
createFunctionElement(subelement, itemName, itemProps, itemDescription, itemReturn)
del inlines[:inEnd]
del lines[:end]
return xmlTree

82
doc/style.css

@ -1,82 +0,0 @@
body {
}
.page-header {
font-size: 180%;
font-weight: bold;
}
h2 {
font-family: Cantarell, 'Droid Sans', Ubuntu, 'DejaVu Sans', Arial, sans-serif;
color: #0489b7;
}
.index-page-list {
}
.description{
}
.prop-prop-separator {
color: #babdb6;
background: #babdb6;
border: none 0px;
height: 1px;
clear: both;
}
.obj-obj-separator {
}
.prop-table{
background: #eeeeee;
border: solid 1px #babdb6;
padding: 0.5em;
}
.prop-table-return {
}
.prop-table-name {
padding-left: 50px;
}
.prop-table-arg {
padding-left: 50px;
}
.prop-table-arg-type {
color: #666;
}
.prop-table-arg-name {
}
.prop-table-line-break {
height: 5px;
}
.prop-arg-table {
padding-left: 50px;
}
.prop-arg-name {
background-color: #e5e5e5;
padding: 2px 5px;
}
.prop-arg-description {
padding-left: 5px;
}
n
.prop-return-name {
background-color: #ccc;
padding: 2px 5px;
}
.prop-return-description {
padding-left: 5px;
}
.individual-prop-header {
font-size: 110%;
font-weight: bold;
}

189
doc/xmltohtml.py

@ -1,189 +0,0 @@
#!/usr/bin/env python
#-*- indent-tabs-mode: nil-*-
import sys
import io
import os
import xml.etree.ElementTree as ET
def loadVarRow(item, elementName, link):
html = []
html.extend(["<tr>",
"<td><code class=\"prop-table-type\">%s</code></td>" % item[1],
"<td>"])
if link:
html.extend(["<a href=\"#%s.%s\">" % (elementName, item[0])])
html.extend(["<code class=\"prop-table-name\">%s</code>" % item[0]])
if link:
html.extend(["</a>"])
html.extend(["</td>",
"</tr>"])
return html
def loadFunctionRow(item, elementName, link):
html = []
html.extend(["<tr>",
"<td><code class=\"prop-table-return\">%s</code></td>" % item[3].get("type"),
"<td>"])
if link:
html.extend(["<a href=\"#%s.%s\">" % (elementName, item[0])])
html.extend(["<code class=\"prop-table-name\">%s</code>" % item[0]])
if link:
html.extend(["</a>"])
html.extend(["</td>",
"<td class=\"prop-table-arg\">("])
for prop in item[2]:
html.extend(["<code class=\"prop-table-arg-type\">%s</code>" % prop.get("type"),
"<code class=\"prop-table-arg-name\">%s,</code>"% prop.get("name"),
"</td></tr><tr><td /><td /><td class=\"prop-table-arg\">&nbsp"])
if len(item[2]) > 0:
del html[-1] # Delete the previous end line
html[-1] = html[-1].replace(",", "") # Delete the comma
html.extend([")</td>",
"</tr>"])
return html
def loadElement(element, elementName):
html = []
# Load short description
for child in element:
if child.tag == "short-description":
if child.text:
html.extend(["<p class=\"short-description\">",
child.text.replace("\n", "<br />"),
"</p>"])
# Load function and variable lists
var_list = []
for child in element:
if child.tag == "prop":
var_list.append([child.get("name"), child.get("type"), child.text])
functions_list = []
for child in element:
if child.tag == "function":
functions_list.append([child.findtext("name"), child.findtext("description").replace("\n", "<br />"), child.findall("prop"), child.find("return")])
# Load synopsis
if len(functions_list) > 0 or len(var_list) > 0:
html.extend(["<h2>Synopsis</h2>"]);
html.extend(["<table class=\"prop-table\">"])
for item in functions_list:
html.extend(loadFunctionRow(item, elementName, True))
html.extend(["<tr class=\"prop-table-line-break\" />"])
for item in var_list:
html.extend(loadVarRow(item, elementName, True))
html.extend(["<tr class=\"prop-table-line-break\" />"])
html.extend(["</table>"])
# Load long description
for child in element:
if child.tag == "description":
if child.text:
html.extend(["<h2>Description</h2>"]);
html.extend(["<p class=\"description\">",
child.text.replace("\n", "<br />"),
"</p>"])
break
# Load individual functions
if len(functions_list) > 0:
html.extend(["<h2>Details</h2>"])
for item in functions_list:
# Header
html.extend(["<br /><a id=\"%s.%s\" class=\"individual-prop-header\">%s ()</a>" % (elementName, item[0], item[0])])
# Table showing format of function (similar to that in function list)
html.extend(["<table class=\"prop-table\">"])
html.extend(loadFunctionRow(item, elementName, False))
html.extend(["</table>"])
# Description of the function
html.extend(["<p class=\"prop-description\">%s</p>" % item[1]])
# List arguments and relevant descriptions
html.extend(["<table class=\"prop-arg-table\">"])
if len(item[2]) > 0:
for prop in item[2]:
html.extend(["<tr>",
"<td class=\"prop-arg-name\">",
prop.get("name"),
"</td><td class=\"prop-arg-description\">",
prop.text,
"</td></tr>"])
if item[3].text:
html.extend(["<tr>",
"<td class=\"prop-return-name\">",
"Return",
"</td><td class=\"prop-return-description\">",
item[3].text,
"</td></tr>"])
html.extend(["</table>"])
# Add separator
html.extend(["<hr class=\"prop-prop-separator\" />"])
for item in var_list:
html.extend(["<br /><a id=\"%s.%s\" class=\"individual-prop-header\">%s</a>" % (elementName, item[0], item[0])])
# Table showing the variable (similar to that in function list)
html.extend(["<table class=\"prop-table\">"])
html.extend(loadVarRow(item, elementName, False))
html.extend(["</table>"])
# Description of the variable
html.extend(["<p class=\"prop-description\">%s</p>" % item[2]])
# Add separator
html.extend(["<hr class=\"prop-prop-separator\" />"])
# Remove last separator
del html[-1]
return html
def convertXMLtoHTML(xml):
tree = ET.parse(xml)
root = tree.getroot()
html = []
_name = root.find("name").text
name = _name[0].upper() + _name[1:-3]
# Standard HTML heading
html.extend(["<!DOCTYPE html>",
"<html>",
"<head>",
"<title>%s</title>" % name,
"<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />\n</head>",
"<body>",
"<p class=\"page-header\">%s</p>" % name])
html.extend(loadElement(root, name))
objects_list = []
for child in root:
if child.tag == "object":
objects_list.append(child)
for item in objects_list:
# Add separator
html.extend(["<hr class=\"obj-obj-separator\" />"])
# Show header
html.extend(["<h2>%s.%s</h2>" % (name, item.findtext("name"))])
html.extend(loadElement(item, name + "." + item.findtext("name")))
# Standard HTML ending
html.extend(["</body>",
"</html>"])
return "\n".join(html)

1
docs/Makefile.am

@ -0,0 +1 @@
SUBDIRS = reference

488
docs/applets-examples/finder@cinnamon.org/applet.js

@ -0,0 +1,488 @@
const Lang = imports.lang;
const Applet = imports.ui.applet;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Gio = imports.gi.Gio;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('cinnamon-applets');
const PopupMenu = imports.ui.popupMenu;
const St = imports.gi.St;
const Mainloop = imports.mainloop;
const Cinnamon = imports.gi.Cinnamon;
const Main = imports.ui.main;
const Settings = imports.ui.settings;
const _ = Gettext.gettext;
const SearchProviderManager = imports.ui.searchProviderManager;
const Clutter = imports.gi.Clutter;
const RESULT_TYPES_LABELS =
{
software: _("Software"),
pictures: _("Pictures"),
videos: _("Videos"),
music: _("Music"),
folders: _("Folders"),
files: _("Other Files"),
provider: _("Other Results")
}
function SearchProviderResultButton(applet, provider, result) {
this._init(applet, provider, result);
}
SearchProviderResultButton.prototype = {
__proto__: PopupMenu.PopupBaseMenuItem.prototype,
_init: function(applet, provider, result) {
this.provider = provider;
this.result = result;
this._applet = applet;
PopupMenu.PopupBaseMenuItem.prototype._init.call(this, {focusOnHover: false});
this.icon = null;
if (result.icon){
this.icon = result.icon;
}else if (result.icon_app){
this.icon = result.icon_app.create_icon_texture(16);
}else if (result.icon_filename){
this.icon = new St.Icon({gicon: new Gio.FileIcon({file: Gio.file_new_for_path(result.icon_filename)}), icon_size: 16});
}
if (this.icon){
this.addActor(this.icon);
}
this.label = new St.Label({ text: result.label });
this.addActor(this.label);
if (this.icon) {
this.icon.realize();
}
this.label.realize();
this.connect('activate', Lang.bind(this, this._on_activate));
},
_onButtonReleaseEvent: function (actor, event) {
if (event.get_button() == 1){
this.activate(event);
}
return true;
},
_on_activate: function(event) {
try{
this.provider.on_result_selected(this.result);
this._applet._search_menu.close();
}
catch(e)
{
global.logError(e);
}
}
}
function ApplicationResultButton(applet, app)
{
this._init(applet, app);
}
ApplicationResultButton.prototype =
{
__proto__: PopupMenu.PopupBaseMenuItem.prototype,
_init: function(applet, app)
{
PopupMenu.PopupBaseMenuItem.prototype._init.call(this, {focusOnHover: false});
this._app = app;
this._applet = applet;
this.icon = this._app.create_icon_texture(16);
this.addActor(this.icon);
this.name = this._app.get_name();
this.label = new St.Label(
{
text: this.name
});
this.label.set_style("width: 180px;");
this.addActor(this.label);
this.icon.realize();
this.label.</