rpms/control-center/devel add-randr12-capplet.patch, 1.12, 1.13 control-center.spec, 1.347, 1.348

Soren Sandmann Pedersen (ssp) fedora-extras-commits at redhat.com
Thu Mar 20 05:35:06 UTC 2008


Author: ssp

Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22490

Modified Files:
	add-randr12-capplet.patch control-center.spec 
Log Message:
Update randr panel

add-randr12-capplet.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.12 -r 1.13 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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- add-randr12-capplet.patch	2 Mar 2008 22:32:01 -0000	1.12
+++ add-randr12-capplet.patch	20 Mar 2008 05:34:47 -0000	1.13
@@ -1,3792 +1,4294 @@
-diff -up /dev/null gnome-control-center-2.21.92/capplets/display/display-capplet.glade
---- /dev/null	2008-02-19 17:35:05.543056439 -0500
-+++ gnome-control-center-2.21.92/capplets/display/display-capplet.glade	2008-03-02 17:36:13.000000000 -0500
-@@ -0,0 +1,418 @@
-+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+diff -up /dev/null gnome-control-center-2.22.0/capplets/display/scrollarea.c
+--- /dev/null	2008-03-16 00:14:46.954006998 -0400
++++ gnome-control-center-2.22.0/capplets/display/scrollarea.c	2008-03-20 01:22:02.000000000 -0400
+@@ -0,0 +1,1902 @@
++#include <gdk/gdkprivate.h> /* For GDK_PARENT_RELATIVE_BG */
++#include "scrollarea.h"
++#include "foo-marshal.h"
 +
-+<glade-interface>
++G_DEFINE_TYPE (FooScrollArea, foo_scroll_area, GTK_TYPE_CONTAINER);
 +
-+<widget class="GtkDialog" id="dialog">
-+  <property name="border_width">18</property>
-+  <property name="title" translatable="yes"></property>
-+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-+  <property name="window_position">GTK_WIN_POS_NONE</property>
-+  <property name="modal">False</property>
-+  <property name="resizable">True</property>
-+  <property name="destroy_with_parent">False</property>
-+  <property name="decorated">True</property>
-+  <property name="skip_taskbar_hint">False</property>
-+  <property name="skip_pager_hint">False</property>
-+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-+  <property name="focus_on_map">True</property>
-+  <property name="urgency_hint">False</property>
-+  <property name="has_separator">False</property>
++static GtkWidgetClass *parent_class;
 +
-+  <child internal-child="vbox">
-+    <widget class="GtkVBox" id="dialog-vbox1">
-+      <property name="visible">True</property>
-+      <property name="homogeneous">False</property>
-+      <property name="spacing">0</property>
++typedef struct BackingStore BackingStore;
 +
-+      <child internal-child="action_area">
-+	<widget class="GtkHButtonBox" id="dialog-action_area1">
-+	  <property name="visible">True</property>
-+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
++typedef void (* ExposeFunc) (cairo_t *cr, GdkRegion *region, gpointer data);
 +
-+	  <child>
-+	    <widget class="GtkButton" id="helpbutton1">
-+	      <property name="visible">True</property>
-+	      <property name="can_default">True</property>
-+	      <property name="can_focus">True</property>
-+	      <property name="label">gtk-help</property>
-+	      <property name="use_stock">True</property>
-+	      <property name="relief">GTK_RELIEF_NORMAL</property>
-+	      <property name="focus_on_click">True</property>
-+	      <property name="response_id">-11</property>
-+	    </widget>
-+	  </child>
++#if 0
++static void          backing_store_draw (BackingStore *store, 
++					 GdkDrawable *dest,
++					 GdkRegion *clip,
++					 int dest_x,
++					 int dest_y);
++static void          backing_store_scroll (BackingStore *store,
++					   int dx, int dy);
++static void          backing_store_invalidate_rect (BackingStore *store,
++						    GdkRectangle *rect);
++static void          backing_store_invalidate_region (BackingStore *store,
++						      GdkRegion *region);
++static void          backing_store_invalidate_all (BackingStore *store);
++static BackingStore *backing_store_new (GdkWindow *window,
++					int width, int height);
++static void          backing_store_resize (BackingStore *store,
++					   int width, int height);
++static void          backing_store_process_updates (BackingStore *store,
++						    ExposeFunc func,
++						    gpointer data);
++static void	     backing_store_free (BackingStore *store);
++#endif
 +
-+	  <child>
-+	    <widget class="GtkButton" id="button1">
-+	      <property name="visible">True</property>
-+	      <property name="can_default">True</property>
-+	      <property name="can_focus">True</property>
-+	      <property name="label">gtk-apply</property>
-+	      <property name="use_stock">True</property>
-+	      <property name="relief">GTK_RELIEF_NORMAL</property>
-+	      <property name="focus_on_click">True</property>
-+	      <property name="response_id">-10</property>
-+	    </widget>
-+	  </child>
++typedef struct InputPath InputPath;
++typedef struct InputRegion InputRegion;
++typedef struct AutoScrollInfo AutoScrollInfo;
 +
-+	  <child>
-+	    <widget class="GtkButton" id="button2">
-+	      <property name="visible">True</property>
-+	      <property name="can_default">True</property>
-+	      <property name="can_focus">True</property>
-+	      <property name="label">gtk-close</property>
-+	      <property name="use_stock">True</property>
-+	      <property name="relief">GTK_RELIEF_NORMAL</property>
-+	      <property name="focus_on_click">True</property>
-+	      <property name="response_id">-7</property>
-+	    </widget>
-+	  </child>
-+	</widget>
-+	<packing>
-+	  <property name="padding">0</property>
-+	  <property name="expand">False</property>
-+	  <property name="fill">True</property>
-+	  <property name="pack_type">GTK_PACK_END</property>
-+	</packing>
-+      </child>
++struct InputPath
++{
++    gboolean			is_stroke;
++    cairo_fill_rule_t		fill_rule;
++    double			line_width;
++    cairo_path_t	       *path;		/* In canvas coordinates */
 +
-+      <child>
-+	<widget class="GtkVBox" id="vbox1">
-+	  <property name="visible">True</property>
-+	  <property name="homogeneous">False</property>
-+	  <property name="spacing">12</property>
++    FooScrollAreaEventFunc	func;
++    gpointer			data;
 +
-+	  <child>
-+	    <widget class="GtkLabel" id="label1">
-+	      <property name="visible">True</property>
-+	      <property name="label" translatable="yes"><b>Monitor Resolution Settings</b></property>
-+	      <property name="use_underline">False</property>
-+	      <property name="use_markup">True</property>
-+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-+	      <property name="wrap">False</property>
-+	      <property name="selectable">False</property>
-+	      <property name="xalign">0</property>
-+	      <property name="yalign">0.5</property>
-+	      <property name="xpad">0</property>
-+	      <property name="ypad">0</property>
-+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-+	      <property name="width_chars">-1</property>
-+	      <property name="single_line_mode">False</property>
-+	      <property name="angle">0</property>
-+	    </widget>
-+	    <packing>
-+	      <property name="padding">0</property>
-+	      <property name="expand">False</property>
-+	      <property name="fill">False</property>
-+	    </packing>
-+	  </child>
++    InputPath		       *next;
++};
 +
-+	  <child>
-+	    <widget class="GtkCheckButton" id="clone_checkbox">
-+	      <property name="visible">True</property>
-+	      <property name="can_focus">True</property>
-+	      <property name="label" translatable="yes">Mirror Screens (the clone wars)</property>
-+	      <property name="use_underline">True</property>
-+	      <property name="relief">GTK_RELIEF_NORMAL</property>
-+	      <property name="focus_on_click">True</property>
-+	      <property name="active">False</property>
-+	      <property name="inconsistent">False</property>
-+	      <property name="draw_indicator">True</property>
-+	    </widget>
-+	    <packing>
-+	      <property name="padding">0</property>
-+	      <property name="expand">False</property>
-+	      <property name="fill">False</property>
-+	    </packing>
-+	  </child>
++/* InputRegions are mutually disjoint */
++struct InputRegion
++{
++    GdkRegion *region;		/* the boundary of this area in canvas coordinates */
++    InputPath *paths;
++};
 +
-+	  <child>
-+	    <widget class="GtkAlignment" id="align">
-+	      <property name="visible">True</property>
-+	      <property name="xalign">0.5</property>
-+	      <property name="yalign">0.5</property>
[...6997 lines suppressed...]
 +
-+static void
-+backing_store_invalidate_all (BackingStore *store)
++static Atom
++gnome_randr_atom (void)
 +{
-+    GdkRectangle rect = { 0, 0, store->width, store->height };
-+    gdk_region_destroy (store->update_region);
-+    store->update_region = gdk_region_rectangle (&rect);
++    static Atom atom = None;
++
++    if (!atom)
++    {
++	atom = XInternAtom (gdk_x11_get_default_xdisplay(),
++			    "_GNOME_RANDR_ATOM", FALSE);
++    }
++
++    return atom;
 +}
 +
 +static void
-+backing_store_resize (BackingStore *store,
-+		      int           width,
-+		      int           height)
++apply (App *app)
 +{
-+    GdkPixmap *pixmap = gdk_pixmap_new (store->pixmap, width, height, -1);
++    GError *err = NULL;
 +
-+    /* Unfortunately we don't know in which direction we were resized,
-+     * so we just assume we were dragged from the south-east corner.
-+     *
-+     * Although, maybe we could get the root coordinates of the input-window?
-+     * That might just work, actually. We need to make sure metacity uses
-+     * static gravity for the window before this will be useful.
-+     */
-+    simple_draw_drawable (pixmap, store->pixmap, 0, 0, 0, 0, -1, -1);
++    configuration_sanitize (app->current_configuration);
 +
-+    g_object_unref (store->pixmap);
++    foo_scroll_area_invalidate (FOO_SCROLL_AREA (app->area));
++    
++    if (configuration_save (app->current_configuration, &err))
++    {
++	XEvent message;
 +
-+    store->pixmap = pixmap;
++	message.xclient.type = ClientMessage;
++	message.xclient.message_type = gnome_randr_atom();
++	message.xclient.format = 8;
 +
-+    /* FIXME: invalidate uncovered strip only */
++	g_print ("Sending client message\n");
 +
-+    backing_store_invalidate_all (store);
++	XSendEvent (gdk_x11_get_default_xdisplay(),
++		    gdk_x11_get_default_root_xwindow(),
++		    FALSE,
++		    StructureNotifyMask, &message);
++    }
 +}
 +
 +static void
-+cclip_to_region (cairo_t *cr, GdkRegion *region)
++run_application (App *app)
 +{
-+    int n_rects;
-+    GdkRectangle *rects;
++#ifndef GLADEDIR
++#define GLADEDIR "."
++#endif
++#define GLADE_FILE GLADEDIR "/display-capplet.glade"
++    GladeXML *xml;
++    GtkWidget *align;
 +
-+    gdk_region_get_rectangles (region, &rects, &n_rects);
++    xml = glade_xml_new (GLADE_FILE, NULL, NULL);
++    if (!xml)
++    {
++	g_warning ("Could not open " GLADE_FILE);
++	return;
++    }
++    
++    app->screen = rw_screen_new (gdk_screen_get_default(),
++				 on_screen_changed, app);
 +
-+    cairo_new_path (cr);
-+    while (n_rects--)
++    app->dialog = glade_xml_get_widget (xml, "dialog");
++
++    app->resolution_combo = glade_xml_get_widget (xml, "resolution_combo");
++    g_signal_connect (app->resolution_combo, "changed",
++		      G_CALLBACK (on_resolution_changed), app);
++
++    app->refresh_combo = glade_xml_get_widget (xml, "refresh_combo");
++    g_signal_connect (app->refresh_combo, "changed",
++		      G_CALLBACK (on_rate_changed), app);
++
++    app->rotation_combo = glade_xml_get_widget (xml, "rotation_combo");
++    g_signal_connect (app->rotation_combo, "changed",
++		      G_CALLBACK (on_rotation_changed), app);
++
++    app->clone_checkbox = glade_xml_get_widget (xml, "clone_checkbox");
++    g_signal_connect (app->clone_checkbox, "toggled",
++		      G_CALLBACK (on_clone_changed), app);
++
++    app->panel_checkbox = glade_xml_get_widget (xml, "panel_checkbox");
++    app->panel_label = glade_xml_get_widget (xml, "panel_label");
++
++    make_text_combo (app->resolution_combo, 4);
++    make_text_combo (app->refresh_combo, 3);
++    make_text_combo (app->rotation_combo, -1);
++    
++    g_assert (app->panel_checkbox);
++    
++    /* Scroll Area */
++    app->area = (GtkWidget *)foo_scroll_area_new ();
++
++    g_object_set_data (G_OBJECT (app->area), "app", app);
++    
++    /* FIXME: this should be computed dynamically */
++    foo_scroll_area_set_min_size (FOO_SCROLL_AREA (app->area), -1, 200);
++    gtk_widget_show (app->area);
++    g_signal_connect (app->area, "paint",
++		      G_CALLBACK (on_area_paint), app);
++    g_signal_connect (app->area, "viewport_changed",
++		      G_CALLBACK (on_viewport_changed), app);
++
++    align = glade_xml_get_widget (xml, "align");
++
++    gtk_container_add (GTK_CONTAINER (align), app->area);
++
++    on_screen_changed (app->screen, app);
++    rebuild_gui (app);
++
++    gtk_widget_hide (app->panel_checkbox);
++    gtk_widget_hide (app->panel_label);
++    
++restart:
++    switch (gtk_dialog_run (GTK_DIALOG (app->dialog)))
 +    {
-+	GdkRectangle *rect = &(rects[n_rects]);
++    default:
++	g_print ("Unknown response\n");
++	/* Fall Through */
++    case GTK_RESPONSE_DELETE_EVENT:
++    case GTK_RESPONSE_CLOSE:
++	g_print ("Close\n");
++	break;
 +
-+	cairo_rectangle (cr, rect->x, rect->y, rect->width, rect->height);
++    case GTK_RESPONSE_HELP:
++	g_print ("Help\n");
++	goto restart;
++	break;
++
++    case GTK_RESPONSE_APPLY:
++	apply (app);
++	goto restart;
++	break;
 +    }
-+    cairo_clip (cr);
 +
-+    g_free (rects);
++    gtk_widget_destroy (app->dialog);
 +}
 +
-+static void
-+backing_store_process_updates (BackingStore *store,
-+			       ExposeFunc    func,
-+			       gpointer      data)
++int
++main (int argc, char **argv)
 +{
-+    cairo_t *cr = gdk_cairo_create (store->pixmap);
-+    GdkRegion *region = store->update_region;
-+    store->update_region = gdk_region_new ();
-+
-+    cclip_to_region (cr, store->update_region);
++    App *app;
++    
++#if 0
++    bindtextdomain (GETTEXT_PACKAGE, DESKTOPEFFECTSLOCALEDIR);
++    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
++    textdomain (GETTEXT_PACKAGE);
++#endif
++    
++    gtk_init (&argc, &argv);
 +
-+    func (cr, store->update_region, data);
++    app = g_new0 (App, 1);
 +
-+    gdk_region_destroy (region);
-+    cairo_destroy (cr);
++    run_application (app);
++    
++    return 0;
 +}
-+
-+#endif


Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.347
retrieving revision 1.348
diff -u -r1.347 -r1.348
--- control-center.spec	11 Mar 2008 02:14:26 -0000	1.347
+++ control-center.spec	20 Mar 2008 05:34:47 -0000	1.348
@@ -22,7 +22,7 @@
 Summary: GNOME Control Center
 Name: control-center
 Version: 2.22.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 1
 License: GPLv2+ and GFDL
 Group: User Interface/Desktops
@@ -347,6 +347,9 @@
 %dir %{_datadir}/gnome-control-center/keybindings
 
 %changelog
+* Thu Mar 20 2008 Soren Sandmann <sandmann at redhat.com> - 2.22.0-2
+- Update randr
+
 * Mon Mar 10 2008 Matthias Clasen <mclasen at redhat.com> - 2.22.0-1
 - Update to 2.22.0
 




More information about the fedora-extras-commits mailing list