Commit Graph

175 Commits

Author SHA1 Message Date
Florian Müllner
50b7739076 worldClocks: Ignore locations with unknown timezone
We currently assume that every location has an associated timezone.
While this is sound in the real world, in practise it depends on
whether or not libgweather can find a corresponding timezone DB
entry.

This used to be a fringe case, but has become more likely when commit
https://gitlab.gnome.org/GNOME/libgweather/commit/d7682676ac9 moved
weather stations from cities to countries - the station itself is un-
likely to have a timezone entry, and the country may be part of more
than a single timezone.

It would be good for libgweather to return a timezone for those
locations again, but we should defend against the case anyway.
We cannot tell what time it is at a particular location without
knowing the timezone, so simply filter them out.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1062
2019-04-30 16:15:27 +00:00
Marco Trevisan (Treviño)
fedb8e706a panelMenu: Remove usage of this.actor from Button
Remove this.actor = actor, since the class is now an actor itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/487
2019-04-17 21:32:18 +00:00
Florian Müllner
2fab75f448 dateMenu: Make clock offsets relative to local time
We recently added offsets to world clocks that represent the location's
timezone as UTC offset. However for most users, that representation is
overly technical and less helpful than the difference to their local time.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1157
2019-04-13 12:11:14 +00:00
Florian Müllner
22883f2fa2 dateMenu: Make sure we always display a clock name
We currently use the city name for all location except named timezones.
However locations only have a city name if they are of level CITY or
DETACHED, or if they are of level WEATHER_STATION with a parent of level
CITY.

So when libgweather commit d7682676ac9 moved weather station locations from
cities to countries, it broke their names in the world clocks section.

To fix this, stop making assumptions about when we can use the city name
and simply try it first for all locations and fall back to the plain name
if its not available.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1150
2019-04-12 03:17:35 +02:00
Marco Trevisan (Treviño)
4a4f752459 dateMenu: Relayout IndicatorPad when parent size changes
This happens often in resource-scaled world

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2019-03-01 17:12:53 +00:00
Florian Müllner
fd50b9a45e cleanup: Use destructuring for imports from GI
This is *much* nicer than repetitive "imports.gi" lines ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/399
2019-02-09 07:39:20 +01:00
Florian Müllner
a1534dab02 cleanup: Clean up unused imports
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/399
2019-02-09 05:05:07 +01:00
Florian Müllner
40e624444c dateMenu: Refresh world clocks section
Update the section styling to accentuate the most relevant information,
and include the timezone.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262
2019-02-05 11:36:38 +00:00
Florian Müllner
3cf67b1236 dateMenu: Show weather location in section header
It is useful information, in particular when the location is set
automatically via geoclue.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262
2019-02-05 11:36:38 +00:00
Florian Müllner
5dedb97fcc dateMenu: Use graphical weather forecasts
While the current textual forecast is non-intrusive, it may be too
much so, making it less effective to spot the current conditions
at a glance.

Refresh the section to use a more conventional graphical representation,
similar to the one used by gnome-weather itself.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262
2019-02-05 11:36:38 +00:00
Florian Müllner
15e7625c80 cleanup: Remove erroneous vfunc parameters
Unlike in C or signal handlers, vfuncs don't include the this-object
in their arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388
2019-02-05 02:21:40 +00:00
Carlos Garnacho
a977c1388a st: Add StPolicyType enum
In order to replace GTK+'s GtkPolicyType. It's bit-compatible with it, too.
All callers have been updated to use it.

This is a purely accessory change in terms of X11 Display usage cleanup,
but helps see better what is left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Florian Müllner
e68dfed1f7 cleanup: Port GObject classes to JS6 classes
GJS added API for defining GObject classes with ES6 class syntax
last cycle, use it to port the remaining Lang.Class classes to
the new syntax.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
2019-01-25 14:02:44 +00:00
Florian Müllner
bacfdbbb03 cleanup: Port non-GObject classes to JS6 classes
ES6 finally adds standard class syntax to the language, so we can
replace our custom Lang.Class framework with the new syntax. Any
classes that inherit from GObject will need special treatment,
so limit the port to regular javascript classes for now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
2019-01-25 14:02:44 +00:00
Carmen Bianca Bakker
0f542c2e16 Remove padding from date strings
The padding is removed by using %-d instead of %e or %d.

Examples:

"%B %d %Y"  -> "October 04 2018"

"%B %e %Y"  -> "October  4 2018"

"%B %-d %Y" -> "October 4 2018"

https://gitlab.gnome.org/GNOME/gnome-shell/issues/666
2018-10-25 13:05:47 +02:00
Carmen Bianca Bakker
cff9eaf5aa Change a translator comment to be less ambiguous
https://gitlab.gnome.org/GNOME/gnome-shell/issues/666
2018-10-25 13:05:08 +02:00
Florian Müllner
11ca8dd54f worldClock: Handle named timezones
The original UTC support in GWeather piggy-backed on the existing API, but
as "country" or "city" don't make sense in the context of UTC or AoE, the
concept of "named timezones" was introduced. Handle those explicitly to get
back labels for those locations.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/150
2018-04-13 09:15:48 +00:00
Florian Müllner
3b1330880f cleanup: Use Function.prototype.bind()
When not using arrow notation with anonymous functions, we use Lang.bind()
to bind `this` to named callbacks. However since ES5, this functionality
is already provided by Function.prototype.bind() - in fact, Lang.bind()
itself uses it when no extra arguments are specified. Just use the built-in
function directly where possible, and use arrow notation in the few places
where we pass additional arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:02 +00:00
Florian Müllner
213e38c2ef cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:00 +00:00
Florian Müllner
76f09b1e49 cleanup: Use method syntax
Modern javascript has a short-hand for function properties, embrace
it for better readability and to prepare for an eventual port to
ES6 classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:54:58 +00:00
Bastien Nocera
29987ae033 dateMenu: Fix possible crash with unknown locations
If there are locations unknown to the libgweather version gnome-shell is
using, don't crash.

JS ERROR: TypeError: b.location is null
WorldClocksSection<._clocksChanged/<@resource:///org/gnome/shell/ui/dateMenu.js:141:1
WorldClocksSection<._clocksChanged@resource:///org/gnome/shell/ui/dateMenu.js:139:9

https://bugzilla.gnome.org/show_bug.cgi?id=791148
2017-12-06 02:02:48 +01:00
Bastien Nocera
a29ceb31dd dateMenu: Ignore malformed world-clocks settings
Guard against a malformed setting that doesn't contain a
'location' key.

https://bugzilla.gnome.org/show_bug.cgi?id=791148
2017-12-06 02:02:48 +01:00
Florian Müllner
156032a7ec weather: Mark conditions as significant
Otherwise the passed phenomenon/qualifier are ignored and a fallback
string is used.
2017-10-04 18:12:26 +02:00
Martin Andersson
59fc26f821 calendar: Rebuild the calendar when the time zone changes
A time zone change can cause the date to change so we need to clear
SpiderMonkey's time zone cache and rebuild the calendar.

https://bugzilla.gnome.org/show_bug.cgi?id=678507
2017-10-04 16:44:07 +02:00
Florian Müllner
bddc2c0016 dateMenu: Use icon for message indicator
Using a unicode character here means it may look quite different
from the intended style (for instance with emoji fonts). Avoid
this by providing a custom icon and use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=766368
2017-09-12 17:32:51 +02:00
Florian Müllner
56f4ce37cd dateMenu: Adjust to GWeather IAPI change
It's not exactly clear what changed - gobject-introspection, gjs - but
the newly added gweather_condition_to_string_full() API no longer works
like it used to. The replacement code does look more idiomatic anyway,
so just fix the code without investigating the reason of the breakage.

https://bugzilla.gnome.org/show_bug.cgi?id=787423
2017-09-12 17:32:51 +02:00
Florian Müllner
2339351499 dateMenu: Use non-capitalized forecasts where appropriate
GWeather now provides us with API to request strings that don't
use sentence capitalization, so we can use it for summaries that
don't start a sentence to make for more natural phrases.

https://bugzilla.gnome.org/show_bug.cgi?id=779873
2017-08-21 15:43:34 +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
c1758c4d69 dateMenu: Set _delegate on non-menu-item menu child
PopupMenu needs special-treatment of certain types of menu items,
which it determines via children's _delegate property. However as
the calendar drop-down is very unmenu-ish, we use regular actors
rather than PopupMenuItems and the missing _delegate property
triggers a warning. Just add it as the bare minimum to make
PopupMenu happy.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
Florian Müllner
6362b3d057 dateMenu: Fix a runtime warning
GJS now warns about excess parameters, so wrap the queue_relayout()
into an anonymous function instead of using it directly as signal
handler.
2017-05-11 15:20:10 +02:00
Florian Müllner
d393ca4f09 weather: Track whether a location was set
Setting GWeatherInfo:location to null helpfully doesn't mean
"no location", but "NYC". This obviously isn't what we want
to show users, so track the location validity separately and
consider it when updating the label shown to users.

https://bugzilla.gnome.org/show_bug.cgi?id=780252
2017-03-20 19:02:08 +01:00
Allan Day
252dce1ec2 fix typos
The shell was crashing for me - these fixes from Debarshi seem to
fix it.
2017-03-01 16:24:35 +00:00
Florian Müllner
62606c68b9 dateMenu: Add Weather section
Similar to the Clocks integration we've had in the date+time drop-down for
a while, the designs have called for a similar section that integrates
GNOME weather as well. Use the WeatherClient added in the previous commit
to implement that section and add it to the popover.

https://bugzilla.gnome.org/show_bug.cgi?id=754031
2017-03-01 10:52:13 +01:00
Florian Müllner
4b166dcc79 dateMenu: Do a better job at size freezing while browsing dates
In order to avoid distracting popup size changes while browsing
other dates, we freeze the size to the last size request. However
in case of more complex size negotiations - wrapping or ellipsizing
labels, scrollable elements etc. - there's a chance of stray calls
to get_preferred_width/height() that are not used for the actual
allocation. If such a call happens to be the last size request
before the layout is frozen, the saved size will be wrong. To fix
this, save the allocated size rather than the requested one.

https://bugzilla.gnome.org/show_bug.cgi?id=754031
2017-02-27 21:23:48 +01:00
Florian Müllner
796fdca5c5 dateMenu: Enforce calendar column width
We want the width of the calendar column to be determined by the
calendar, other elements should adjust their allocation accordingly.
However neither ellipsization nor wrapping will kick in unless the
parent's width is restricted, so use a small custom layout manager
that enforces the desired behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=754031
2017-02-27 21:23:47 +01:00
Florian Müllner
0353ebde5d dateMenu: Use AppSettingsMonitor for world clocks
When gnome-clocks is installed, there is currently a race between the
GSettings schema being added to the database and the world clocks
session trying to use it. The prize if we win that race is an abort
in GIO, so use the newly added AppSettingsMonitor skip the race
altogether.

https://bugzilla.gnome.org/show_bug.cgi?id=766410
2017-02-27 20:02:16 +01:00
Philip Chimento
aefd61c3db js: Avoid double declarations with let
The following code is a syntax error in ES6:

    let a = 'something';
    let a = 'other thing';

Previously GJS would silently accept this code, but in the next release the
SpiderMonkey JS engine will be more ES6-compliant.

https://bugzilla.gnome.org/show_bug.cgi?id=778425
2017-02-10 13:35:50 -08:00
Florian Müllner
ee8fd1e613 calendar: Split out message list base classes
Currently both the base classes for messages/sections and the message
list itself that instantiates the available sections are located in
the same module. As a result, it isn't possible to define sections
in a different module without introducing circular dependencies. The
Calendar module is already unwieldily large, so split it up a bit to
avoid it growing even bigger in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=756491
2016-02-17 14:56:52 +01: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
Florian Müllner
bb2d7f7e7e dateMenu: Set label_actor for WorldClock button
Ideally we would allow navigating into the button in the screen
reader case, so the configured clocks are read out properly.
However we can still do better than nothing short-term by pointing
to the section header as the button's label_actor.

https://bugzilla.gnome.org/show_bug.cgi?id=745393
2015-03-04 13:57:30 +01:00
Florian Müllner
39fd7b9a05 dateMenu: Use formatTime() for world clock
https://bugzilla.gnome.org/show_bug.cgi?id=745111
2015-03-04 13:55:01 +01:00
Florian Müllner
61c5f259ec dateMenu: Hide displays section when disabled by session mode
We currently show the world clocks section unconditionally, even when
the session mode disallows launching the Clocks app to configure the
displayed clocks. This does not make sense, so hide the entire section
when the session mode disallows settings.

https://bugzilla.gnome.org/show_bug.cgi?id=745494
2015-03-03 19:14:49 +01:00
Florian Müllner
be52ad999f dateMenu: Include "Today" button in keynav
https://bugzilla.gnome.org/show_bug.cgi?id=706903
2015-03-03 10:37:37 +01:00
Giovanni Campagna
f015f4574f calendar: fix title at shell startup
Make sure the message list section is set to the current date
when opening the menu, otherwise the calendar might skip
the selected-date-changed event (because the day did not change)
which would leave the message list with an uninitialized date.

https://bugzilla.gnome.org/show_bug.cgi?id=745412
2015-03-02 16:21:38 -08:00
Florian Müllner
880b240ecb dateMenu: Update message indicator on queue changes
The message indicator conveys that the message list contains unseen
messages that will not be shown as banner. So its visibility depends
on two factors: the number of unseen messages, and the number of
messages waiting in the queue to be shown as banner. As we currently
only update the visibility on changes to the former, the indicator is
not always accurate - for instance sources notify count changes before
passing on a notification to the message tray for display.
To fix, add a signal to the message tray to notify when the queue
changes and use it to update the indicator's visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=744880
2015-02-21 10:32:08 +01:00
Florian Müllner
8032e672e9 dateMenu: Block notification banners while the calendar is open
The new banner position interferes with the calendar drop-down. Resolve
this by blocking banners while the calendar is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:41:34 +01:00
Florian Müllner
d6eea0e380 dateMenu: Show indicator for messages that skipped banner mode
The summary may contain notifications that have not been seen by the user
and won't be shown as banner. Currently this is only the case for resident
notifications that are emitted by the focused app, but it will become more
common as we will start limiting the number of queued notifications.
Indicate to the user that more notifications are available by displaying a
small dot in the top bar button.

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:40:48 +01:00
Florian Müllner
e404369c0f dateMenu: Freeze popup size while browsing
As the popup's height depends on its content, which itself varies
depending on the selected day, browsing the calendar can result
in distracting size changes. To avoid this, the design calls for
the height to be frozen to the previous one in that case.
As the popup will always open with the current day selected, we
don't have to be very sophisticated and can just lock the popup
to the height corresponding to that day.

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:39:25 +01:00
Florian Müllner
88c7039ebe dateMenu: Stop hiding the events list
The message list is not only a replacement for the calendar events
list, it will also take over the notification summary from the
message tray. As we start drawing events from other sources than
calendars, hiding it based on whether or not any calendars have
been set up is no longer appropriate, so always include it in the
calendar drop-down now.

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:39:25 +01:00
Florian Müllner
efc0ec4740 dateMenu: Add world clock section
Rather than just offering to open Clocks when installed, pick up
configured locations and display their time directly in the popup.

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:39:20 +01:00
Florian Müllner
7d1382afd3 dateMenu: Remove "Open Calendar" item
This functionality is now available through the Events section
header in the message list, so we don't need a separate menu
item for it.

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:38:48 +01:00
Florian Müllner
e850d9e29b dateMenu: Replace EventsList with MessageList
Turn the existing EventsList into a MessageListSection and add the
message list to the calendar drop-down. The new events list only
displays events for the currently selected day, but in a more
structured and friendlier way than the old one.

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:38:44 +01:00
Florian Müllner
de27e4e1b2 dateMenu: Remove link to Date & Time Settings
Menu items are on their way out of the calendar drop down, so let's
start with the easy one. This one is removed without replacement,
but then the Date & Time panel should be a one-time stop for most
users anyway, so not having a direct shortcut should not be much of
a problem. It is also the last remaining Settings item outside the
system menu ...

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:37:00 +01:00
Florian Müllner
33c5f5726e dateMenu: Make "today" button more prominent
Split the weekday from the date and increase the latter's size to
match the latest calendar mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:36:55 +01:00
Florian Müllner
26330fde7e dateMenu: Swap calendar and event columns
The new design has the events list on the left and the calendar on the
right, so swap them around and remove the vertical separator between
them in favor of some additional whitespace as in the mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=744817
2015-02-20 17:35:27 +01:00
Florian Müllner
3ba8a578e8 dateMenu: Remove obsolete comment
The events list has been always defined since commit ca2e09fe8b
about 2 1/2 years ago ...
2015-02-18 06:10:24 +01:00
Florian Müllner
facaea6850 environment: Define N_() globally
Commit 1291bcd0c8 implemented it for dateMenu, but the function
is already used in screenShield as well. Just add it globally as
we do for other standard gettext "macros".
2014-11-13 12:26:33 +00:00
Carlos Soriano
1291bcd0c8 dateMenu: Fix commit 52503c4c
dateMenu uses now N_() but the function is not defined.

To solve it, define N_().
2014-11-10 16:45:10 +01:00
Bastien Nocera
52503c4c38 js: Fix util_translate_time_string() usage
util_translate_time_string() was called to use LC_TIME to translate
strings, but those strings were not marked as to be translated.

https://bugzilla.gnome.org/show_bug.cgi?id=739822
2014-11-08 21:55:16 +01:00
Eskild Hustvedt
35fcd16992 dateMenu: Allow extensions to add custom calendar sources
Splits instantiation of the event source into a separate method,
allowing extensions to subclass the DateMenuButton and provide its
own calendar source.

https://bugzilla.gnome.org/show_bug.cgi?id=672500
2014-11-07 14:49:38 +01:00
Darcy
111a9e13f2 dateMenu: Fix typo in _isToday()
getDay() is the day of week, what we want there is getDate().

https://bugzilla.gnome.org/show_bug.cgi?id=738725
2014-11-03 15:03:54 +01:00
Florian Müllner
eb3fc7815e Use LC_TIME locale for strftime format string translations
We commonly mark strftime format strings for translation to account
for date/time representations without an existing strftime shortcut
("Yesterday %H%p"). As those translations are looked up according to
the locale defined by LC_MESSAGES, while the conversion characters
themselves are resolved according to LC_TIME, the result can be
rather odd when mixing locales ("Den 27. January"). The correct
solution would be to install translations for format strings in
the LC_TIME catalogue and look them up with dcgettext(), but we
don't have the infrastructure to do that easily. Work around this
by adding a helper method that looks up a string in LC_MESSAGES
using the locale defined by LC_TIME and use that to translate
format strings, which has the same result.

https://bugzilla.gnome.org/show_bug.cgi?id=738640
2014-10-16 23:41:51 +02:00
Jasper St. Pierre
42066a7c46 dateMenu: Don't generate JS garbage every clock tick
Instead of waking up the JS every second to set the clock and update a
date label the user will rarely see, simply use property binding to
bypass JS string handling, and update the date in the menu when the menu
is opened.
2014-10-01 15:42:49 -06:00
Florian Müllner
3e20843d9c dateMenu: Try to use the default calendar application
Commit 14ceb10555 changed the "Open Calendar" item to open the
"recommended" calendar application rather than the default one to
avoid problems with MIME subclassing (namely falling back to the
default text editor when no calendar app is installed).
With this change however, the application launched does no longer
necessarily match the one configured in Settings, which is unexpected.
To avoid both problems, use the default calendar application again,
but only if it is in the list of recommended applications.

https://bugzilla.gnome.org/show_bug.cgi?id=722333
2014-08-19 18:13:40 +02:00
Jasper St. Pierre
4f28840a59 dateMenu: Fix style 2014-06-16 15:10:36 -04:00
Carlos Soriano
19afabe2a1 dateMenu: Don't make dateMenuButton reactive on current day
Having the ability to go to the current date if the user is already
on the current date can be confusing. So don't make the button reactive
until the selected date changes.

https://bugzilla.gnome.org/show_bug.cgi?id=726724
2014-04-29 01:02:27 +02:00
Vit Stanislav
c07421c195 Calendar: make current date label clickable
Once you start navigating between months, you can't return to the
current day.  However, the current day is always displayed above the
calendar grid.  Fix this by making the current date clickable; when
clicked, the calendar grid jumps back to that day.

https://bugzilla.gnome.org/show_bug.cgi?id=641366
2014-03-05 16:40:56 +01:00
Debarshi Ray
737f4eb1c1 dateMenu: Update gnome-clocks' desktop file
https://bugzilla.gnome.org/show_bug.cgi?id=724282
2014-02-18 14:52:48 +01:00
Giovanni Campagna
3227d4f3ed ShellApp+ShellGlobal: unify app launch context code
Extend shell_global_create_app_launch_context() with the required
parameters and use that for shell_app_launch() too.

https://bugzilla.gnome.org/show_bug.cgi?id=669603
2014-01-19 18:51:48 +01:00
Jasper St. Pierre
9fce12d6b4 calendar: Don't ever force reload
https://bugzilla.gnome.org/show_bug.cgi?id=720298
2013-12-16 12:44:22 -05:00
Alejandro Piñeiro
a4c1eb12b4 a11y: calendar: full date string should be navigable
Also moved the set of label_actor of the menu some lines before,
to improve readability.

https://bugzilla.gnome.org/show_bug.cgi?id=706903
2013-08-28 19:13:33 +02:00
Jasper St. Pierre
51485396c7 popupMenu: Remove our custom allocation code
With support for column-based layout gone, simply use a box layout
and allow items to use their own layouts without any "framework".

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:25 -04:00
Jasper St. Pierre
54bec54765 panel: Align the arrows together in the status menus
To align the arrows, we need to allocate panel buttons the full
height of the tray. Fix up all of the panel buttons to support this,
and align the arrows in the middle.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:24 -04:00
Jonh Wendell
a7bcc4c00d dateMenu: add a style class for the clock label
it's useful if we need to tweak only the clock's label css.

https://bugzilla.gnome.org/show_bug.cgi?id=705634
2013-08-08 15:29:39 -03:00
Jasper St. Pierre
929636ebd0 dateMenu: Update visibility syncing for new dateMenu layout
The code here before was trying to play hierarchy tricks to
figure out how to show / hide the events list, which broke
when we rearranged how the date menu was laid out. Simplify
the code here to not be so tricky, and update the CSS to
match the new designs.

https://bugzilla.gnome.org/show_bug.cgi?id=702849
2013-06-24 15:14:03 -04:00
Giovanni Campagna
719d793e22 Calendar: refactor the layout of the event list
In order to have event descriptions on multiple lines, but still
maintain proper alignment with the day and time strings, refactor
the whole event list to be one big table. Headers are implemented
as spanning cells, and uneven spacing is a mix of row/column spacing
and cell padding.

https://bugzilla.gnome.org/show_bug.cgi?id=701231
2013-06-14 18:44:47 +02:00
Jasper St. Pierre
308b1d6039 dateMenu: Remove bad setColumnWidths call
The correct API is to pass in an array, so I don't even know how
this managed to work before.

https://bugzilla.gnome.org/show_bug.cgi?id=702125
2013-06-12 16:13:47 -04:00
Lionel Landwerlin
14ceb10555 dateMenu: do not show "Open Calendar" button with no installed calendar application
https://bugzilla.gnome.org/show_bug.cgi?id=697725
2013-05-06 16:06:33 +01:00
Tanner Doshier
c29810b2f6 dateMenu: Don't override accessible_role inherited from PanelMenu.Button
The menu is keyboard navigable now, so allow it to be advertised as such.

https://bugzilla.gnome.org/show_bug.cgi?id=667434
2013-05-03 23:20:02 -04:00
Tanner Doshier
c1240d3f2c calendar, dateMenu: Allow focus on menu items
https://bugzilla.gnome.org/show_bug.cgi?id=667434
2013-05-03 23:20:01 -04:00
Tim Lunn
c9c1c89a27 dateMenu: append .desktop to evolution strings
Since that is what the actual app_id's are.
2013-04-26 16:54:45 +10:00
Florian Müllner
390491b37a dateMenu: Re-add special-casing of evolution-calendar
When commit 724a2bd7 changed the way to determine the default
calendar app, it dropped all special handling of evolution.
Unfortunately we still need it to not end up with the default
mail component, so add it back.

https://bugzilla.gnome.org/show_bug.cgi?id=696432
2013-03-25 10:43:30 +01:00
Giovanni Campagna
ee50904147 Calendar: only show events when configured in Evolution
When no calendars are enabled, hide the events pane completely instead
of showing it empty.

https://bugzilla.gnome.org/show_bug.cgi?id=680083
2013-03-04 18:59:30 +01:00
Giovanni Campagna
beb0fdf4b8 Calendar: clean up code by always having an event source
Instead of sometimes having an event source and sometimes not, use
the empty event source when the session mode says the calendar is
disabled. This way, the code can assume an event source object and
avoid checks.

https://bugzilla.gnome.org/show_bug.cgi?id=641383
2013-03-04 18:59:30 +01:00
Jeremy Bicha
f0203d1f19 general: Use & instead of 'and' for Settings panels
UI consistency follow up from bug 676562

https://bugzilla.gnome.org/show_bug.cgi?id=689590
2013-02-05 08:54:16 -05:00
Mathieu Bridon
5e5798bee9 dateMenu: Add "Open Clocks" entry
This is similar to how the dateMenu already allows opening the calendar
application. However, the new entry only appears if GNOME Clocks is
installed, as it is not a core GNOME application.

https://bugzilla.gnome.org/show_bug.cgi?id=644390
2013-01-16 05:06:55 +02:00
Mathieu Bridon
d793077b91 dateMenu: Move the "Open Calendar" entry
The design calls for it to be in the left column rather than the right
one.

https://bugzilla.gnome.org/show_bug.cgi?id=644390
2013-01-16 05:06:52 +02:00
Jasper St. Pierre
9548cd8341 js: Explicitly dispose all cairo contexts
Due to limitations and bugs in SpiderMonkey's GC, wrapper objects
for cairo contexts and similar may not get cleaned up immediately
after repainting, leading to leaking memory. Explicitly disposing
of such objects after they're not needed can clean up large portions
of memory for cairo surfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=685513
2013-01-08 13:07:51 -05:00
Giovanni Campagna
724a2bd72f Calendar: use text/calendar preferred app as the calendar app
That's what the info panel in g-c-c defines as the preferred calendar
application.

https://bugzilla.gnome.org/show_bug.cgi?id=690767
2012-12-27 19:05:52 +01:00
Florian Müllner
4342155748 dateMenu: Hide "Open Calendar" item if calendar unavailable
The configured calendar application might not actually be installed.
Instead of failing with an error message, hide the menu item altogether
in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=686050
2012-10-13 14:40:51 +02:00
Matthias Clasen
0f6effa263 Calendar: hide all actions when on the login screen
No events on the login screen, and no opening calendars or
settings either.

https://bugzilla.gnome.org/show_bug.cgi?id=685142
2012-10-08 19:48:44 +02:00
Jasper St. Pierre
ca2e09fe8b sessionMode: Allow changing the session mode at runtime
Since we eventually want to add a system for changing the top panel
contents depending on the current state of the shell, let's use the
"session mode" feature for this, and add a mechanism for updating the
session mode at runtime. Add support for every key besides the two
functional keys, and make all the components update automatically when the
session mode is changed. Add a new lock-screen mode, and make the lock
screen change to this when locked.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-04 18:42:44 -03:00
Florian Müllner
66adeef9bd dateMenu: Use .desktop file to launch calendar
When selecting "Open Calendar" in the date menu, the configured
application is launched via command line, so we don't get any
startup notification. If Evolution is used as calendar application,
launch it via the .desktop file added by the last commit instead in
order to fix the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=677907
2012-07-04 00:24:05 +02:00
Colin Walters
eb759cf22f dateMenu: Fix regression that caused no date to be displayed
Commit ef0aa65774 broke the date
display; bring it back.
2012-06-26 14:00:35 -04:00
Colin Walters
ef0aa65774 clock: Switch to using GnomeWallClock, delete clock GSettings controls
This avoids us having to poll once a second, among other things.  For
more information, see the linked bug chain.

See https://bugzilla.gnome.org/show_bug.cgi?id=657958 for the new
clock keys.

https://bugzilla.gnome.org/show_bug.cgi?id=657074
2012-06-22 18:10:46 -04:00
Florian Müllner
ba92cfa064 sessionMode: Add showCalendarEvents property
Add a sessionMode.showCalendarEvents property, which determines
whether the calendar menu should contain an events section or not.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:28 +02:00
Alejandro Piñeiro
5436634829 a11y: Using the proper label_actor for date menu on top panel
On the code two labels are created. One is used on the date menu
itself, and the other for the menu icon at the top panel. The wrong
label was used as the label_actor for the top panel menu icon.

https://bugzilla.gnome.org/show_bug.cgi?id=675307
2012-05-03 20:47:11 +02:00
Alejandro Piñeiro
7c25dead17 a11y: Setting role on several panel ui elements
https://bugzilla.gnome.org/show_bug.cgi?id=667432
2012-03-15 18:58:44 +01:00
Jasper St. Pierre
15f881f967 st: Remove custom text direction stuff
Clutter has its own built-in system for managing text directions, like GTK+.
Convert over to use this.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Alejandro Piñeiro
74dd298891 a11y: Setting a name/label_actor for several items on the panel
https://bugzilla.gnome.org/show_bug.cgi?id=667376
2012-01-27 12:29:52 +01:00