1. 12 Jul, 2019 11 commits
    • Florian Müllner's avatar
      panel: Relax check for existing signal handler · 16ca7a21
      Florian Müllner authored
      Object.prototype.hasOwnProperty() is more precise than checking for
      falsiness, for instance the following is true:
        { foo: undefined }.hasOwnProperty('foo');
      However when checking for a handler ID, a more relaxed check is more
      appropriate, as particularly 0 is not a valid handler ID.
    • Florian Müllner's avatar
      cleanup: Don't call method via a parent's prototype · 1b31fd5a
      Florian Müllner authored
      We cannot disconnect a signal handler via the usual disconnect() as
      nm_device_disconnect() shadows the GObject method, but we can use
    • Florian Müllner's avatar
      lint: Add "legacy" configuration · e0457b6d
      Florian Müllner authored
      Regarding coding style, gjs is moving in a direction that departs quite
      significantly from the established style, in particular when indenting
      multi-line array/object literals or method arguments:
      Currently we are keeping those elements aligned, while the gjs rules now
      expect them to use the regular 4-space indentation.
      There are certainly good arguments that can be made for that move - it's
      much less prone to leading to overly-long lines, and matches popluar JS
      styles elsewhere. But switching coding style implies large diffs which
      interfere with git-blame and friends, so in order to allow for a more
      gradual change, add a separate set of "legacy" rules that match more
      closely the style we would expect up to now.
      It also disables the rules for quotes and template strings - the former
      because we cannot match the current style to use double-quotes for
      translatable strings and single-quotes otherwise, the latter because
      template strings are still relatively new, so we haven't adopted them
    • Florian Müllner's avatar
      lint: Allow multiple spaces before key values · 42b77e7b
      Florian Müllner authored
      This is useful for imitating namespaced flags/enums:
      const FooFlags = {
          NONE:    0,
          SMEAGLY: 1 << 0,
          SMOGLEY: 1 << 1,
          MUGGLY:  1 << 2
    • Florian Müllner's avatar
      lint: Enforce camelCase · f6bed089
      Florian Müllner authored
      All variables should be in camelCase, so configure the corresponding
      rule to enforce this. Exempt properties for now, to accommodate the
      existing practice of using C-style underscore names for construct
      properties of introspected objects.
    • Florian Müllner's avatar
      lint: Enforce arrow notation · 5f77cdb0
      Florian Müllner authored
      We replaced all Lang.bind() calls with arrow functions or the standardized
      Function.prototype.bind(), at least for the former eslint has some options
      to ensure that the old custom doesn't sneak back in.
    • Florian Müllner's avatar
      lint: Require spaces inside braces in object literals · 109b8e8f
      Florian Müllner authored
      Prohibiting spaces where the established GNOME style has required
      them for a decade would be a harsh change for no good reason.
    • Florian Müllner's avatar
      lint: Tweak the whitelist of globals · 4c0bd88a
      Florian Müllner authored
      gjs doesn't include any gettext wrappers, and obviously can't know
      about the shell's global object, so include those in the list of
      globals for all sources in the gnome-shell context.
    • Florian Müllner's avatar
      lint: Import eslint rules from gjs · 3731be99
      Florian Müllner authored
      gjs started to run eslint during its CI a while ago, so there is an
      existing rules set we can use as a starting point for our own setup.
      As we will adapt those rules to our code base, we don't want those
      changes to make it harder to synchronize the copy with future gjs
      changes, so include the rules from a separate file rather than using
      the configuration directly.
    • Florian Müllner's avatar
      workspacesView: Work around spurious allocation changes · 6cc19ee6
      Florian Müllner authored
      For some reason, people are still seeing those after commit d5ebd8c8.
      While this is something we really should figure out, we can work around
      the issue by keeping the view actors hidden until the update is complete.
    • Florian Müllner's avatar
      cleanup: Remove bogus file · 1570f838
      Florian Müllner authored
      This was accidentally added in commit 14d7897a.
  2. 11 Jul, 2019 1 commit
  3. 10 Jul, 2019 5 commits
  4. 09 Jul, 2019 4 commits
  5. 08 Jul, 2019 4 commits
  6. 07 Jul, 2019 2 commits
    • Florian Müllner's avatar
      st: Consider non-background properties for ::style-changed · be40de5a
      Florian Müllner authored
      st_theme_node_paint_equal() was originally added to preserve paint state
      when a style change didn't affect any of StWidget's cached background
      That's why using it for filtering out unneeded style changes as in commit
      f662864a misses any non-background related properties that are relevant
      for subclasses. Add additional tests to make sure we keep emitting the
      signal in those cases.
    • Florian Müllner's avatar
      st: Add st_icon_colors_equal() · 7359e431
      Florian Müllner authored
      This is a small convenience wrapper around clutter_color_equal()
      for the different color components, which also handles the case
      where one (or both) of the icon colors are %NULL.
  7. 05 Jul, 2019 5 commits
    • Florian Müllner's avatar
      params: Fix regression · 8a5de327
      Florian Müllner authored
      The first parameter to Object.assign() is the same target object that
      will be returned. That is, since commit 46874eed Params.parse() modifies
      the @defaults object. Usually we pass that parameter as an object literal
      and this isn't an issue, but the change breaks spectacularly in the few
      cases where we use a re-usable variable.
      Restore the previous behavior by copying the object first.
    • Florian Müllner's avatar
      tests: Add Params.parse() unit tests · 1778adae
      Florian Müllner authored
      Commit 46874eed accidentally changed the behavior of the function in
      an incompatible way. Before addressing the actual issue, add a reproducer
      to the unit tests to hopefully prevent future breakage.
    • Florian Müllner's avatar
      cleanup: Prefer template strings · 0d035a4e
      Florian Müllner authored
      Template strings are much nicer than string concatenation, so use
      them where possible; this excludes translatable strings and any
      strings containing '/' (until we can depend on gettext >= 0.20[0]).
      [0] https://savannah.gnu.org/bugs/?50920
    • Florian Müllner's avatar
      params: Simplify code · 46874eed
      Florian Müllner authored
      Standard javascript now has Object.assign() which is very similar to
      Params.parse(), except that the latter by default disallows "extra"
      parameters. We can still leverage the standard API by simply
      implementing the error check, and then call out to Object.assign()
      for the actual parameter merging.
    • Florian Müllner's avatar
      ibusManager: Use Map to store engines · e95f3feb
      Florian Müllner authored
      This is a clear case of key->value mapping, so using the corresponding
      data type makes sense.
  8. 04 Jul, 2019 1 commit
    • verdre's avatar
      st/button: Ungrab device before calling st_button_release · 0bdd1b6f
      verdre authored
      Since priv->device gets set to NULL inside st_button_release, ungrab the
      input device before calling st_button_release and avoid
      clutter_input_device_ungrab failing with a critical error.
      This fixes a regression introduced with
      While at it, also remove the superfluous line resetting priv->device to
      NULL and move the check for priv->grabbed into an elseif block since
      there should be no case where StButton has both grabs at the same time.
  9. 03 Jul, 2019 1 commit
  10. 02 Jul, 2019 6 commits
    • Frederik F's avatar
      OSK variables and key rounding · 915415d9
      Frederik F authored
      - generate the OSK key colors from variables in _colors.scss without changing the design
      - add hover and active colors for all key, not only letter keys
      - use $button_radius for the OSK keys, buttons and entries (no value change for the latter)
    • Florian Müllner's avatar
      style: Stop using braces for single-line arrow functions · 14d7897a
      Florian Müllner authored
      Braces are optional for single-line arrow functions, but there's a
      subtle difference:
      Without braces, the expression is implicitly used as return value; with
      braces, the function returns nothing unless there's an explicit return.
      We currently reflect that in our style by only omitting braces when the
      function is expected to have a return value, but that's not very obvious,
      not an important differentiation to make, and not easy to express in an
      automatic rule.
      So just omit braces consistently as mandated by gjs' coding style.
    • Florian Müllner's avatar
      style: Fix indentation errors · 1398aa65
      Florian Müllner authored
      While we have some style inconsistencies - mostly regarding split lines,
      i.e. aligning to the first arguments vs. a four-space indent - there are
      a couple of places where the spacing is simply wrong. Fix those.
      Spotted by eslint.
    • Florian Müllner's avatar
      cleanup: Use arrow functions for tweener callbacks · 8fcd6c71
      Florian Müllner authored
      While it is legal to use method syntax for the function properties
      here, arrow notation is less unexpected and allows us to drop the
      separate scope properties.
    • Florian Müllner's avatar
      cleanup: Use consistent switch indentation · 6ed5bc2f
      Florian Müllner authored
      We are currently inconsistent on whether case labels share the same
      indentation level as the corresponding switch statement or not. gjs
      goes with the default of no additional indentation, so go along with
    • Florian Müllner's avatar
      cleanup: Use spaces for indentation · 5ec4c2e4
      Florian Müllner authored
      Our indentation style has always mandated spaces, but over the years
      some tabs sneaked in. Fix up those places.