~ubuntu-branches/ubuntu/quantal/nvidia-settings/quantal-security

« back to all changes in this revision

Viewing changes to src/gtk+-2.x/ctkdisplaydevice-crt.c

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Milone
  • Date: 2010-06-27 18:59:46 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100627185946-zpgnp08qs5do500z
Tags: 256.35-0ubuntu1
* New upstream release:
  - Fixed a bug that caused nvidia-settings to crash when rendering
    its thermal gauge widget if the range of valid values for the
    thermal sensor was empty.
  - Improved Thermal Settings reporting in nvidia-settings to
    accurately reflect hardware configurations with multiple thermal
    sensors.
* debian/docs:
  - Remove Makefile.inc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "ctkedid.h"
34
34
#include "ctkconfig.h"
35
35
#include "ctkhelp.h"
 
36
#include "ctkutils.h"
36
37
#include <stdio.h>
37
38
 
38
39
static void ctk_display_device_crt_class_init(CtkDisplayDeviceCrtClass *);
224
225
 
225
226
    /* Update the GUI */
226
227
 
 
228
    update_display_enabled_flag(ctk_display_device_crt->handle,
 
229
                                &ctk_display_device_crt->display_enabled,
 
230
                                ctk_display_device_crt->display_device_mask);
 
231
 
227
232
    ctk_display_device_crt_setup(ctk_display_device_crt);
228
233
    
229
234
    /* handle enable/disable events on the display device */
304
309
static void ctk_display_device_crt_setup(CtkDisplayDeviceCrt
305
310
                                         *ctk_display_device_crt)
306
311
{
307
 
    ReturnStatus ret;
308
 
    unsigned int enabled_displays;
309
 
 
310
 
 
311
 
    /* Is display enabled? */
312
 
 
313
 
    ret = NvCtrlGetAttribute(ctk_display_device_crt->handle,
314
 
                             NV_CTRL_ENABLED_DISPLAYS,
315
 
                             (int *)&enabled_displays);
316
 
 
317
 
    ctk_display_device_crt->display_enabled =
318
 
        (ret == NvCtrlSuccess &&
319
 
         (enabled_displays & (ctk_display_device_crt->display_device_mask)));
320
 
 
321
312
    /* Update CRT-specific settings */
322
313
    crt_info_setup(ctk_display_device_crt);
323
314
    
394
385
{
395
386
    CtkDisplayDeviceCrt *ctk_object = CTK_DISPLAY_DEVICE_CRT(user_data);
396
387
 
 
388
    /* Requery display information only if display disabled */
 
389
 
 
390
    update_display_enabled_flag(ctk_object->handle,
 
391
                                &ctk_object->display_enabled,
 
392
                                ctk_object->display_device_mask);
 
393
 
 
394
    if (ctk_object->display_enabled) {
 
395
        return;
 
396
    }
 
397
 
397
398
    ctk_display_device_crt_setup(ctk_object);
398
399
 
399
400
} /* enabled_displays_received() */