Commit graph

202 commits

Author SHA1 Message Date
Piotr Drąg
a3ec58345e display: use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772199
2016-10-03 15:20:42 +02:00
Bastien Nocera
8da6fa28e1 display: Fix possible crash on startup
If no items are added to the GVariantBuilder, g_variant_builder_close()
would throw a critical, g_variant_builder_end() would throw a
segmentation fault.

As this can only happen when there are no items added to the output_ids
hashtable, this should only happen if there are no displays known to
libgnome-desktop (and therefore mutter).

See https://bugzilla.redhat.com/show_bug.cgi?id=1280075

https://bugzilla.gnome.org/show_bug.cgi?id=771875
2016-09-24 02:46:38 +02:00
Georges Basile Stavracas Neto
2777fd583d panels: use the new categories
Following the previous patch, this patch adds the new alternative
categories to the panels' Desktop files. These alternative categories
are only relevant for the alternative Shell, and do not break the
current Shell in any way.

https://bugzilla.gnome.org/show_bug.cgi?id=767301
2016-06-14 12:16:43 -03:00
Cosimo Cecchi
1af73218fc display: fix accidentally commented out code
Not sure why I commented this out before pushing 47dcfee8 -- whoops!
2016-06-09 17:03:48 -07:00
Rui Matos
e9b70c2efa display: Separate interlaced from normal modes
https://bugzilla.gnome.org/show_bug.cgi?id=763833
2016-05-13 18:39:23 +02:00
Rui Matos
6d825b9660 display: Ensure only one output is set as primary
When switching an output to secondary we'd set all other outputs as
primary. Instead, set only the first we find.

https://bugzilla.gnome.org/show_bug.cgi?id=764155
2016-05-02 18:24:12 +02:00
Bastien Nocera
5c10ce45b8 panels: Fix translators comments being truncated
Commit b3be076 added soft hyphens along with a comment for translators
to use those soft hyphens. Except that gettext would only grab the one
line out of the four we wrote for translators to read. Put them all on
the same line so that gettext actually extracts those.

https://bugzilla.gnome.org/show_bug.cgi?id=765778
2016-04-28 23:38:00 +02:00
Cosimo Cecchi
cc5c94f151 display: remove unused code
https://bugzilla.gnome.org/show_bug.cgi?id=764296
2016-04-14 12:31:49 -07:00
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Cosimo Cecchi
47dcfee83b display: add option to enable and disable overscan compensation
Adds a switch that allows to control overscan compensation, when the
driver supports it.

Based on a patch by Tomeu Vizoso <tomeu.vizoso@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=725135
2016-04-05 10:14:53 -07:00
Bastien Nocera
529b29cae9 display: Remove duplicate non-ATSC/NTSC rates from the list
When a mode has 2 very close refresh rates such as 59.94Hz and 60Hz,
most of the time, we'll want the 59.94Hz version.

Hide the "PC" 60Hz version and only show the 59.94Hz version in those
cases, and mark the frequency as "60Hz (ATSC)" so that those
knowledgeable know that it's really 59.94Hz, and doesn't confuse those
who expect rates to be multiple of 30Hz or 25Hz.

See also https://en.wikipedia.org/wiki/NTSC#Lines_and_refresh_rate

Note that we also do this for half and double that rate, eg. close to
~30Hz and ~120Hz.

https://bugzilla.gnome.org/show_bug.cgi?id=655041
2016-03-17 14:47:18 +01:00
Rui Matos
3814c9b397 display: Add a way to specify the monitor refresh rate
This adds an extra frequency combo box that allows users to choose a
frequency for a given resolution.

https://bugzilla.gnome.org/show_bug.cgi?id=655041
2016-03-17 14:47:17 +01:00
Bastien Nocera
7229af6bdf display: Bump the minimum resolution shown
There's really no point showing a resolution that's smaller than the
fixed width of the shell, and isn't the preferred resolution for the
screen either. This stops the problematic 720x576 resolution showing on
an HD screen.
2016-03-01 16:05:04 +01:00
Dave Airlie
0005c32ded display: Fix making a tiled monitor primary again
Don't break out of loop if we weren't primary, as this
is stopping the user swapping back and forward between
primary and secondary with a tiled monitor.

i.e. user sets monitor to secondary and attempts to
go back to primary and it fails to move it.

https://bugzilla.gnome.org/show_bug.cgi?id=751680
2015-07-01 10:49:12 +02:00
Dave Airlie
458cebb26d display: Add support for tiled monitors
The display panel needs to ask libgnome-desktop in a few places
whether the panel is tiled.

https://bugzilla.gnome.org/show_bug.cgi?id=751680
2015-07-01 10:49:06 +02:00
Dave Airlie
3d8cd197c9 display: Use correctly typed pointer
We already assign list->data to output.

https://bugzilla.gnome.org/show_bug.cgi?id=750312
2015-06-15 16:18:33 +02:00
Dave Airlie
4c7189d1b4 display: Refactor get_geometry helper
This moves the two functions to the top of the file, changes the
get_geometry to return x/y if requested, and refactors the callers to
use it.

It also refactors some code that open coded the same basic code.

https://bugzilla.gnome.org/show_bug.cgi?id=750312
2015-06-15 16:16:16 +02:00
Bastien Nocera
b6d7bb856d display: Don't show rotation for builtin display on tablets
If there's an accelerometer builtin to the display, don't show the
rotation buttons, it will be handled by the user rotating the display,
eventually with the rotation lock in use.

https://bugzilla.gnome.org/show_bug.cgi?id=750410
2015-06-08 15:07:56 +02:00
Rui Matos
03d9a96c67 display: Close the dialog when the RR configuration changes
We assume that the RR configuration is valid in various callbacks from
both our modal dialogs which doesn't hold if there's an hotplug while
a dialog is open (e.g. monitor is plugged/unplugged).

Closing the dialog in that case seems the right thing to do since it
would be operating on an outdated view of the world otherwise and
likely end up crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=655041
2015-04-13 14:05:49 +02:00
Rui Matos
0d6369a762 display: Don't leak GnomeRRModes
GnomeRRMode is a boxed type which means that if stored as such in a
tree model, the model creates a copy to use internally. In addition,
it means that gtk_tree_model_get() will also get a copy which must be
freed by the caller which we were not doing.

In this case though, we don't need the copies since all the
GnomeRRModes that we use outlive the model so we can simplify things
by just storing a plain pointer in the model instead.

https://bugzilla.gnome.org/show_bug.cgi?id=655041
2015-04-13 14:05:49 +02:00
Rui Matos
5e0b26dac5 display: Fix GtkListStore leak in setup dialog
https://bugzilla.gnome.org/show_bug.cgi?id=655041
2015-04-13 14:05:49 +02:00
Rui Matos
511265e574 display: In clone mode, set geometry of all outputs when one changes
Otherwise we could fail to validate the new configuration depending on
which output we're initializing mirror mode from.

gnome_rr_config_applicable() creates a temporary array of outputs for
validation and, in clone mode, all of them are assigned the same
geometry but, since it lacks context about which output the user is
currently on, it just uses the first one's geometry for all of
them. If this first output isn't the one the user is changing in the
UI then we never called _set_geometry() on it with a clone mode
geometry and thus the validation would fail because the geometry used
is that output's current mode which might not match the clone mode's.

https://bugzilla.gnome.org/show_bug.cgi?id=743816
2015-02-23 19:38:56 +01:00
Rui Matos
c6970ec8eb display: Replace CcRRLabeler with gnome-shell's DBus monitor labeler
CcRRLabeler assumes an X11 session using override redirect toplevel
windows which are positioned in global desktop coordinates. Since this
isn't available on Wayland sessions, we're moving to a DBus API which
gnome-shell implements and works the same on both X11 an Wayland
sessions.

As side-effects, we get native looking gnome-shell OSD labels without
having to mimic the style ourselves and we're also now able to easily
show labels on mirrored setups.

https://bugzilla.gnome.org/show_bug.cgi?id=743743
2015-02-05 14:37:05 +01:00
Elias Toivanen
ef72c19ebf Tooltips for the rotation buttons in Displays
When rotating a screen, the user has to first select the kind of
rotation and then press Apply. However, the meaning of the symbolic
icons may not be clear before actually pressing one of them.

This patch adds appropriate tooltips to the buttons so that the user has
a textual clue about what is going to happen.

https://bugzilla.gnome.org/show_bug.cgi?id=743888
2015-02-03 08:40:25 -06:00
Michael Catanzaro
1522790461 displays: Apply buttons should use suggested-action style class
https://bugzilla.gnome.org/show_bug.cgi?id=743216
2015-01-20 07:43:31 -06:00
Rui Matos
dd05918a40 display: Fix deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
Rui Matos
30590061fc display: Drop deprecated API usage on FooScrollArea painting
This achieves a very similar result (darkening the background color)
without having to peek into the style context. Note that the stroke
is removed because it isn't really visible anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
Christophe Fergeau
492ebb57d5 display: Use AM_CPPFLAGS rather than INCLUDES
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')

https://bugzilla.gnome.org/show_bug.cgi?id=732189
2014-06-25 12:28:18 +02:00
Bastien Nocera
d632e5988e display: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
2014-06-24 11:35:31 +02:00
Bastien Nocera
b50e712ac7 display: Remove shadowing variable
https://bugzilla.gnome.org/show_bug.cgi?id=731166
2014-06-05 17:16:41 +02:00
Bastien Nocera
42b1209130 display: Fix problems when left-most monitor is rotated
When rotating the left-most monitor, we could end up with one
of two scenarios:
- Huge gap between monitor one and two when the left monitor is made
to be vertical
- Monitor two overlapping on top of monitor one when monitor is
back to being horizontal.

In addition to adding a bit more debug, we now take the old and new
rotation of monitor one into account when calculating the moving
screen edges.

https://bugzilla.gnome.org/show_bug.cgi?id=731166
2014-06-05 17:16:41 +02:00
Bastien Nocera
27fa69a0ca display: Move apply_rotation_to_geometry()
https://bugzilla.gnome.org/show_bug.cgi?id=731166
2014-06-05 17:16:41 +02:00
Bastien Nocera
4ab4c18219 display: Check whether the rotation changes when relayouting
Consider whether rotation has changed when checking whether
we need to relayout the screens. Before, we would only have changed the
layout if the resolution changed.

This doesn't fix the problem of the relayouting code not taking rotation
into account, but it will at least allow us to run that code when only
the rotation changes.

https://bugzilla.gnome.org/show_bug.cgi?id=731166
2014-06-05 17:16:41 +02:00
Bastien Nocera
1e6ea54aaf display: Split out rotation sanity checking
https://bugzilla.gnome.org/show_bug.cgi?id=731166
2014-06-05 17:16:41 +02:00
Giovanni Campagna
64b3fdc2fc display: make the Apply button unsensitive for invalid configuration
If the configuration is not applicable, due to HW constraints we
know about, make the button insensitive, to avoid an error dialog
later on.

https://bugzilla.gnome.org/show_bug.cgi?id=727023
2014-06-04 16:49:11 +02:00
Rui Matos
7d9da10ab3 display: Add "Monitor" to keywords
It's a likely word that might be used when looking for this panel and,
with the new search results ordering, the power panel is coming up
ahead due to it preferring keyword matches when they exist.

https://bugzilla.gnome.org/show_bug.cgi?id=729027
2014-05-16 11:59:49 +02:00
Carlos Soriano
61453b1dbb display: Add edge thickness to labeler
The edge antialising in the label was bad due to the
small thickness.
Adding one pixel more to the thickness
looks better.

https://bugzilla.gnome.org/show_bug.cgi?id=727887
2014-04-29 14:32:51 +02:00
Yosef Or Boczko
9a62d82399 display: Use header bar in the dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=724299
2014-04-28 17:29:17 +03:00
Debarshi Ray
50b0383913 display: Remove redundant statement and variable definition
https://bugzilla.gnome.org/show_bug.cgi?id=727023
2014-04-02 17:55:43 +02:00
Debarshi Ray
63bf6aaf4b display: Silence -Wmaybe-uninitialized
We create rotate_box only when show_rotation is TRUE, and the
conditions for checking the different kinds of rotation do not make
sense when show_rotation is FALSE.

https://bugzilla.gnome.org/show_bug.cgi?id=727023
2014-04-02 17:45:51 +02:00
Debarshi Ray
71dc845389 Revert "Revert "display: Update for libupower-glib API changes""
This was never meant to be pushed.

This reverts commit f5b6fac376.
2014-02-17 19:57:25 +01:00
Debarshi Ray
f5b6fac376 Revert "display: Update for libupower-glib API changes"
This reverts commit 8ba50267be.
2014-02-17 19:53:29 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Cosimo Cecchi
d0a832b00f display: show only rotation options if we support them
Use the new libgnome-desktop API and determine if we can show or not
rotation options.

https://bugzilla.gnome.org/show_bug.cgi?id=721673
2014-01-09 09:43:33 -08:00
Cosimo Cecchi
53801be82a display: hide Size label when empty
We currently just display an empty string next to the Size row if we
can't compute that information. Hide it instead.

https://bugzilla.gnome.org/show_bug.cgi?id=721673
2014-01-07 09:50:59 -08:00
Matthias Clasen
732d3e04c3 display: Add an 'upside-down' button
Turn the rotation buttons into toggle buttons, and add one for
'upside-down'.

https://bugzilla.gnome.org/show_bug.cgi?id=715092
2013-12-05 17:14:57 -05:00
Yosef Or Boczko
5ac88138b9 display: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:27:27 +02:00
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05:00
Bastien Nocera
8ba50267be display: Update for libupower-glib API changes
There's no "changed" signal anymore.
2013-10-30 12:10:59 +01:00
Thomas Wood
17126cc740 display: always label the built in display as "1"
https://bugzilla.gnome.org/show_bug.cgi?id=709168
2013-10-04 15:02:20 +01:00