rpms/nvidia-settings/F-18 nvidia-settings-85ab38c897e266d1e9805e4d276916dceb0ad801.patch, NONE, 1.1 nvidia-settings.spec, 1.22, 1.23

Nicolas Chauvet kwizart at rpmfusion.org
Sat Sep 8 13:07:07 CEST 2012


Author: kwizart

Update of /cvs/nonfree/rpms/nvidia-settings/F-18
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv25946/F-18

Modified Files:
	nvidia-settings.spec 
Added Files:
	nvidia-settings-85ab38c897e266d1e9805e4d276916dceb0ad801.patch 
Log Message:
Update to latest


nvidia-settings-85ab38c897e266d1e9805e4d276916dceb0ad801.patch:
 ctkcolorcorrectionpage.c |  130 +++++++++++++++++++++++++++++++++++++++++++++++
 ctkcolorcorrectionpage.h |   89 +++++++++++++++++++++++++++++++-
 2 files changed, 218 insertions(+), 1 deletion(-)

--- NEW FILE nvidia-settings-85ab38c897e266d1e9805e4d276916dceb0ad801.patch ---
>From 85ab38c897e266d1e9805e4d276916dceb0ad801 Mon Sep 17 00:00:00 2001
From: Aaron Plattner <aplattner at nvidia.com>
Date: Sat, 08 Sep 2012 02:23:34 +0000
Subject: Add missing color correction page sources

src/gtk+-2.x/ctkcolorcorrectionpage.c and .h were missed in commit
cc58d9323aa331f16121c2e157611189cee92293.
---
diff --git a/src/gtk+-2.x/ctkcolorcorrectionpage.c b/src/gtk+-2.x/ctkcolorcorrectionpage.c
new file mode 100644
index 0000000..3b15260
--- a/dev/null
+++ b/src/gtk+-2.x/ctkcolorcorrectionpage.c
@@ -0,0 +1,130 @@
+/*
+ * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
+ * and Linux systems.
+ *
+ * Copyright (C) 2012 NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses>.
+ */
+
+#include <gtk/gtk.h>
+
+#include "NvCtrlAttributes.h"
+
+#include "ctkbanner.h"
+
+#include "ctkcolorcorrectionpage.h"
+#include "ctkcolorcorrection.h"
+
+#include "ctkconfig.h"
+#include "ctkhelp.h"
+
+#include <string.h>
+#include <stdlib.h>
+
+
+GType ctk_color_correction_page_get_type(
+    void
+)
+{
+    static GType ctk_color_correction_page_type = 0;
+
+    if (!ctk_color_correction_page_type) {
+        static const GTypeInfo ctk_color_correction_page_info = {
+            sizeof (CtkColorCorrectionPageClass),
+            NULL, /* base_init */
+            NULL, /* base_finalize */
+            NULL, /* class_init */
+            NULL, /* class_finalize */
+            NULL, /* class_data */
+            sizeof (CtkColorCorrectionPage),
+            0,    /* n_preallocs */
+            NULL, /* instance_init */
+            NULL  /* value_table */
+        };
+
+        ctk_color_correction_page_type =
+            g_type_register_static(GTK_TYPE_VBOX, "CtkColorCorrectionPage",
+                                   &ctk_color_correction_page_info, 0);
+    }
+
+    return ctk_color_correction_page_type;
+}
+
+
+GtkWidget* ctk_color_correction_page_new(NvCtrlAttributeHandle *handle,
+                                         CtkConfig *ctk_config,
+                                         ParsedAttribute *p,
+                                         CtkEvent *ctk_event)
+{
+    CtkColorCorrectionPage *ctk_color_correction_page;
+    ReturnStatus ret;
+    GObject *object;
+    GtkWidget *banner;
+    GtkWidget *ctk_color_correction;
+    gint val;
+
+    /* check if the VidMode extension is present */
+
+    ret = NvCtrlGetAttribute(handle, NV_CTRL_ATTR_EXT_VM_PRESENT, &val);
+    if ((ret != NvCtrlSuccess) || (val == FALSE)) {
+        return NULL;
+    }
+
+    /* check if the noScanout mode enabled */
+
+    ret = NvCtrlGetAttribute(handle, NV_CTRL_NO_SCANOUT, &val);
+    if ((ret == NvCtrlSuccess) && (val == NV_CTRL_NO_SCANOUT_ENABLED)) {
+        return NULL;
+    }
+
+    /* allocate the color correction widget */
+
+    ctk_color_correction =
+        ctk_color_correction_new(handle, ctk_config, p, ctk_event);
+
+    if (ctk_color_correction == NULL) {
+        return NULL;
+    }
+
+    /* create the new page */
+
+    object = g_object_new(CTK_TYPE_COLOR_CORRECTION_PAGE, NULL);
+
+    ctk_color_correction_page = CTK_COLOR_CORRECTION_PAGE(object);
+
+    gtk_box_set_spacing(GTK_BOX(ctk_color_correction_page), 10);
+
+    /*
+     * pack the banner at the top of the page, followed by the color
+     * correction widget
+     */
+
+    banner = ctk_banner_image_new(BANNER_ARTWORK_COLOR);
+    gtk_box_pack_start(GTK_BOX(ctk_color_correction_page),
+                       banner, FALSE, FALSE, 0);
+
+    gtk_box_pack_start(GTK_BOX(ctk_color_correction_page),
+                       ctk_color_correction, TRUE, TRUE, 0);
+
+    gtk_widget_show_all(GTK_WIDGET(object));
+
+    return GTK_WIDGET(object);
+}
+
+
+GtkTextBuffer *ctk_color_correction_page_create_help(GtkTextTagTable *table,
+                                                     const gchar *title)
+{
+    return ctk_color_correction_create_help(table, title, FALSE /* randr */);
+}
diff --git a/src/gtk+-2.x/ctkcolorcorrectionpage.h b/src/gtk+-2.x/ctkcolorcorrectionpage.h
new file mode 100644
index 0000000..5512985
--- a/dev/null
+++ b/src/gtk+-2.x/ctkcolorcorrectionpage.h
@@ -0,0 +1,88 @@
+/*
+ * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
+ * and Linux systems.
+ *
+ * Copyright (C) 2012 NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses>.
+ */
+
+#ifndef __CTK_COLOR_CORRECTION_PAGE_H__
+#define __CTK_COLOR_CORRECTION_PAGE_H__
+
+#include "parse.h"
+#include "ctkevent.h"
+#include "ctkconfig.h"
+
+G_BEGIN_DECLS
+
+#define CTK_TYPE_COLOR_CORRECTION_PAGE (ctk_color_correction_page_get_type())
+
+#define CTK_COLOR_CORRECTION_PAGE(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), CTK_TYPE_COLOR_CORRECTION_PAGE, \
+                                CtkColorCorrectionPage))
+
+#define CTK_COLOR_CORRECTION_PAGE_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), CTK_TYPE_COLOR_CORRECTION_PAGE, \
+                             CtkColorCorrectionPageClass))
+
+#define CTK_IS_COLOR_CORRECTION_PAGE(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), CTK_TYPE_COLOR_CORRECTION_PAGE))
+
+#define CTK_IS_COLOR_CORRECTION_PAGE_CLASS(class) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), CTK_TYPE_COLOR_CORRECTION_PAGE))
+
+#define CTK_COLOR_CORRECTION_PAGE_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), CTK_TYPE_COLOR_CORRECTION_PAGE, \
+                               CtkColorCorrectionPageClass))
+
+
+typedef struct _CtkColorCorrectionPage       CtkColorCorrectionPage;
+typedef struct _CtkColorCorrectionPageClass  CtkColorCorrectionPageClass;
+
+struct _CtkColorCorrectionPage
+{
+    GtkVBox parent;
+    NvCtrlAttributeHandle *handle;
+    CtkConfig *ctk_config;
+    GtkWidget *option_menu;
+    GtkObject *brightness_adjustment;
+    GtkObject *contrast_adjustment;
+    GtkObject *gamma_adjustment;
+    GtkWidget *confirm_button;
+    GtkWidget *confirm_label;
+    gint confirm_countdown;
+    guint confirm_timer;
+    gfloat cur_slider_val[3][4];  // as [attribute][channel]
+    gfloat prev_slider_val[3][4]; // as [attribute][channel]
+    guint enabled_display_devices;
+};
+
+struct _CtkColorCorrectionPageClass
+{
+    GtkVBoxClass parent_class;
+
+    void (*changed) (CtkColorCorrectionPage *);
+};
+
+GType       ctk_color_correction_page_get_type  (void) G_GNUC_CONST;
+GtkWidget*  ctk_color_correction_page_new       (NvCtrlAttributeHandle *,
+                                                 CtkConfig *, ParsedAttribute *,
+                                                 CtkEvent *);
+GtkTextBuffer *ctk_color_correction_page_create_help(GtkTextTagTable *,
+                                                     const gchar *title);
+
+G_END_DECLS
+
+#endif /* __CTK_COLOR_CORRECTION_PAGE_H__ */
+
--
cgit v0.9.0.2-2-gbebe


Index: nvidia-settings.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-settings/F-18/nvidia-settings.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- nvidia-settings.spec	5 Sep 2012 22:10:03 -0000	1.22
+++ nvidia-settings.spec	8 Sep 2012 11:06:37 -0000	1.23
@@ -18,6 +18,7 @@
 Source0:        http://cgit.freedesktop.org/~aplattner/nvidia-settings/snapshot/nvidia-settings-%{nversion}.tar.bz2
 Patch0:         nvidia-settings-256.35-validate.patch
 Patch1:         03_do_not_exit_on_no_scanout.patch
+Patch2:         nvidia-settings-85ab38c897e266d1e9805e4d276916dceb0ad801.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %if 0%{?fedora} > 11 || 0%{?rhel} > 5
@@ -34,9 +35,10 @@
 #BuildRequires:  libXNVCtrl-devel
 BuildRequires:  libXxf86vm-devel
 BuildRequires:  libXext-devel
+BuildRequires:  libXrandr-devel
 BuildRequires:  libXv-devel
 #Needed for FBConfig table
-#BuildRequires:  xorg-x11-drv-nvidia-devel
+BuildRequires:   xorg-x11-drv-nvidia-devel
 BuildRequires:   mesa-libGL-devel
 
 Provides: %{name}-nversion = %{nversion}
@@ -55,6 +57,7 @@
 %setup -q -n nvidia-settings-%{nversion}
 %patch0 -p1 -b .validate
 %patch1 -p1 -b .noscanout
+%patch2 -p1
 rm -rf src/libXNVCtrl/libXNVCtrl.a
 
 sed -i -e 's|/usr/local|%{_prefix}|g' utils.mk
@@ -69,7 +72,9 @@
   NVDEBUG=1 \
   NV_VERBOSE=1 \
   X_LDFLAGS="-L%{_libdir}" \
-  CC_ONLY_CFLAGS="$RPM_OPT_FLAGS"
+  CC_ONLY_CFLAGS="$RPM_OPT_FLAGS" || :
+
+make -C samples
 
 
 %install
@@ -99,6 +104,8 @@
 %changelog
 * Wed Sep 05 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.0-24
 - Update to 304.43
+- Add BR libXrandr-devel
+- Add missing files
 
 * Tue Aug 14 2012 Leigh Scott <leigh123linux at googlemail.com> - 1.0-23
 - Update to 304.37


More information about the rpmfusion-commits mailing list