The labels would get clipped if the monitor rectangles were too small,
thus making the labels unreadable. Now we ensure that the ink_rect of
the text fits, and we center the text based on its logical_rect.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
We used to sort the outputs by their X coordinate, maybe to display a list of them in a
reasonable order. However, we don't display such a list at all, so it doesn't make
sense to sort the outputs. This also makes the capplet use the same ordering for outputs
as gnome-settings-daemon for GnomeRRLabeler's purposes, so that the colors for the outputs
match in both the capplet and g-s-d.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Previously we were picking the output's highest-supported resolution, which is not
always the same as its preferred resolution. We also do this while actually turning
the output on, not as a side effect of rebuilding the resolution combo.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
In case the RANDR configuration cannot be applied, gnome-settings-daemon already
pops up an error message. So, don't pop up another error of our own.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
There is no timestamp available when the dialog returns from gtk_dialog_run().
So, we save the timestamp at the time the Apply button is clicked.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
The horizontal coordinate was not always being updated.
Also, ensure that outputs are at y=0.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
The labels are always painted against a light pastel background. Using
the theme's colors makes the label hard to read on 'inverse' themes.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
so that it can make its confirmation window a child of the parent.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9376
2009-03-11 Gabor Kelemen <kelemeng@gnome.hu>
* xrandr-capplet.c: Make the strings of the Rotation dialog appear
translated. Bug #574693.
svn path=/trunk/; revision=9336
2009-02-08 Jens Granseuer <jensgr@gmx.net>
* display-capplet.glade:
* display-properties.desktop.in.in: change window title and menu entry
name to "Display"/"Display Preferences" to be consistent with other
settings dialogs (bug #570907)
svn path=/trunk/; revision=9248
We'll need this to maintain state for the D-bus async callback.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9241
2009-02-04 Federico Mena Quintero <federico@novell.com>
https://bugzilla.novell.com/show_bug.cgi?id=434729 - Realign the
outputs when changing the resolution of one of them, so one
doesn't get overlapping monitors (when the resolution becomes
bigger) or disjoint monitors (when the resolution becomes smaller).
* xrandr-capplet.c (on_resolution_changed): Align the monitors.
(realign_outputs_after_resolution_change): New function. The
algorithm here could certainly be improved...
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9238
2008-12-18 Federico Mena Quintero <federico@novell.com>
https://bugzilla.novell.com/show_bug.cgi?id=433939 - It's not
obvious how to turn on a new monitor.
* display-capplet.glade: Add On/Off radio buttons for the selected
monitor, as it is hard to find that the on/off state is actually
set by the Resolution combo.
* xrandr-capplet.c (rebuild_gui): Don't set sensitivity of
resolution_combo here...
(rebuild_resolution_combo): ... but do it here instead. This is
so that we can match the state of the monitor on/off buttons.
(rebuild_on_off_radios): New function. We set the on/off radio
buttons based on the "on" state of the current output.
(monitor_on_off_toggled_cb): New callback; we toggle the current
output's on/off state.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9186
2008-12-18 Federico Mena Quintero <federico@novell.com>
* xrandr-capplet.c (select_current_output_from_dialog_position):
Fix the type of the "output" variable.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9185
2008-12-16 Federico Mena Quintero <federico@novell.com>
https://bugzilla.novell.com/show_bug.cgi?id=450141 - Help button
in the Display capplet does nothing.
* xrandr-capplet.c (run_application): Hide the Help button as we
have no help to show for this capplet yet.
(hide_help_button): New function.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9176
2008-12-15 Federico Mena Quintero <federico@novell.com>
* xrandr-capplet.c (on_screen_changed): Use
select_current_output_from_dialog_position() instead of selecting
an output ourselves.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9171
2008-12-15 Federico Mena Quintero <federico@novell.com>
* xrandr-capplet.c (select_current_output_from_dialog_position):
New function.
(dialog_map_event_cb): New GtkWidget::map-event handler for the
toplevel dialog. When the dialog gets mapped, we make the current
output be the one which actually contains the dialog window, so
that the user can edit the monitor which he's looking at.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9170
2008-12-15 Federico Mena Quintero <federico@novell.com>
* display-capplet.glade: Put the "Monitor" label inside an event
box, so we can change the background color of the event box. Give
names to both widgets: current_monitor_label,
current_monitor_event_box.
* xrandr-capplet.c (rebuild_gui): When a monitor is selected,
update the "Monitor" label to include the monitor's name and color
so the user will know which monitor he is editing.
(rebuild_current_monitor_label): New function.
(struct App): New fields current_monitor_label,
current_monitor_event_box.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9168
2008-12-12 Federico Mena Quintero <federico@novell.com>
https://bugzilla.novell.com/show_bug.cgi?id=381030 - Prettify the
Display capplet's dialog
* display-capplet.glade: Use the HIG's recommended colons,
capitalization, and spacing. Use headers to separate the Monitor
options from the Panel icon option. Add instructions on how to
operate the draggable monitors.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9167
2008-12-03 Federico Mena Quintero <federico@novell.com>
* xrandr-capplet.c (rebuild_rotation_combo): Pass a NULL error
argument to gnome_rr_config_applicable; we should really show why
that rotation is not available.
(apply): Use the new DBus interface from the XRANDR plugin in
g-s-d instead of an X client message. Display an error if g-s-d
couldn't apply the monitor configuration.
(on_detect_displays): Display an error if detecting the displays fails.
(run_application): Display error messages.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=9163