Gentoo Archives: gentoo-commits

From: "Piotr Jaroszynski (peper)" <peper@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/nvidia-settings/files: nvidia-settings-169.04-no-display.patch digest-nvidia-settings-169.04
Date: Tue, 20 Nov 2007 20:24:25
Message-Id: E1IuZdr-00075l-Us@stork.gentoo.org
1 peper 07/11/20 20:24:19
2
3 Added: nvidia-settings-169.04-no-display.patch
4 digest-nvidia-settings-169.04
5 Log:
6 Add 169.04 with a patch allowing to run nvidia-setting without :0. Thanks to Tommy Yu <a_korner@×××××××.com> in bug #94240.
7 (Portage version: 2.1.3.19)
8
9 Revision Changes Path
10 1.1 media-video/nvidia-settings/files/nvidia-settings-169.04-no-display.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/nvidia-settings/files/nvidia-settings-169.04-no-display.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/nvidia-settings/files/nvidia-settings-169.04-no-display.patch?rev=1.1&content-type=text/plain
14
15 Index: nvidia-settings-169.04-no-display.patch
16 ===================================================================
17 diff -ur nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.c nvidia-settings-1.0/src/gtk+-2.x/ctkui.c
18 --- nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.c 2007-11-15 01:43:51.000000000 +0100
19 +++ nvidia-settings-1.0/src/gtk+-2.x/ctkui.c 2007-11-20 21:07:50.000000000 +0100
20 @@ -37,6 +37,11 @@
21 gtk_init(argc, argv);
22 }
23
24 +gboolean ctk_init_check(int *argc, char **argv[])
25 +{
26 + return gtk_init_check(argc, argv);
27 +}
28 +
29 char *ctk_get_display(void)
30 {
31 return gdk_get_display();
32 diff -ur nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.h nvidia-settings-1.0/src/gtk+-2.x/ctkui.h
33 --- nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.h 2007-11-15 01:43:51.000000000 +0100
34 +++ nvidia-settings-1.0/src/gtk+-2.x/ctkui.h 2007-11-20 21:07:50.000000000 +0100
35 @@ -28,9 +28,12 @@
36 #include "NvCtrlAttributes.h"
37 #include "parse.h"
38 #include "config-file.h"
39 +#include <gtk/gtk.h>
40
41 void ctk_init(int *argc, char **argv[]);
42
43 +gboolean ctk_init_check(int *argc, char **argv[]);
44 +
45 char *ctk_get_display(void);
46
47 void ctk_main(NvCtrlAttributeHandle **, int,
48 Only in nvidia-settings-1.0/src/gtk+-2.x: ctkui.h.orig
49 diff -ur nvidia-settings-1.0-old/src/nvidia-settings.c nvidia-settings-1.0/src/nvidia-settings.c
50 --- nvidia-settings-1.0-old/src/nvidia-settings.c 2007-11-15 01:43:51.000000000 +0100
51 +++ nvidia-settings-1.0/src/nvidia-settings.c 2007-11-20 21:10:31.000000000 +0100
52 @@ -22,6 +22,8 @@
53 *
54 */
55
56 +#include <gtk/gtk.h>
57 +
58 #include "NvCtrlAttributes.h"
59
60 #include "command-line.h"
61 @@ -44,7 +46,9 @@
62 NvCtrlAttributeHandle **vcsc_handles = NULL;
63 Options *op;
64 int ret, i, num_screen_handles, num_gpu_handles, num_vcsc_handles;
65 -
66 + char *dpy = NULL;
67 + int gui = 0;
68 +
69 /*
70 * initialize the ui
71 *
72 @@ -52,14 +56,21 @@
73 * may not even use the gui, but we want the toolkit to have a
74 * chance to parse the commandline before we do... we should
75 * investigate gtk_init_check().
76 + *
77 + * gui flag used to decide if gtk should be used or not, as
78 + * use might just use control the display from a remote console
79 + * but for some reason cannot initialize the gtk gui. - TY 2005-05-27
80 */
81 -
82 - ctk_init(&argc, &argv);
83 -
84 +
85 +
86 + if (ctk_init_check(&argc, &argv) == TRUE) {
87 + dpy = ctk_get_display();
88 + gui = 1;
89 + }
90 +
91 /* parse the commandline */
92
93 - op = parse_command_line(argc, argv, ctk_get_display());
94 -
95 + op = parse_command_line(argc, argv, dpy);
96 /* process any query or assignment commandline options */
97
98 if (op->num_assignments || op->num_queries) {
99 @@ -67,6 +78,14 @@
100 return ret ? 0 : 1;
101 }
102
103 + /* quit here if display is undefineds - TY 2005-05-27 */
104 +
105 + if (op->ctrl_display == NULL) {
106 + nv_error_msg("Display is undefined, please run `%s --help` "
107 + "for usage information.\n", argv[0]);
108 + return 1;
109 + }
110 +
111 /* initialize the parsed attribute list */
112
113 p = nv_parsed_attribute_init();
114 @@ -165,6 +184,14 @@
115 }
116
117 /* pass control to the gui */
118 + /*
119 + * if gtk wasn't initiated, exit here.
120 + * Using a -c flag without gtk would behave as if using -l - TY 2005-05-27
121 + */
122 + if (gui == 0) {
123 + nv_error_msg("Unable to create gui.\n");
124 + return 1;
125 + }
126
127 ctk_main(screen_handles, num_screen_handles,
128 gpu_handles, num_gpu_handles,
129
130
131
132 1.1 media-video/nvidia-settings/files/digest-nvidia-settings-169.04
133
134 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/nvidia-settings/files/digest-nvidia-settings-169.04?rev=1.1&view=markup
135 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/nvidia-settings/files/digest-nvidia-settings-169.04?rev=1.1&content-type=text/plain
136
137 Index: digest-nvidia-settings-169.04
138 ===================================================================
139 MD5 fa954e504cb5b89b400968fcbd86ff27 nvidia-settings-169.04.tar.gz 1288405
140 RMD160 678a82a290b7f5ca5385e74405f36e926e308a0f nvidia-settings-169.04.tar.gz 1288405
141 SHA256 83c6b760b8322dba96252633d80441d70a8c65e5e172b9db6a73edbdd1eb45fc nvidia-settings-169.04.tar.gz 1288405
142
143
144
145 --
146 gentoo-commits@g.o mailing list