diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2008-07-16 20:56:34 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2008-07-16 20:56:34 -0700 |
commit | d7e67781ef4fe7d2f83e16fe8616d0635e6af2f4 (patch) | |
tree | 93a026935003ccb7ee6de212a5b45c3a71cda9e4 | |
parent | c893bceb1768faa9c8064e9b8ab4290fc444c665 (diff) |
96.43.0796.43.07
-rw-r--r-- | src/XF86Config-parser/Write.c | 16 | ||||
-rw-r--r-- | src/gtk+-2.x/ctkwindow.c | 10 | ||||
-rw-r--r-- | src/libXNVCtrl/libXNVCtrl.a | bin | 17180 -> 17180 bytes |
3 files changed, 17 insertions, 9 deletions
diff --git a/src/XF86Config-parser/Write.c b/src/XF86Config-parser/Write.c index 12d78f7..98b1dd6 100644 --- a/src/XF86Config-parser/Write.c +++ b/src/XF86Config-parser/Write.c @@ -98,13 +98,17 @@ int xconfigWriteConfigFile (const char *filename, XConfigPtr cptr) xconfigPrintLayoutSection (cf, cptr->layouts); - fprintf (cf, "Section \"Files\"\n"); - xconfigPrintFileSection (cf, cptr->files); - fprintf (cf, "EndSection\n\n"); + if (cptr->files) { + fprintf (cf, "Section \"Files\"\n"); + xconfigPrintFileSection (cf, cptr->files); + fprintf (cf, "EndSection\n\n"); + } - fprintf (cf, "Section \"Module\"\n"); - xconfigPrintModuleSection (cf, cptr->modules); - fprintf (cf, "EndSection\n\n"); + if (cptr->modules) { + fprintf (cf, "Section \"Module\"\n"); + xconfigPrintModuleSection (cf, cptr->modules); + fprintf (cf, "EndSection\n\n"); + } xconfigPrintVendorSection (cf, cptr->vendors); diff --git a/src/gtk+-2.x/ctkwindow.c b/src/gtk+-2.x/ctkwindow.c index b1cf971..f9de8b2 100644 --- a/src/gtk+-2.x/ctkwindow.c +++ b/src/gtk+-2.x/ctkwindow.c @@ -391,6 +391,7 @@ GtkWidget *ctk_window_new(NvCtrlAttributeHandle **screen_handles, GtkCellRenderer *renderer; GtkTreeSelection *selection; GtkTreeModel *model; + GtkTreeIter iter; GtkTextTagTable *tag_table; GtkTextBuffer *help; @@ -599,7 +600,6 @@ GtkWidget *ctk_window_new(NvCtrlAttributeHandle **screen_handles, for (i = 0; i < num_screen_handles; i++) { - GtkTreeIter iter; gchar *screen_name; GtkWidget *child; NvCtrlAttributeHandle *screen_handle = screen_handles[i]; @@ -731,7 +731,6 @@ GtkWidget *ctk_window_new(NvCtrlAttributeHandle **screen_handles, for (i = 0; i < num_gpu_handles; i++) { - GtkTreeIter iter; gchar *gpu_product_name; gchar *gpu_name; GtkWidget *child; @@ -816,7 +815,6 @@ GtkWidget *ctk_window_new(NvCtrlAttributeHandle **screen_handles, for (i = 0; i < num_vcsc_handles; i++) { - GtkTreeIter iter; gchar *vcsc_product_name; gchar *vcsc_name; GtkWidget *child; @@ -911,6 +909,12 @@ GtkWidget *ctk_window_new(NvCtrlAttributeHandle **screen_handles, gtk_tree_view_expand_all(ctk_window->treeview); gtk_tree_view_columns_autosize(ctk_window->treeview); + /* Make sure the first item is selected */ + if ( gtk_tree_model_get_iter_first(model, &iter) ) { + gtk_tree_selection_select_iter(selection, &iter); + } + + /* set the window title */ gtk_window_set_title(GTK_WINDOW(object), "NVIDIA X Server Settings"); diff --git a/src/libXNVCtrl/libXNVCtrl.a b/src/libXNVCtrl/libXNVCtrl.a Binary files differindex 182fa96..17e25a8 100644 --- a/src/libXNVCtrl/libXNVCtrl.a +++ b/src/libXNVCtrl/libXNVCtrl.a |