summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2011-04-11 13:18:59 -0700
committerAaron Plattner <aplattner@nvidia.com>2011-04-11 13:18:59 -0700
commit9fcf45c515aceb5a694f6e1e584c201705ab2f96 (patch)
tree9b4c18eba09c7ecfafdf069e64c794770c70c862
parent0e7c5617c2c0745ec3a06a0e510c9d639c9ea6c5 (diff)
270.41.03270.41.03
-rw-r--r--src/gtk+-2.x/ctk3dvisionpro.c50
-rw-r--r--src/gtk+-2.x/ctk3dvisionpro.h3
-rw-r--r--src/gtk+-2.x/ctkcolorcontrols.c2
-rw-r--r--src/gtk+-2.x/ctkcolorcorrection.c27
-rw-r--r--src/gtk+-2.x/ctkcolorcorrection.h1
-rw-r--r--version.mk2
6 files changed, 40 insertions, 45 deletions
diff --git a/src/gtk+-2.x/ctk3dvisionpro.c b/src/gtk+-2.x/ctk3dvisionpro.c
index 83b3e9d..3eb004e 100644
--- a/src/gtk+-2.x/ctk3dvisionpro.c
+++ b/src/gtk+-2.x/ctk3dvisionpro.c
@@ -63,6 +63,9 @@
#define POLL_PAIRING_TIMEOUT 2000 //mS
#define POLL_PAIRING_CYCLE ((POLL_PAIRING_TIMEOUT / 1000) * 2)
+#define CHANNEL_RANGE_TO_OPTION_MENU_IDX(range) ((range) - 1)
+#define OPTION_MENU_IDX_TO_CHANNEL_RANGE(menu) ((menu) + 1)
+
enum {
CHANGED,
LAST_SIGNAL
@@ -705,12 +708,12 @@ static void svp_config_changed(GtkObject *object, gpointer arg1,
SVP_RANGE range;
range = gtk_option_menu_get_history(GTK_OPTION_MENU(ctk_3d_vision_pro->option_menu));
- if (event_struct->value != SVP_INVALID_RANGE && range != event_struct->value) {
+ if (range != CHANNEL_RANGE_TO_OPTION_MENU_IDX(event_struct->value)) {
g_signal_handlers_block_by_func(ctk_3d_vision_pro->option_menu,
channel_range_changed, ctk_3d_vision_pro);
HTU(0)->channel_range = event_struct->value;
gtk_option_menu_set_history(GTK_OPTION_MENU(ctk_3d_vision_pro->option_menu),
- event_struct->value);
+ CHANNEL_RANGE_TO_OPTION_MENU_IDX(event_struct->value));
enable_widgets(ctk_3d_vision_pro,
(HTU(0)->channel_range == SVP_LONG_RANGE ? FALSE : TRUE));
g_signal_handlers_unblock_by_func(ctk_3d_vision_pro->option_menu,
@@ -1354,23 +1357,20 @@ static ChannelRangeDlg *create_channel_range_change_dlg(Ctk3DVisionPro *ctk_3d_v
switch (range) {
case SVP_SHORT_RANGE:
- label = gtk_label_new("You have changed transceiver range to short range (less than 5m.).\n"
+ label = gtk_label_new("You have changed transceiver range to short range (less than 2m.).\n"
"Only glasses in this range will be available.\n\n"
"Do you want to apply changes?");
break;
case SVP_MEDIUM_RANGE:
- label = gtk_label_new("You have changed transceiver range to medium range (less than 15m.).\n"
+ label = gtk_label_new("You have changed transceiver range to medium range (less than 10m.).\n"
"Only glasses in this range will be available.\n\n"
"Do you want to apply changes?");
break;
case SVP_LONG_RANGE:
- label = gtk_label_new("You have changed transceiver range to long range (less than 30m.).\n"
+ label = gtk_label_new("You have changed transceiver range to long range.\n"
"Only glasses in this range will be available.\n\n"
"Do you want to apply changes?");
break;
- case SVP_INVALID_RANGE:
- label = gtk_label_new("Invalid selection.\n");
- break;
}
hbox = gtk_hbox_new(TRUE, 0);
@@ -1397,16 +1397,12 @@ static void channel_range_changed(
SVP_RANGE range;
SVP_RANGE prev_range;
- range = gtk_option_menu_get_history(option_menu);
+ range = OPTION_MENU_IDX_TO_CHANNEL_RANGE(gtk_option_menu_get_history(option_menu));
prev_range = HTU(0)->channel_range;
if (HTU(0)->channel_range == range) {
return;
}
- if (range == SVP_INVALID_RANGE) {
- gtk_option_menu_set_history(GTK_OPTION_MENU(ctk_3d_vision_pro->option_menu), prev_range);
- return;
- }
dlg = create_channel_range_change_dlg(ctk_3d_vision_pro, range);
@@ -1437,7 +1433,8 @@ static void channel_range_changed(
break;
case GTK_RESPONSE_NO:
- gtk_option_menu_set_history(GTK_OPTION_MENU(ctk_3d_vision_pro->option_menu), prev_range);
+ gtk_option_menu_set_history(GTK_OPTION_MENU(ctk_3d_vision_pro->option_menu),
+ CHANNEL_RANGE_TO_OPTION_MENU_IDX(prev_range));
break;
default:
/* do nothing. */
@@ -1516,15 +1513,11 @@ GtkWidget* ctk_3d_vision_pro_new(NvCtrlAttributeHandle *handle,
0, 0,
NV_CTRL_3D_VISION_PRO_TRANSCEIVER_MODE,
(int *)&(HTU(0)->channel_range));
- if (ret != TRUE) {
- HTU(0)->channel_range = SVP_INVALID_RANGE;
- }
-
- // validate channel range
- if (!(HTU(0)->channel_range == SVP_SHORT_RANGE ||
+ if (ret != TRUE ||
+ (!(HTU(0)->channel_range == SVP_SHORT_RANGE ||
HTU(0)->channel_range == SVP_MEDIUM_RANGE ||
- HTU(0)->channel_range == SVP_LONG_RANGE)) {
- HTU(0)->channel_range = SVP_INVALID_RANGE;
+ HTU(0)->channel_range == SVP_LONG_RANGE))) {
+ HTU(0)->channel_range = SVP_SHORT_RANGE;
}
ret = XNVCTRLQueryTargetBinaryData(NvCtrlGetDisplayPtr(ctk_3d_vision_pro->handle),
@@ -1703,7 +1696,6 @@ GtkWidget* ctk_3d_vision_pro_new(NvCtrlAttributeHandle *handle,
hbox = gtk_hbox_new(FALSE, 5);
menu = gtk_menu_new();
- add_menu_item(menu, "Invalid Range");
add_menu_item(menu, "Short Range (upto 5 meter)");
add_menu_item(menu, "Medium Range (upto 15 meter)");
add_menu_item(menu, "Long Range (upto 30 meter)");
@@ -1721,7 +1713,7 @@ GtkWidget* ctk_3d_vision_pro_new(NvCtrlAttributeHandle *handle,
"channel_range", GINT_TO_POINTER(0));
gtk_option_menu_set_history(GTK_OPTION_MENU(ctk_3d_vision_pro->option_menu),
- HTU(0)->channel_range);
+ CHANNEL_RANGE_TO_OPTION_MENU_IDX(HTU(0)->channel_range));
g_signal_connect(G_OBJECT(ctk_3d_vision_pro->option_menu), "changed",
G_CALLBACK(channel_range_changed),
(gpointer) ctk_3d_vision_pro);
@@ -1881,20 +1873,20 @@ GtkTextBuffer *ctk_3d_vision_pro_create_help(GtkTextTagTable *table)
"Possible values for transeiver range are 'Short Range' "
"'Medium Range' and 'Long Range'.");
ctk_help_para(b, &i, "Short Range: \n"
- "Allows glasses within a 5-meter (15-foot) range to "
+ "Allows glasses within a 2-meter (6.5-foot) range to "
"be synced with the hub. This range is typically used "
"for sharing 3D simulations and training information "
"on a local workstation.");
ctk_help_para(b, &i, "Medium Range: \n"
- "Allows glasses within a 15-meter (45-foot) range to "
+ "Allows glasses within a 10-meter (32-foot) range to "
"be synced with the hub. This range is typically used "
"for sharing a presentation with a limited audience or "
"interacting with 3D CAD models during a collaborative "
"design session.");
ctk_help_para(b, &i, "Long Range: \n"
- "Allows glasses within a 30-meter (90-foot) range to "
- "be synced with the hub. This range is typically used in a "
- "theater or visualization center.");
+ "All glasses detected within the range and frequency of "
+ "the hub will be synced. This range is typically used "
+ "in a theater or visualization center.");
ctk_help_finish(b);
diff --git a/src/gtk+-2.x/ctk3dvisionpro.h b/src/gtk+-2.x/ctk3dvisionpro.h
index ecf932d..95cbea1 100644
--- a/src/gtk+-2.x/ctk3dvisionpro.h
+++ b/src/gtk+-2.x/ctk3dvisionpro.h
@@ -59,8 +59,7 @@ typedef struct _Ctk3DVisionPro Ctk3DVisionPro;
typedef struct _Ctk3DVisionProClass Ctk3DVisionProClass;
typedef enum {
- SVP_INVALID_RANGE = 0,
- SVP_SHORT_RANGE,
+ SVP_SHORT_RANGE = 1,
SVP_MEDIUM_RANGE,
SVP_LONG_RANGE
} SVP_RANGE;
diff --git a/src/gtk+-2.x/ctkcolorcontrols.c b/src/gtk+-2.x/ctkcolorcontrols.c
index 188a3bf..c818087 100644
--- a/src/gtk+-2.x/ctkcolorcontrols.c
+++ b/src/gtk+-2.x/ctkcolorcontrols.c
@@ -351,7 +351,7 @@ void post_color_space_update(CtkColorControls *ctk_color_controls,
ctk_config_statusbar_message(ctk_color_controls->ctk_config,
"Color Space set to %s for %s.",
- color_space_table[color_space],
+ color_space_table[ctk_color_controls->color_space_table[color_space]],
ctk_color_controls->name);
}
diff --git a/src/gtk+-2.x/ctkcolorcorrection.c b/src/gtk+-2.x/ctkcolorcorrection.c
index b882db3..19ff62d 100644
--- a/src/gtk+-2.x/ctkcolorcorrection.c
+++ b/src/gtk+-2.x/ctkcolorcorrection.c
@@ -201,7 +201,7 @@ GtkWidget* ctk_color_correction_new(NvCtrlAttributeHandle *handle,
GtkWidget *rightvbox;
GtkWidget *hbox;
GtkWidget *vbox;
- GtkWidget *button, *confirm_button;
+ GtkWidget *button, *confirm_button, *confirm_label;
GtkWidget *widget;
GtkWidget *hsep;
GtkWidget *eventbox;
@@ -369,7 +369,9 @@ GtkWidget* ctk_color_correction_new(NvCtrlAttributeHandle *handle,
button = gtk_button_new_with_label("Reset Hardware Defaults");
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
- confirm_button = gtk_button_new_with_label("Confirm Current Changes");
+ confirm_button = gtk_button_new();
+ confirm_label = gtk_label_new("Confirm Current Changes");
+ gtk_container_add(GTK_CONTAINER(confirm_button), confirm_label);
eventbox = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(eventbox), confirm_button);
gtk_box_pack_end(GTK_BOX(hbox), eventbox, FALSE, FALSE, 5);
@@ -382,6 +384,7 @@ GtkWidget* ctk_color_correction_new(NvCtrlAttributeHandle *handle,
G_CALLBACK(confirm_button_clicked),
(gpointer) ctk_color_correction);
+ ctk_color_correction->confirm_label = confirm_label;
ctk_color_correction->confirm_button = confirm_button;
ctk_config_set_tooltip(ctk_config, eventbox, __confirm_button_help);
ctk_config_set_tooltip(ctk_config, button, __resest_button_help);
@@ -516,9 +519,9 @@ GtkWidget* ctk_color_correction_new(NvCtrlAttributeHandle *handle,
* "%d Seconds to Confirm"
*/
- gtk_widget_size_request(ctk_color_correction->confirm_button,
+ gtk_widget_size_request(ctk_color_correction->confirm_label,
&requisition);
- gtk_widget_set_size_request(ctk_color_correction->confirm_button,
+ gtk_widget_set_size_request(ctk_color_correction->confirm_label,
requisition.width, -1);
return GTK_WIDGET(object);
@@ -674,8 +677,8 @@ static void confirm_button_clicked(
ctk_color_correction->confirm_timer = 0;
/* Reset confirm button text */
- gtk_button_set_label(GTK_BUTTON(ctk_color_correction->confirm_button),
- "Confirm Current Changes");
+ gtk_label_set_text(GTK_LABEL(ctk_color_correction->confirm_label),
+ "Confirm Current Changes");
gtk_widget_set_sensitive(ctk_color_correction->confirm_button, FALSE);
} /* confirm_button_clicked() */
@@ -728,8 +731,8 @@ static void reset_button_clicked(
}
/* Reset confirm button text */
- gtk_button_set_label(GTK_BUTTON(ctk_color_correction->confirm_button),
- "Confirm Current Changes");
+ gtk_label_set_text(GTK_LABEL(ctk_color_correction->confirm_label),
+ "Confirm Current Changes");
}
static void adjustment_value_changed(
@@ -974,8 +977,8 @@ static void update_confirm_text(CtkColorCorrection *ctk_color_correction)
gchar *str;
str = g_strdup_printf("%d Seconds to Confirm",
ctk_color_correction->confirm_countdown);
- gtk_button_set_label(GTK_BUTTON(ctk_color_correction->confirm_button),
- str);
+ gtk_label_set_text(GTK_LABEL(ctk_color_correction->confirm_label),
+ str);
g_free(str);
} /* update_confirm_text() */
@@ -1024,8 +1027,8 @@ static gboolean do_confirm_countdown(gpointer data)
option_menu_changed(option_menu, (gpointer)(ctk_color_correction));
/* Reset confirm button text */
- gtk_button_set_label(GTK_BUTTON(ctk_color_correction->confirm_button),
- "Confirm Current Changes");
+ gtk_label_set_text(GTK_LABEL(ctk_color_correction->confirm_label),
+ "Confirm Current Changes");
/* Update status bar message */
ctk_config_statusbar_message(ctk_color_correction->ctk_config,
diff --git a/src/gtk+-2.x/ctkcolorcorrection.h b/src/gtk+-2.x/ctkcolorcorrection.h
index 28ea926..12df48a 100644
--- a/src/gtk+-2.x/ctkcolorcorrection.h
+++ b/src/gtk+-2.x/ctkcolorcorrection.h
@@ -65,6 +65,7 @@ struct _CtkColorCorrection
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]
diff --git a/version.mk b/version.mk
index 932bd33..442d27d 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 270.30
+NVIDIA_VERSION = 270.41.03