Create a GnomeRRLabeler when getting a new screen configuration
Signed-off-by: Federico Mena Quintero <federico@novell.com> svn path=/trunk/; revision=8863
This commit is contained in:
parent
3f2068f502
commit
a4a7ac50fb
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-08-13 Federico Mena Quintero <federico@novell.com>
|
||||||
|
|
||||||
|
* xrandr-capplet.c (on_screen_changed): Create a GnomeRRLabeler
|
||||||
|
based on the current screen configuration, so that the physical
|
||||||
|
monitors will be labeled while the capplet is up.
|
||||||
|
(struct App): New field "labeler".
|
||||||
|
|
||||||
2008-08-11 Jens Granseuer <jensgr@gmx.net>
|
2008-08-11 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* xrandr-capplet.c: (run_application): fail gracefully if we cannot
|
* xrandr-capplet.c: (run_application): fail gracefully if we cannot
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
||||||
#include <libgnomeui/gnome-rr.h>
|
#include <libgnomeui/gnome-rr.h>
|
||||||
#include <libgnomeui/gnome-rr-config.h>
|
#include <libgnomeui/gnome-rr-config.h>
|
||||||
|
#include <libgnomeui/gnome-rr-labeler.h>
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
@ -40,6 +41,7 @@ struct App
|
||||||
{
|
{
|
||||||
GnomeRRScreen *screen;
|
GnomeRRScreen *screen;
|
||||||
GnomeRRConfig *current_configuration;
|
GnomeRRConfig *current_configuration;
|
||||||
|
GnomeRRLabeler *labeler;
|
||||||
GnomeOutputInfo *current_output;
|
GnomeOutputInfo *current_output;
|
||||||
|
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
@ -139,6 +141,13 @@ on_screen_changed (GnomeRRScreen *scr,
|
||||||
qsort (app->current_configuration->outputs, i, sizeof (GnomeOutputInfo *),
|
qsort (app->current_configuration->outputs, i, sizeof (GnomeOutputInfo *),
|
||||||
compare_outputs);
|
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
|
#if 0
|
||||||
for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
|
for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue