1. 15 Jul, 2019 5 commits
    • verdre's avatar
    • verdre's avatar
      iconGrid: Make sure the style is updated before computing the layout · 8f0e9abe
      verdre authored
      In some cases the style-changed signal hasn't been emitted when
      _computeLayout() is called, resulting in the use of the default spacing
      and item size values for the calculations.
      One case where this happens is when starting a search. Right after the
      initialization of GridSearchResults, _computeLayout() is called from
      _getMaxDisplayedResults() and the style-changed signal hasn't been
      emitted yet. The computed layout will be wrong and the maximum
      number of results will also be wrong.
      To prevent this from happening, make sure the style has been updated
      before doing the calculations in _computeLayout().
    • verdre's avatar
      search: Fix calculation of max number of displayed results for grid · 1a27ff61
      verdre authored
      The calculation of how many results can be shown in GridSearchResults is
      broken: The width of the parent container (resultsView.actor) we're
      using as the maximum width right now is the width of the scrollView of
      SearchResults (which always expands to the whole screen size). This
      width will only be correct if the scrollView (ie. the whole screen) is
      smaller than the max width of searchResultsContent, which only is the
      case for screens smaller than 1000px.
      To fix the calculation, use the width of our own actor and don't get it
      using clutter_actor_get_width(), but using the last allocation of the
      actor. This way we don't get the preferred width if the actor is not
      allocated at this point (it's hidden by _ensureProviderDisplay() when
      starting a new search).
      Then, when the allocation of the actor changes, rebuild the grid search
      results by calling updateSearch() with the old arguments to ensure the
      number of visible results is correct. The fact that we're only listening
      for allocation changes here is the reason why we never want to use the
      preferred width of the actor inside _getMaxDisplayedResults(): While
      the actor is hidden clutter_actor_get_width() would return the preferred
      width, which we'd then use the as the maximum width. But if the actor
      had a correct allocation before, no notify::allocation signal will be
      emitted when the actor is shown again because the allocation is still
      the same, and we'll end up using the preferred width as maximium width
    • verdre's avatar
      search: Remove unnecessary containers · a7852705
      verdre authored
      The functionality the searchResultsBin container provides can easily be
      moved into a subclass of St.BoxLayout, no need for an additional StBin.
      The "searchResultsBin" css class isn't used in the stylesheets either.
      Same with the scrollChild container.
    • Benjamin Berg's avatar
      shellDBus: Rename ShowMonitorLabels2 to ShowMonitorLabels · 2c8d380e
      Benjamin Berg authored
      The original ShowMonitorLabels has been removed so we can change things
      back to use ShowMonitorLabels again.
  2. 12 Jul, 2019 9 commits
  3. 11 Jul, 2019 1 commit
  4. 10 Jul, 2019 5 commits
  5. 09 Jul, 2019 4 commits
  6. 08 Jul, 2019 3 commits
  7. 05 Jul, 2019 4 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
      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. 03 Jul, 2019 1 commit
  9. 02 Jul, 2019 8 commits
    • 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.
    • Florian Müllner's avatar
      cleanup: Use consistent style for GObject property definitions · 6f8dd065
      Florian Müllner authored
      Go with the style preferred by gjs.
    • Florian Müllner's avatar
      systemActions: Reindent action map · 02db21fc
      Florian Müllner authored
      Starting an object literal with a comment throws off eslint's rules
      for brace style (newline between brace and properties for both opening
      and closing brace or neither) as well as indentation (fixed four-space
      indent or align with the previous argument).
    • Florian Müllner's avatar
      dwellClick: Reindent modes map · 8c28f9a7
      Florian Müllner authored
      Using multiple spaces after property names in order to align the
      values isn't something we do elsewhere.
      Instead, align the values by using a fixed 4-space indent as preferred
      by gjs nowadays.