Browse Source

Imported Upstream version 2.6.0

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

+ 1
- 1
Makefile.am View File

@@ -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 \


+ 2719
- 1995
cinnamon.pot
File diff suppressed because it is too large
View File


+ 24
- 10
configure.ac View File

@@ -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


+ 0
- 3
data/Makefile.am View File

@@ -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 \


+ 89
- 72
data/org.cinnamon.gschema.xml.in View File

@@ -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>


+ 94
- 102
data/theme/cinnamon.css View File

@@ -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;
}

+ 0
- 12
data/theme/player-paused.svg View File

@@ -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>

+ 0
- 9
data/theme/player-playing.svg View File

@@ -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>

+ 0
- 9
data/theme/player-stopped.svg View File

@@ -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>

+ 0
- 37
doc/README.md View File

@@ -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
*/


+ 0
- 64
doc/create-doc.py View File

@@ -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))


+ 0
- 250
doc/jstoxml.py View File

@@ -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

+ 0
- 82
doc/style.css View File

@@ -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;
}

+ 0
- 189
doc/xmltohtml.py View File

@@ -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
- 0
docs/Makefile.am View File

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

+ 488
- 0
docs/applets-examples/finder@cinnamon.org/applet.js View File

@@ -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.realize();
this.connect('activate', Lang.bind(this, this._on_activate));
},
_on_activate: function()
{
this._applet._search_menu.close();
this._app.open_new_window(-1);
}
}

function FileResultButton(applet, result, type)
{
this._init(applet, result, type);
}

FileResultButton.prototype =
{
__proto__: PopupMenu.PopupBaseMenuItem.prototype,
_init: function(applet, result, type, custom_label)
{
PopupMenu.PopupBaseMenuItem.prototype._init.call(this, {focusOnHover: false});
this._filename = result["url"];
this._applet = applet;
try
{
let icon = Cinnamon.util_get_icon_for_uri(this._filename);
if (icon)
{
this.icon = St.TextureCache.get_default().load_gicon(null, icon, 16);
}
}
catch (e)
{
}
if (!this.icon)
{
this.icon = new St.Icon(
{
icon_name: (type == "files" ? "gtk-file" : "folder"),
icon_size: 16,
icon_type: St.IconType.FULLCOLOR
});
}
this.addActor(this.icon);
this.label = new St.Label(
{
text: (custom_label ? custom_label : decodeURIComponent(this._filename))
});
this.addActor(this.label);
this.icon.realize();
this.label.realize();
this.connect('activate', Lang.bind(this, this._on_activate));
},
_on_activate: function()
{
this._applet._search_menu.close();
Util.trySpawn(["xdg-open", this._filename]);
}
}

function MusicResultButton(applet, result, type)
{
this._init(applet, result, type);
}

MusicResultButton.prototype =
{
__proto__: FileResultButton.prototype,
_init: function(applet, result, type)
{
var basename = result["url"].split("/");
basename = decodeURIComponent(basename[basename.length - 1]);
var label = (result["performer"] ? result["performer"] + " - " : "") + (result["musicAlbum"] ? result["musicAlbum"] + " - " : "") + (result["trackNumber"] ? result["trackNumber"] + " - " : "") + (result["title"] ? result["title"] : basename);
FileResultButton.prototype._init.call(this, applet, result, type, label.trim());
}
}

function MyApplet(orientation, panel_height, instanceId)
{
this._init(orientation, panel_height, instanceId);
}

MyApplet.prototype =
{
__proto__: Applet.IconApplet.prototype,

_init: function(orientation, panel_height, instanceId)
{
try
{
Applet.IconApplet.prototype._init.call(this, orientation, panel_height, instanceId);
menuItem = new Applet.MenuItem(_("Indexing Preferences"), null, Lang.bind(this, function(actor, event)
{
Util.spawnCommandLine('tracker-preferences');
}));
this._applet_context_menu.addMenuItem(menuItem);
this.settings = new Settings.AppletSettings(this, "finder@cinnamon.org", instanceId);
this.settings.bindProperty(Settings.BindingDirection.IN,
"launch_shortcut",
"launch_shortcut",
this.on_launch_shortcut_changed,
null);
this.set_applet_icon_name("edit-find-symbolic");
this.set_applet_tooltip(_("Search using search providers"));

let menuManager = new PopupMenu.PopupMenuManager(this);
this._search_menu = new Applet.AppletPopupMenu(this, orientation);
menuManager.addMenu(this._search_menu);

let section = new PopupMenu.PopupMenuSection();
this._search_menu.addMenuItem(section);

this.searchEntry = new St.Entry(
{
name: 'menu-search-entry',
hint_text: _("Type to search..."),
track_hover: true,
can_focus: true
});
section.actor.set_style("padding: 10px;");
this._searchInactiveIcon = new St.Icon(
{
style_class: 'menu-search-entry-icon',
icon_name: 'edit-find',
icon_type: St.IconType.SYMBOLIC
});
this.searchEntry.set_secondary_icon(this._searchInactiveIcon);
this._search_menu.actor.connect('key-release-event', Lang.bind(this, this._onKeyPress));

section.actor.add_actor(this.searchEntry);
this._scrollBox = new St.ScrollView(
{
x_fill: true,
y_fill: false,
y_align: St.Align.START
});
this._scrollBox.set_style("width: 500px;");
this._search_menu.addActor(this._scrollBox);
this._container = new St.BoxLayout(
{
vertical:true
});
this._scrollBox.add_actor(this._container);
this._scrollBox.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
this._scrollBox.set_auto_scrolling(true);

this.searchEntryText = this.searchEntry.clutter_text;
this.searchEntryText.connect('text-changed', Lang.bind(this, this._onSearchTextChanged));
this._search_timer = null;
this._appSys = Cinnamon.AppSystem.get_default();
this.on_launch_shortcut_changed();
}
catch(e)
{
global.logError(e);
}
},
_onKeyPress: function(actor, event)
{
let symbol = event.get_key_symbol();
if (symbol != Clutter.KEY_Up && symbol != Clutter.KEY_Down)
{
global.stage.set_key_focus(this.searchEntry);
}
},
on_launch_shortcut_changed: function()
{
Main.keybindingManager.addHotKey("finder_launch", this.launch_shortcut, Lang.bind(this, this.launch));
},

_onSearchTextChanged: function(se, prop)
{
let searchString = this.searchEntry.get_text();

if (searchString != "")
{
if (this._search_timer)
{
Mainloop.source_remove(this._search_timer);
this._search_timer = null;
}
this._search_timer = Mainloop.timeout_add(300, Lang.bind(this, function()
{
this._search_timer = null;
this._process_search(searchString);
}));
}
},
_process_search: function(searchString)
{
this._currentSearchString = searchString;
var children = this._container.get_children();
var result_type;
for (var i in children)
{
children[i].destroy();
}
SearchProviderManager.launch_all(searchString, Lang.bind(this, function(provider, results, searchString){
query_results = {};
for (var i in results){
result_type = (results[i].type ? results[i].type : 'provider');
if (!query_results[result_type])
{
query_results[result_type] = new Array();
}
results[i].type = 'provider';
results[i].provider = provider;
results[i].id = 'provider-' + results[i].id;
results[i].id = 'provider-' + results[i].id;
query_results[result_type].push(results[i]);
}
this._show_results(searchString, query_results);
}, searchString));
},
_show_results: function(searchString, results)
{
if (searchString != this._currentSearchString)
{
return;
}
var results_buttons = {};
let button;
let this_results;
var all_result_types = new Array();
for (var result_type in results)
{
this_results = results[result_type];
if (this_results.length > 0)
{
all_result_types.push(result_type);
results_buttons[result_type] = new Array();
for (var i in this_results)
{
button = null;
switch (result_type)
{
case 'provider':
button = new SearchProviderResultButton(this, this_results[i]['provider'], this_results[i]);
break;
case "software":
var results_parts = this_results[i]["url"].split("/");
let app = this._appSys.lookup_app(results_parts[results_parts.length - 1].split(".desktop")[0] + ".desktop");
if (app)
{
let appinfo = app.get_app_info();
if (!appinfo || !appinfo.get_nodisplay())
{
button = new ApplicationResultButton(this, app);
}
}
break;
case "music":
button = new MusicResultButton(this, this_results[i], result_type);
break;
case "pictures":
case "videos":
case "folders":
case "files":
button = new FileResultButton(this, this_results[i], result_type);
break;
}
if (button != null)
{
button.actor.connect("notify::hover", Lang.bind(this, this._scrollToButton));
button.actor.connect("key-focus-in", Lang.bind(this, this._scrollToButton));
if (result_type == 'provider')
{
if (!results_buttons['provider-' + SearchProviderManager.extensionMeta[this_results[i]['provider'].uuid].name])
{
all_result_types.push('provider-' + SearchProviderManager.extensionMeta[this_results[i]['provider'].uuid].name);
results_buttons['provider-' + SearchProviderManager.extensionMeta[this_results[i]['provider'].uuid].name] = new Array();
}
results_buttons['provider-' + SearchProviderManager.extensionMeta[this_results[i]['provider'].uuid].name].push(button);
}
else
{
results_buttons[result_type].push(button);
}
}
}
}
}
all_result_types.sort(function(a, b)
{
var order = ["software", "music", "pictures", "videos", "folders", "files", "provider"];
return order.indexOf(a) - order.indexOf(b);
});
let this_results_buttons, label;
for (var i in all_result_types)
{
result_type = all_result_types[i];
this_results_buttons = results_buttons[result_type];
if (this_results_buttons.length > 0)
{
if (this._container.get_children().length > 0)
{
var separator = new PopupMenu.PopupSeparatorMenuItem();
this._container.add_actor(separator.actor);
}
if (result_type.substring(0, 9) == 'provider-')
{
label = result_type.substring(9);
}
else
{
label = RESULT_TYPES_LABELS[result_type];
}
var result_type_label = new PopupMenu.PopupMenuItem(label,
{
reactive: false,
hover: false,
sensitive: false,
focusOnHover: true
});
result_type_label.actor.set_style("font-weight: bold;");
this._container.add_actor(result_type_label.actor);
for (var i in this_results_buttons)
{
this._container.add_actor(this_results_buttons[i].actor);
}
}
}
},

on_applet_clicked: function(event)
{
if (event.get_button() == 1)
{
this.launch();
}
},
launch: function()
{
this._search_menu.toggle();
global.stage.set_key_focus(this.searchEntry);
this.searchEntryText.set_selection(0, this.searchEntry.get_text().length);
},
_scrollToButton: function(button)
{
var current_scroll_value = this._scrollBox.get_vscroll_bar().get_adjustment().get_value();
var box_height = this._scrollBox.get_allocation_box().y2 - this._scrollBox.get_allocation_box().y1;
var new_scroll_value = current_scroll_value;
if (current_scroll_value > button.get_allocation_box().y1 - 10) new_scroll_value = button.get_allocation_box().y1 - 10;
if (box_height + current_scroll_value < button.get_allocation_box().y2 + 10) new_scroll_value = button.get_allocation_box().y2-box_height + 10;
if (new_scroll_value != current_scroll_value) this._scrollBox.get_vscroll_bar().get_adjustment().set_value(new_scroll_value);
}
}

function main(metadata, orientation, panel_height, instanceId)
{
let myApplet = new MyApplet(orientation, panel_height, instanceId);
return myApplet;
}

+ 6
- 0
docs/applets-examples/finder@cinnamon.org/metadata.json View File

@@ -0,0 +1,6 @@
{
"uuid": "finder@cinnamon.org",
"name": "Search using search providers",
"description": "Search using search providers",
"icon": "edit-find-symbolic"
}

+ 7
- 0
docs/applets-examples/finder@cinnamon.org/settings-schema.json View File

@@ -0,0 +1,7 @@
{
"launch_shortcut": {
"type" : "keybinding",
"default" : "<Super>F1",
"description" : "Keyboard shortcut to show the search entry"
}
}

+ 1
- 0
docs/reference/Makefile.am View File

@@ -0,0 +1 @@
SUBDIRS = cinnamon cinnamon-js st

+ 106
- 0
docs/reference/cinnamon-js/Makefile.am View File

@@ -0,0 +1,106 @@
## Process this file with automake to produce Makefile.in
$(DOC_MAIN_SGML_FILE): $(top_srcdir)/js/*/* gen_lib.py gen_doc.py tutorials.xml tutorials/*
./gen_doc.py $(top_srcdir) $(PACKAGE_VERSION)

# we want $(DOC_MAIN_SGML_FILE) to be built before sgml-build
# and sgml-build depends on $(DOC_MODULE)-sections.txt
$(DOC_MODULE)-sections.txt: $(DOC_MAIN_SGML_FILE)

# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6

# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
# of using the various options.

# The name of the module, e.g. 'glib'.
DOC_MODULE=cinnamon-js

# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
#DOC_MODULE_VERSION=2


# The top-level SGML file. You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml

# Directories containing the source code
# gtk-doc will search all .c and .h files beneath these paths
# for inline comments documenting functions and macros.
DOC_SOURCE_DIR=

# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=

# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
SCAN_OPTIONS=--rebuild-types

# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
MKDB_OPTIONS=--xml-mode --output-format=xml

# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
MKTMPL_OPTIONS=

# Extra options to supply to gtkdoc-mkhtml
MKHTML_OPTIONS=

# Extra options to supply to gtkdoc-fixref. Not normally needed.
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
FIXXREF_OPTIONS=

# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=
CFILE_GLOB=

# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
EXTRA_HFILES=

# Header files or dirs to ignore when scanning. Use base file/dir names
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
IGNORE_HFILES=

# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
HTML_IMAGES=

# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
# These files must be listed here *and* in content_files
# e.g. expand_content_files=running.sgml
expand_content_files=

# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=
GTKDOC_LIBS=

# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make

# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST +=

# Files not to distribute
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
DISTCLEANFILES = $(DOC_MODULES).types

# Comment this out if you want 'make check' to test you doc status
# and run some sanity checks
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = cd $(srcdir) && \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
#TESTS = $(GTKDOC_CHECK)
endif

-include $(top_srcdir)/git.mk

+ 283
- 0
docs/reference/cinnamon-js/gen_doc.py View File

@@ -0,0 +1,283 @@
#!/usr/bin/env python
# coding: utf-8

# This parser starts by parsing all the javascript code, and representing each
# file/object/function as a python class. Afterwards, each object is gone
# through individually to produce the gtk-doc-friendly xml files
#
# The parsers uses the concept of state. At each line, the parser takes a
# particular state, and behaves accordingly. Conversely, the contents of the
# lines can cause the parser to change state.

# In normal text, the parser is in STATE_NORMAL, in which all it does is keep
# track of scopes and the number of '{' and '}' brackets. In a comment block
# that is not documentation, the parser takes STATE_COMMENT and ignores
# everything until we leave the comment.
<