Commit Graph

364 Commits

Author SHA1 Message Date
Stefano Facchini
feed029ae4 panel: focus windows on Escape key press
https://bugzilla.gnome.org/show_bug.cgi?id=671121
2017-11-01 20:52:58 +01:00
Florian Müllner
01d8811913 gdm: Remove separate greeter universal access icon
The idea behind always showing the icon on the login screen is that
the users' needs aren't known at that point. However we can achieve
the same behavior by including the 'always-show-universal-access-status'
key in GDM's presets, so drop the special-case.

https://bugzilla.gnome.org/show_bug.cgi?id=788943
2017-10-13 16:53:54 +02:00
Florian Müllner
7da5a76aaa popupMenu: Close menus on session mode changes
We are already closing top bar menus on session mode changes, but
as this behavior makes sense for any other menus as well - dash
context menus or the background menu for instance - just generalize
the behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=787676
2017-10-04 18:12:27 +02:00
Jonas Ådahl
5c37facc08 ui: Improve handling being headless
Don't assume there will always be a primary (logical) monitor, or any
(logical) monitor at all. This includes not allocating / layouting /
styling correctly when being headless.

The initial background loading will also be delayed until there are any
(logical) monitors connected.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
2017-10-04 11:50:21 -04:00
Florian Müllner
033277b68f Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or
may be) used from other modules with 'var' to cut down on warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
2582d16ca7 Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
28d098394a panel: Fix a JS warning
We need to track the open-status of indicator menus, but don't want
to hook up signals more than once, so we check for the handler ID
we store on the object. As the property is only defined once we did
set up the signal connection, this check now logs a warning. We
can avoid it by checking for the existence of the property rather
than a particular value.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
Florian Müllner
292ac413c8 panel: Consider visibility changes for solid style
We currently assume that window state changes are accompanied by an
allocation change (triggered for example by the minimize animation).
However this misses the case where a window actor is simply hidden
without any transition, as is the case with the 'show-desktop' action
for instance, so start tracking plain visibility changes as well.

https://bugzilla.gnome.org/show_bug.cgi?id=783975
2017-07-05 16:49:32 +02:00
Florian Müllner
e02d6e5285 panel: Update .solid style on session mode changes
The .solid style isn't supposed to apply for modes that don't support
windows, but for this to work we have to update the style on session
mode changes.

https://bugzilla.gnome.org/show_bug.cgi?id=783202
2017-05-30 11:41:35 +02:00
Alessandro Bono
447bf55e45 panel: Add transparency when free-floating
The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.

https://bugzilla.gnome.org/show_bug.cgi?id=747163
2017-05-19 18:58:40 +02:00
Florian Müllner
785c813771 status: Add nightLight indicator
The display configuration now exposes a setting to automatically
shift the display color at nighttime. As there are cases where
disabling the filtering temporarily is useful, it makes sense to
expose the feature in the system menu for quick access.

https://bugzilla.gnome.org/show_bug.cgi?id=741224
2017-02-15 23:20:14 +01:00
Rui Matos
0c72d1fcbd ActivitiesButton: fix overview being toggled while still animating
Adds the missing checks for whether we should toggle the overview, on
button and key release.

https://bugzilla.gnome.org/show_bug.cgi?id=756925
2015-10-23 13:44:27 +02:00
Florian Müllner
f8e5e3e435 aggregateMenu: Ignore ellipsizable items in width-request
Some labels in the system status menu - namely network names - are out
of our control, and may thus grow the width "infinitively" unless we
restrict the menu width. So far we have been doing this by setting a
fixed width or max-width, but any value we put there might end up
being too restrictive in some locales. Instead, request a width that
fits all the labels we want to show unellipsized and use that instead
of an arbitrary limit.

https://bugzilla.gnome.org/show_bug.cgi?id=708472
2015-10-15 19:56:03 +02:00
Florian Müllner
36ee4e6c3b panel: Hide app menu when disabled by settings
While the GtkSettings::gtk-shell-shows-app-menu property is meant to
reflect a desktop capability (i.e. in the GNOME case: the app menu is
shown in the top bar), it is possible for users to overwrite it.
Respect the setting and actually hide the menu in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=745919
2015-10-05 14:08:20 +02:00
Ekaterina Gerasimova
f6cd3fa5ed panel: improve string for system menu, bug 755755
Refer to the system menu in the top bar as "System" rather than "Settings" as
it contains more than just settings and "Settings" is already used for the
settings panel. "System" is also used elsewhere, so include context for
translators.
2015-09-28 16:29:12 -04:00
Florian Müllner
fa0e54edbb status: Refine system status menu
* switch to a one-column layout (and adjust strings/widths
   accordingly
 * remove separator before system menu
 * add link to account settings to user submenu for consistency

https://bugzilla.gnome.org/show_bug.cgi?id=751377
2015-08-20 13:53:36 +02:00
Jakub Steiner
27a7194634 spinner: use a 60fps spinner
- sync with gtk+ and provide a fluid spinner

https://bugzilla.gnome.org/show_bug.cgi?id=753064
2015-08-05 13:44:32 +02:00
Jakub Steiner
cd0c632fcb theme: make app icons less fuzzy
- force 16x16px
- re-render SASS brings in some changes from
  gnome-shell-sass

https://bugzilla.gnome.org/show_bug.cgi?id=747932
2015-07-08 18:09:46 +02:00
Florian Müllner
1092f55b54 panel: Set up 'open-state-changed' handler on menu changes
Commit 08690d658f generalized the banner-blocking behavior of the
dateMenu to all menus that would obscure the banner. However setting
up the 'open-state-changed' handler only when an indicator is added
does not work for indicators that change their entire menu (like the
app menu) - we currently end up with menus with no connected signal
handler, and throw an error when trying to disconnect an invalid
signal ID.
To address this, add a new PanelButton::menu-set signal and use that
to set up the 'open-state-changed' handler.

https://bugzilla.gnome.org/show_bug.cgi?id=745910
2015-04-30 18:12:52 +02:00
Meet Parikh
08690d658f panel: Block banners when opening menus that would overlap
We currently block banners while the time+date menu is open, as it
would obscure the notification. However it is not necessarily the
only menu for which this is the case, so generalize the behavior
to all menus that would overlap banners when open.

https://bugzilla.gnome.org/show_bug.cgi?id=745910
2015-04-25 09:56:05 +02:00
Meet Parikh
674325e96c panel: Move notification banners below time+date dropdown
As notifications appear in the time+date dropdown's message list, there's
a strong relationship between notification banners and the menu. However
while the time+date menu is centered by default, which matches the banner
position, its actual position depends on the session mode - in particular
it is moved to the right in classic mode.
Reinforce the relationship in these cases by moving notification banners
underneath the time+date menu.

https://bugzilla.gnome.org/show_bug.cgi?id=745910
2015-04-25 09:56:05 +02:00
Florian Müllner
cb3d5c2b51 Use dedicated icons for top bar/windows in ctrl-alt-tab
The previously used ones were quite a stretch, so now that we got
dedicated ones, let's use them.
2015-03-13 17:12:10 +01:00
Florian Müllner
f5e07fbeba panel: Center app-menu label vertically
Commit 333becef45 accidentally removed the y_align property, bring
it back.

https://bugzilla.gnome.org/show_bug.cgi?id=745110
2015-03-04 20:54:49 +01:00
Florian Müllner
c79d24b60e popupMenu: Use TOPBAR_POPUP action mode for all menus
When it comes to keybindings or gestures, there's not really a good
reason why popups associated with the top bar should behave differently
from any other shell menus. Just set the action mode generically for
all menus, so actions like screenshots or media-keys start working
with menus like the background- or app launcher context menus.

https://bugzilla.gnome.org/show_bug.cgi?id=745039
2015-02-23 21:39:22 +01:00
Florian Müllner
08d2e617e1 windowManager: Take over <super>m keybinding to toggle calendar
It's where all the fun is happening nowadays ...

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:39:59 +01:00
Florian Müllner
f84addcadc panel: Add function to close the calendar
We will soon replace regular menu items in the calendar drop-down
with more complex elements.
However there will still be items that should close the drop down
when activated - rather than making the menu available throughout
the hierarchy (and eventually from outside as well when we add the
notifications list), have a public method on a global object just
like the ubiquitous Main.overview.hide().

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:37:00 +01:00
Jakub Steiner
a0df7aa2b8 theme: symbolic icons for App menu
- possibly too early as only core apps come with
  symbolic icon installed by default.
2015-02-20 15:14:45 +01:00
Carlos Soriano
333becef45 panel: Remove TextShadower
We no longer use it, so remove it.
2015-02-20 15:14:44 +01:00
Carlos Soriano
3732a6891d panelMenu: Don't fade appMenuButton icon and put it on the side
Design request, don't fade the icon of the appMenuButton and put it on
the side instead of overlaping with the text.

https://bugzilla.gnome.org/show_bug.cgi?id=744680
2015-02-20 15:14:44 +01:00
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Phillip Wood
546ae00854 Add busy property to ShellApp
Using a separate property to show when the application is busy rather
than cramming it into the state property makes the code clearer. In most
places we only care if an app is running or not, not whether it is
actually busy.

https://bugzilla.gnome.org/show_bug.cgi?id=736492
2014-11-27 10:59:55 +00:00
Cosimo Cecchi
328bb1c21b st: always use GFile internally
We're moving the theme infrastructure towards GResource, so as a first
step move all the loading to use GFiles instead of URIs or paths.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:53:39 -07:00
Florian Müllner
2b9645b268 Use MetaWindow.get_frame_rect()
get_outer_rect() has been deprecated for a while, use the new
function instead.
2014-10-09 12:17:15 +02:00
Carlos Garnacho
a6d8c25494 panel: Avoid _onEvent() to be called twice
Both Panel.ActivitiesButton and its parent class Panel.MenuButton would
attempt to connect their own _onEvent() function to Clutter::event,
which counterintuitively was connecting the child class' _onEvent()
function twice.

So, actually chain up on the signal handler, and don't connect twice
to the signal. Both methods were calling this.menu.close(), so only
do that on the parent class handler, since we're chaining up and doing
the right thing now.

https://bugzilla.gnome.org/show_bug.cgi?id=733840
2014-07-31 17:43:09 +02:00
Carlos Garnacho
38d05a8285 panel: Make the "Activities" button react to touch events
https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:23:17 +02:00
Jasper St. Pierre
45793d0e47 panel: Fix style 2014-07-08 15:38:35 -04:00
Bastien Nocera
cd2bd7685a js: Name all the timeouts and idles
With very uninventive names. Names now, good names later.

https://bugzilla.gnome.org/show_bug.cgi?id=727983
2014-04-10 21:08:16 +02:00
Carlos Soriano
0418b68051 popupMenu: Use an image for arrows
Until now the arrows were the associated arrow
character of the font. This cause some problems like
different arrows for different fonts, and size can be
altered because of the font size.
To solve that, use an image for the arrows.

https://bugzilla.gnome.org/show_bug.cgi?id=720206
2014-02-19 13:44:27 +01:00
Zeeshan Ali (Khattak)
32a49b7846 location: Provide a way to disable geolocation
Now that we are indicating 'geolocation in use' to user, we better also
provide at least a way to disable geolocation. Once this is in place, we
can provide slightly better controls rather than simply on/off switch.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-15 17:41:26 +00:00
Michael Biebl
9f3499a7c3 make NetworkManager optional
NetworkManager is only available on Linux.

https://bugzilla.gnome.org/show_bug.cgi?id=669495
2014-02-11 18:04:44 -05:00
Zeeshan Ali (Khattak)
d163b92e0b Add indicator for location service being used
If an application is accessing location through geoclue, show an
indicator in the panel for that so that user knows.

https://bugzilla.gnome.org/show_bug.cgi?id=709372
2014-01-28 18:39:12 +00:00
Florian Müllner
deb2f30b37 js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these
constants increase code clarity over plain true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
751a3f0e94 js: Use SOURCE_CONTINUE/SOURCE_REMOVE constants in source functions
With support for boolean constants in g-i, we can finally use the
more readable constants instead of true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Carlos Soriano
63593e45a6 Make dropdown arrows consistent size
Since the agregate menu does 120% of font-size, make this
for all dropdown arrows in gnome-shell and rename the css
class to make clear that it is used in overall gnome-shell

https://bugzilla.gnome.org/show_bug.cgi?id=709564
2013-10-11 17:32:55 +02:00
Giovanni Campagna
b9d935af0c ActivitiesButton: close the dummy menu when activating the button
We need to close the menu to make sure that any grabs held by
the PopupMenuManager are released, and events are properly delivered.

https://bugzilla.gnome.org/show_bug.cgi?id=707852
2013-09-24 16:28:31 +02:00
Joanmarie Diggs
3691e8ddd7 Remove "Menu" from the name of the Settings menu
Its presence makes Orca present "Settings Menu menu". Removing it does
not introduce any new strings.

https://bugzilla.gnome.org/show_bug.cgi?id=708080
2013-09-14 14:07:17 -04:00
Giovanni Campagna
15cfb9d1d9 AppMenu: remove tweens before animating the actor visibility
When we show(), we need to make sure that the hiding animation
doesn't reach the end, otherwise we would hide the actor but
still have _visible = true.
We were relying on tweener overwriting to do this, but it
doesn't quite work, so better be explicit and do it ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=707814
2013-09-10 10:46:00 +02:00
Olivier Blin
db07aa42ea panel: fix crash when bluetooth is disabled
https://bugzilla.gnome.org/show_bug.cgi?id=707430
2013-09-04 11:34:17 +02:00
Jasper St. Pierre
d4942858ba Add a screencast indicator for when we're recording
This will replace the indicator painted on the stage right now.

This unfortunately does not work for the recorder triggered by the
keybinding -- we'll simply replace the in-shell code with a keybinding
powered by gnome-settings-daemon.
2013-08-14 20:39:07 -04:00
Jasper St. Pierre
7563e04743 panel: Rewrite the app menu to use the new "sync" pattern
The existing app menu was a kludge of legacy code that tried to manage
a bunch of state, and had a number of issues:

 * It didn't properly manage visibility when combined with multiple
   apps and the overview.

 * It didn't properly manage reactivity when tabbing away from a busy
   app to another app.

 * It didn't properly disconnect signals when going from one app
   to nothing.

and countless others. Rewrite it to use the new "sync" code pattern,
where we centralize all state management and do transitions from that,
rather than strange and quirky control flow.

https://bugzilla.gnome.org/show_bug.cgi?id=705898
2013-08-13 11:22:04 -04:00