From 80fbc410884ec3402dbfff833770b336af7ffca5 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 13 Dec 2009 13:16:58 +0000 Subject: [PATCH] mark readonly widgets as readonly git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12558 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp2/ChangeLog | 4 ++++ camlibs/ptp2/config.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/camlibs/ptp2/ChangeLog b/camlibs/ptp2/ChangeLog index 0bad85402..400fc6862 100644 --- a/camlibs/ptp2/ChangeLog +++ b/camlibs/ptp2/ChangeLog @@ -1,3 +1,7 @@ +2009-12-13 Marcus Meissner + + * config.c: Mark readonly widgets as readonly + 2009-12-06 Laurent Calmes * library.c: Fixed Nikon Preview code for Nikon D300, diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index 123acfa6e..cf34ae4f2 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -4383,6 +4383,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context) memset(&dpd,0,sizeof(dpd)); ptp_getdevicepropdesc(params,cursub->propid,&dpd); ret = cursub->getfunc (camera, &widget, cursub, &dpd); + if (dpd.GetSet == PTP_DPGS_Get) + gp_widget_set_readonly (widget, 1); ptp_free_devicepropdesc(&dpd); if (nrofsetprops) setprops = realloc(setprops,sizeof(setprops[0])*(nrofsetprops+1)); @@ -4564,7 +4566,10 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context) default: break; } + if (dpd.GetSet == PTP_DPGS_Get) + gp_widget_set_readonly (widget, 1); gp_widget_append (section, widget); + ptp_free_devicepropdesc(&dpd); } return GP_OK; }