summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSachin Chitte <schitte@nvidia.com>2017-03-16 03:47:22 -0700
committerAaron Plattner <aplattner@nvidia.com>2017-06-05 15:29:45 -0700
commitc0f088abbb8f0ca91abf867466434ac2fc5e472f (patch)
tree30ee8d8b21b90c0df15090851bee2698bb424cad
parentca930142ccf2b5f55548664c16a9b8f41bc83d1b (diff)
Select license edition radio button depending on feature type.
Earlier Tesla unlicensed mode button were getting selected always. Changed that logic to use feature type from gridd.conf and then select the toggle button.
-rw-r--r--src/gtk+-2.x/ctkgridlicense.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gtk+-2.x/ctkgridlicense.c b/src/gtk+-2.x/ctkgridlicense.c
index 043e368..aec1e52 100644
--- a/src/gtk+-2.x/ctkgridlicense.c
+++ b/src/gtk+-2.x/ctkgridlicense.c
@@ -1116,11 +1116,17 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
G_CALLBACK(save_clicked),
(gpointer) ctk_manage_grid_license);
- /* default Tesla (Unlicensed) */
- if (button2) {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button2), TRUE);
+ /* Set license edition toggle button active */
+ if (button2 && button1) {
+ if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "0") == 0) {
+ /* Tesla (Unlicensed) button is active */
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button2), TRUE);
+ } else if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "2") == 0) {
+ /* GRID Virtual Workstation button is active */
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button1), TRUE);
+ }
}
-
+
/* Register a timer callback to update license status info */
str = g_strdup_printf("Manage GRID License");