mark readonly widgets as readonly

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12558 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2009-12-13 13:16:58 +00:00
parent aabb0794a3
commit 80fbc41088
2 changed files with 9 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2009-12-13 Marcus Meissner <marcus@jet.franken.de>
* config.c: Mark readonly widgets as readonly
2009-12-06 Laurent Calmes <lcalmes@users.sourceforge.net>
* library.c: Fixed Nikon Preview code for Nikon D300,

View File

@@ -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;
}