rpms/control-center/devel add-randr12-capplet.patch, 1.6, 1.7 control-center.spec, 1.335, 1.336
Soren Sandmann Pedersen (ssp)
fedora-extras-commits at redhat.com
Mon Feb 4 14:00:34 UTC 2008
Author: ssp
Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9070
Modified Files:
add-randr12-capplet.patch control-center.spec
Log Message:
Update randr capplet
add-randr12-capplet.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.6 -r 1.7 add-randr12-capplet.patch
Index: add-randr12-capplet.patch
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/add-randr12-capplet.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- add-randr12-capplet.patch 31 Jan 2008 21:57:09 -0000 1.6
+++ add-randr12-capplet.patch 4 Feb 2008 14:00:21 -0000 1.7
@@ -1,6 +1,6 @@
diff -up /dev/null gnome-control-center-2.21.90/capplets/display/edid.h
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-control-center-2.21.90/capplets/display/edid.h 2008-01-31 16:51:14.000000000 -0500
++++ gnome-control-center-2.21.90/capplets/display/edid.h 2008-02-04 08:26:21.000000000 -0500
@@ -0,0 +1,169 @@
+typedef unsigned char uchar;
+typedef struct MonitorInfo MonitorInfo;
@@ -173,7 +173,7 @@
+char * make_display_name (const MonitorInfo *info);
diff -up /dev/null gnome-control-center-2.21.90/capplets/display/foo-marshal.c
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-control-center-2.21.90/capplets/display/foo-marshal.c 2008-01-31 16:51:14.000000000 -0500
++++ gnome-control-center-2.21.90/capplets/display/foo-marshal.c 2008-02-04 08:26:21.000000000 -0500
@@ -0,0 +1,279 @@
+
+#include <glib-object.h>
@@ -456,7 +456,7 @@
+
diff -up /dev/null gnome-control-center-2.21.90/capplets/display/edid-parse.c
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-control-center-2.21.90/capplets/display/edid-parse.c 2008-01-31 16:51:14.000000000 -0500
++++ gnome-control-center-2.21.90/capplets/display/edid-parse.c 2008-02-04 08:26:21.000000000 -0500
@@ -0,0 +1,551 @@
+/*
+ * Copyright 2007 Red Hat, Inc.
@@ -1011,7 +1011,7 @@
+}
diff -up /dev/null gnome-control-center-2.21.90/capplets/display/foo-marshal.h
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-control-center-2.21.90/capplets/display/foo-marshal.h 2008-01-31 16:51:14.000000000 -0500
++++ gnome-control-center-2.21.90/capplets/display/foo-marshal.h 2008-02-04 08:26:21.000000000 -0500
@@ -0,0 +1,63 @@
+
+#ifndef __foo_marshal_MARSHAL_H__
@@ -1078,7 +1078,7 @@
+
diff -up /dev/null gnome-control-center-2.21.90/capplets/display/scrollarea.c
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-control-center-2.21.90/capplets/display/scrollarea.c 2008-01-31 16:51:14.000000000 -0500
++++ gnome-control-center-2.21.90/capplets/display/scrollarea.c 2008-02-04 08:26:21.000000000 -0500
@@ -0,0 +1,1902 @@
+#include <gdk/gdkprivate.h> /* For GDK_PARENT_RELATIVE_BG */
+#include "scrollarea.h"
@@ -2984,8 +2984,8 @@
+#endif
diff -up /dev/null gnome-control-center-2.21.90/capplets/display/monitor-db.c
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-control-center-2.21.90/capplets/display/monitor-db.c 2008-01-31 16:51:14.000000000 -0500
-@@ -0,0 +1,759 @@
++++ gnome-control-center-2.21.90/capplets/display/monitor-db.c 2008-02-04 08:26:21.000000000 -0500
+@@ -0,0 +1,1197 @@
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
@@ -3031,75 +3031,15 @@
+ gpointer data,
+ GError **err);
+
-+typedef struct Parser Parser;
-+
-+static void
-+emit_configuration (Configuration *config,
-+ GString *string)
-+{
-+ int j;
-+
-+ g_string_append_printf (string, "<configuration>\n");
-+
-+ for (j = 0; config->outputs[j] != NULL; ++j)
-+ {
-+ Output *output = config->outputs[j];
-+
-+ g_string_append_printf (
-+ string, " <output name=\"%s\">\n", output->name);
-+
-+ if (output->connected && *output->vendor != '\0')
-+ {
-+ g_string_append_printf (
-+ string, " <vendor>%s</vendor>\n", output->vendor);
-+ g_string_append_printf (
-+ string, " <product>0x%04x</product>\n", output->product);
-+ g_string_append_printf (
-+ string, " <serial>0x%08x</serial>\n", output->serial);
-+ }
-+
-+ /* An unconnected output which is on does not make sense */
-+ if (output->connected && output->on)
-+ {
-+ g_string_append_printf (
-+ string, " <width>%d</width>\n", output->width);
-+ g_string_append_printf (
-+ string, " <height>%d</height>\n", output->height);
-+ g_string_append_printf (
-+ string, " <rate>%d</rate>\n", output->rate);
-+ g_string_append_printf (
-+ string, " <x>%d</x>\n", output->x);
-+ g_string_append_printf (
-+ string, " <y>%d</y>\n", output->y);
-+ }
-+
-+ g_string_append_printf (string, " </output>\n");
-+ }
-+
-+ g_string_append_printf (string, "</configuration>\n");
-+}
-+
-+static void
-+emit_configurations (Configuration **configs,
-+ GString *string)
-+{
-+ int i;
-+
-+ for (i = 0; configs[i] != NULL; ++i)
-+ emit_configuration (configs[i], string);
-+}
-+
-+void
-+configurations_dump (Configuration **configs)
-+{
-+ GString *output = g_string_new ("");
++typedef struct CrtcAssignment CrtcAssignment;
+
-+ emit_configurations (configs, output);
++static void crtc_assignment_apply (CrtcAssignment *assign);
++static CrtcAssignment *crtc_assignment_new (RWScreen *screen,
++ Output **outputs);
++static void crtc_assignment_free (CrtcAssignment *assign);
+
-+ g_print ("%s\n", output->str);
+
-+ g_string_free (output, TRUE);
-+}
++typedef struct Parser Parser;
+
+/* Parser for monitor configurations */
+struct Parser
@@ -3174,7 +3114,8 @@
+ g_assert (parser->output == NULL);
+
+ parser->output = g_new0 (Output, 1);
-+
++ parser->output->rotation = 0;
++
+ for (i = 0; attr_names[i] != NULL; ++i)
+ {
+ if (strcmp (attr_names[i], "name") == 0)
@@ -3201,6 +3142,7 @@
+ g_assert (parser->configuration == NULL);
+
+ parser->configuration = g_new0 (Configuration, 1);
++ parser->configuration->outputs = g_new0 (Output *, 1);
+ }
+
+ g_queue_push_tail (parser->stack, g_strdup (name));
@@ -3216,14 +3158,11 @@
+
+ if (strcmp (name, "output") == 0)
+ {
++ if (parser->output->rotation == 0)
++ parser->output->rotation = RW_ROTATION_0;
++
+ g_ptr_array_add (parser->outputs, parser->output);
+
-+#if 0
-+ g_print (
-+ "%s output %s\n", parser->output->connected?
-+ "Connected" : "Unconnected", parser->output->name);
-+#endif
-+
+ parser->output = NULL;
+ }
+ else if (strcmp (name, "configuration") == 0)
@@ -3297,6 +3236,39 @@
+
+ parser->output->rate = parse_int (text);
+ }
++ else if (stack_is (parser, "rotation", "output", "configuration", NULL))
++ {
++ if (strcmp (text, "normal") == 0)
++ {
++ parser->output->rotation |= RW_ROTATION_0;
++ }
++ else if (strcmp (text, "left") == 0)
++ {
++ parser->output->rotation |= RW_ROTATION_90;
++ }
++ else if (strcmp (text, "upside_down") == 0)
++ {
++ parser->output->rotation |= RW_ROTATION_180;
++ }
++ else if (strcmp (text, "right") == 0)
[...2805 lines suppressed...]
-+ setting->output = output;
-+ setting->mode = mode;
-+ setting->x = x;
-+ setting->y = y;
-+
-+ g_ptr_array_add (a, setting);
-+}
-+
-+static void
-+pop (GPtrArray *a)
-+{
-+ g_free (g_ptr_array_remove_index (a, a->len - 1));
-+}
-+
-+typedef gboolean (* ForeachFunc) (Setting **settings, gpointer data);
-+
-+static gboolean
-+foreach_setting_list (RWScreen *screen,
-+ GPtrArray *settings,
-+ Output **outputs,
-+ ForeachFunc func,
-+ gpointer data)
-+{
-+ gboolean result;
-+
-+ if (*outputs == NULL)
-+ {
-+ g_ptr_array_add (settings, NULL);
-+
-+ result = func ((Setting **)settings->pdata, data);
-+
-+ g_ptr_array_remove_index (settings, settings->len - 1);
-+ }
-+ else
-+ {
-+ Output *output = *outputs;
-+ RWOutput *rw_output = rw_screen_get_output_by_name (
-+ screen, output->name);
-+ RWMode **modes = rw_output_list_modes (rw_output);
-+ int i;
-+
-+ if (!output->connected || !output->on)
-+ {
-+#if 0
-+ g_print ("%s is not connected\n", output->name);
-+#endif
-+ push (settings, rw_output, NULL, 0, 0);
-+
-+ result = foreach_setting_list (screen, settings, outputs + 1, func, data);
-+
-+ pop (settings);
-+ }
-+ else
-+ {
-+ result = FALSE;
-+
-+#if 0
-+ g_print ("%s modes (%p)\n", output->name, output);
-+#endif
-+
-+ for (i = 0; modes[i] != NULL; ++i)
-+ {
-+ RWMode *mode = modes[i];
-+
-+#if 0
-+ g_print ("%d x %d x %d match mode %d x %d x %d\n",
-+ output->width, output->height, output->rate,
-+ rw_mode_get_width (mode),
-+ rw_mode_get_height (mode),
-+ rw_mode_get_freq (mode));
-+#endif
-+
-+ if (rw_mode_get_width (mode) == output->width &&
-+ rw_mode_get_height (mode) == output->height &&
-+ rw_mode_get_freq (mode) == output->rate)
-+ {
-+ push (settings, rw_output, mode, output->x, 0);
-+
-+ result = foreach_setting_list (
-+ screen, settings, outputs + 1, func, data);
-+
-+ pop (settings);
-+
-+ if (result)
-+ break;
-+ }
-+ }
-+ }
-+ }
-+
-+ return result;
-+}
-+
-+static gboolean
-+try_settings (Setting **settings, gpointer data)
-+{
-+ RWScreen *screen = data;
-+ CrtcAssignment *assignment;
-+#if 0
-+ int i;
-+#endif
-+
-+#if 0
-+ g_print ("found setting\n");
-+#endif
-+
-+ assignment = assign_crtcs (screen, settings);
-+
-+#if 0
-+ for (i = 0; settings[i] != NULL; ++i)
-+ {
-+ RWMode *mode = settings[i]->mode;
-+
-+ g_print ("%s => ", rw_output_get_name (settings[i]->output));
-+
-+ if (mode)
-+ {
-+ g_print ("%d x %d x %d\n",
-+ rw_mode_get_width (mode),
-+ rw_mode_get_height (mode),
-+ rw_mode_get_freq (mode));
-+ }
-+ else
-+ {
-+ g_print ("off\n");
-+ }
-+ }
-+#endif
-+
-+ if (assignment)
-+ {
-+ crtc_assignment_apply (assignment);
-+
-+ crtc_assignment_free (assignment);
-+
-+ return TRUE;
-+ }
-+ else
-+ {
-+ return FALSE;
-+ }
-+}
-+
-+/* This should go in g-s-d eventually */
-+void
-+apply_stored_configuration (RWScreen *screen)
-+{
-+ char *file = g_build_filename (
-+ g_get_home_dir(), ".gnome2", "monitors.xml", NULL);
-+ Configuration **configs = configurations_read (file, NULL);
-+ Configuration *current = configuration_new_current (screen);
-+ Configuration *found;
-+
-+ if ((found = configuration_find (configs, current)))
-+ {
-+ GPtrArray *array = g_ptr_array_new ();
-+
-+ g_print ("found\n");
-+
-+ foreach_setting_list (
-+ screen, array, found->outputs,
-+ try_settings, screen);
-+
-+ g_ptr_array_free (array, TRUE);
-+ }
-+ else
-+ {
-+ g_print ("Not found\n");
-+ }
-+
-+ configuration_free (current);
-+ configurations_free (configs);
-+
-+ g_free (file);
-+}
-+
-+/* Some potentially useful code */
-+
-+#if 0
-+ found = configuration_find (app->all_configurations, current);
-+ if (found)
-+ {
-+ g_print ("config found\n");
-+
-+ configuration_free (current);
-+
-+ current = found;
-+ }
-+ else
-+ {
-+ g_print ("config not found, adding\n");
-+
-+ app->all_configurations = configurations_add (
-+ app->all_configurations, current);
-+ }
-+
-+ g_assert (configuration_find (app->all_configurations, current));
-+
-+#endif
++/* Not used anymore */
Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.335
retrieving revision 1.336
diff -u -r1.335 -r1.336
--- control-center.spec 31 Jan 2008 21:57:09 -0000 1.335
+++ control-center.spec 4 Feb 2008 14:00:21 -0000 1.336
@@ -3,7 +3,7 @@
%define glib2_version 2.13.0
%define gtk2_version 2.11.6
%define gconf2_version 1.2.0
-%define gnome_desktop_version 2.21.90-2
+%define gnome_desktop_version 2.21.90-5
%define libgnome_version 2.3.0
%define libbonobo_version 2.3.0
%define libgnomeui_version 2.3.0
@@ -22,7 +22,7 @@
Summary: GNOME Control Center
Name: control-center
Version: 2.21.90
-Release: 5%{?dist}
+Release: 6%{?dist}
Epoch: 1
License: GPLv2+ and GFDL
Group: User Interface/Desktops
@@ -349,6 +349,9 @@
%dir %{_datadir}/gnome-control-center/keybindings
%changelog
+* Mon Feb 4 2008 Soren Sandmann <sandmann at redhat.com> - 2.21.90-6
+- Update randr capplet - now with rotation
+
* Thu Jan 29 2008 Soren Sandmann <sandmann at redhat.com> - 2.21.90-5
- Update randr capplet
More information about the fedora-extras-commits
mailing list