forked from pool/gnome-control-center
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-control-center?expand=0&rev=8
This commit is contained in:
parent
b016c0d365
commit
7eb3663f61
68
gnome-control-center-monitor-labeling.diff
Normal file
68
gnome-control-center-monitor-labeling.diff
Normal file
@ -0,0 +1,68 @@
|
||||
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
|
||||
index 23d3c5d..faa75a7 100644
|
||||
--- a/capplets/display/xrandr-capplet.c
|
||||
+++ b/capplets/display/xrandr-capplet.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
||||
#include <libgnomeui/gnome-rr.h>
|
||||
#include <libgnomeui/gnome-rr-config.h>
|
||||
+#include <libgnomeui/gnome-rr-labeler.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <glib/gi18n.h>
|
||||
@@ -40,6 +41,7 @@ struct App
|
||||
{
|
||||
GnomeRRScreen *screen;
|
||||
GnomeRRConfig *current_configuration;
|
||||
+ GnomeRRLabeler *labeler;
|
||||
GnomeOutputInfo *current_output;
|
||||
|
||||
GtkWidget *dialog;
|
||||
@@ -139,6 +141,13 @@ on_screen_changed (GnomeRRScreen *scr,
|
||||
qsort (app->current_configuration->outputs, i, sizeof (GnomeOutputInfo *),
|
||||
compare_outputs);
|
||||
|
||||
+ if (app->labeler) {
|
||||
+ gnome_rr_labeler_hide (app->labeler);
|
||||
+ g_object_unref (app->labeler);
|
||||
+ }
|
||||
+
|
||||
+ app->labeler = gnome_rr_labeler_new (app->current_configuration);
|
||||
+
|
||||
#if 0
|
||||
for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
|
||||
{
|
||||
@@ -1351,6 +1360,8 @@ paint_output (App *app, cairo_t *cr, int i)
|
||||
PangoRectangle extent;
|
||||
GdkRectangle viewport;
|
||||
double angle;
|
||||
+ GdkColor output_color;
|
||||
+ double r, g, b;
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
@@ -1420,10 +1431,20 @@ paint_output (App *app, cairo_t *cr, int i)
|
||||
cairo_rectangle (cr, x, y, w * scale + 0.5, h * scale + 0.5);
|
||||
cairo_clip_preserve (cr);
|
||||
|
||||
- if (output->on)
|
||||
- cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
|
||||
- else
|
||||
- cairo_set_source_rgba (cr, 0.2, 0.2, 0.2, 1.0);
|
||||
+ gnome_rr_labeler_get_color_for_output (app->labeler, output, &output_color);
|
||||
+ r = output_color.red / 65535.0;
|
||||
+ g = output_color.green / 65535.0;
|
||||
+ b = output_color.blue / 65535.0;
|
||||
+
|
||||
+ if (!output->on)
|
||||
+ {
|
||||
+ /* If the output is turned off, just darken the selected color */
|
||||
+ r *= 0.2;
|
||||
+ g *= 0.2;
|
||||
+ b *= 0.2;
|
||||
+ }
|
||||
+
|
||||
+ cairo_set_source_rgba (cr, r, g, b, 1.0);
|
||||
|
||||
foo_scroll_area_add_input_from_fill (FOO_SCROLL_AREA (app->area),
|
||||
cr, on_output_event, output);
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 15 18:26:15 CEST 2008 - federico@novell.com
|
||||
|
||||
- Added gnome-control-center-monitor-labeling.diff to implement
|
||||
labeling of physical monitors while their properties are being set
|
||||
in the Display capplet.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 5 18:36:46 CEST 2008 - rodrigo@suse.de
|
||||
|
||||
|
@ -26,7 +26,7 @@ Group: System/GUI/GNOME
|
||||
Obsoletes: fontilus themus acme
|
||||
Provides: fontilus themus acme
|
||||
Version: 2.23.6
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: The GNOME Control Center
|
||||
Source: gnome-%{_name}-%{version}.tar.bz2
|
||||
Source1: control-center-art.tar.bz2
|
||||
@ -51,6 +51,8 @@ Requires: gnome-icon-theme
|
||||
Patch28: gnome-control-center-use-preferences-menu.patch
|
||||
# PATCH-FIX-OPENSUSE gnome-control-center-bnc373197-layout-switch-keybinding.patch bnc373197 vuntz@novell.com -- this is a temporary hack to change the default layout switching keybinding
|
||||
Patch30: gnome-control-center-bnc373197-layout-switch-keybinding.patch
|
||||
# PATCH-FEATURE-UPSTREAM gnome-control-center-monitor-labeling.diff fate304764 federico@novell.com - Label physical monitors while setting their RANDR properites
|
||||
Patch31: gnome-control-center-monitor-labeling.diff
|
||||
Url: http://www.gnome.org
|
||||
Requires: nautilus gnome-settings-daemon
|
||||
Requires: %{name}-lang = %{version}
|
||||
@ -110,6 +112,7 @@ gnome-patch-translation-prepare
|
||||
cp %{S:3} capplets/passwd/change-password.png
|
||||
%patch28
|
||||
%patch30 -p1
|
||||
%patch31 -p1
|
||||
gnome-patch-translation-update
|
||||
|
||||
%build
|
||||
@ -231,6 +234,10 @@ fi
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%changelog
|
||||
* Fri Aug 15 2008 federico@novell.com
|
||||
- Added gnome-control-center-monitor-labeling.diff to implement
|
||||
labeling of physical monitors while their properties are being set
|
||||
in the Display capplet.
|
||||
* Tue Aug 05 2008 rodrigo@suse.de
|
||||
- Update to version 2.23.6:
|
||||
+ Various fixes and improvements
|
||||
|
Loading…
x
Reference in New Issue
Block a user