"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer1/Setting.cpp" between
pymol-v1.8.6.0.tar.bz2 and pymol-v2.1.0.tar.bz2

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

Setting.cpp  (pymol-v1.8.6.0.tar.bz2):Setting.cpp  (pymol-v2.1.0.tar.bz2)
skipping to change at line 268 skipping to change at line 268
if (SettingUniqueGetTypedValuePtr(G, unique_id, index, type, &ptr_3f)) { if (SettingUniqueGetTypedValuePtr(G, unique_id, index, type, &ptr_3f)) {
switch (type) { switch (type) {
case cSetting_boolean: case cSetting_boolean:
return CPythonVal_New_Boolean(val_i); return CPythonVal_New_Boolean(val_i);
case cSetting_int: case cSetting_int:
return CPythonVal_New_Integer(val_i); return CPythonVal_New_Integer(val_i);
case cSetting_float: case cSetting_float:
return CPythonVal_New_Float(val_f); return CPythonVal_New_Float(val_f);
case cSetting_color: case cSetting_color:
ptr_3f = ColorGet(G, val_i); #ifdef _PYMOL_NOPY
return CPythonVal_New_Integer(val_i);
#else
return PYOBJECT_CALLFUNCTION(G->P_inst->colortype, "i", val_i);
#endif
case cSetting_float3: case cSetting_float3:
{ {
PyObject *result = PyTuple_New(3); PyObject *result = PyTuple_New(3);
PyTuple_SET_ITEM(result, 0, CPythonVal_New_Float(ptr_3f[0])); PyTuple_SET_ITEM(result, 0, CPythonVal_New_Float(ptr_3f[0]));
PyTuple_SET_ITEM(result, 1, CPythonVal_New_Float(ptr_3f[1])); PyTuple_SET_ITEM(result, 1, CPythonVal_New_Float(ptr_3f[1]));
PyTuple_SET_ITEM(result, 2, CPythonVal_New_Float(ptr_3f[2])); PyTuple_SET_ITEM(result, 2, CPythonVal_New_Float(ptr_3f[2]));
return result; return result;
} }
} }
} }
skipping to change at line 626 skipping to change at line 630
return true; return true;
} }
switch (index) { switch (index) {
case cSetting_antialias_shader: case cSetting_antialias_shader:
case cSetting_ati_bugs: case cSetting_ati_bugs:
case cSetting_cache_max: case cSetting_cache_max:
case cSetting_cgo_shader_ub_color: case cSetting_cgo_shader_ub_color:
case cSetting_cgo_shader_ub_flags: case cSetting_cgo_shader_ub_flags:
case cSetting_cgo_shader_ub_normal: case cSetting_cgo_shader_ub_normal:
case cSetting_colored_feedback:
case cSetting_cylinder_shader_ff_workaround: case cSetting_cylinder_shader_ff_workaround:
case cSetting_defer_updates: case cSetting_defer_updates:
case cSetting_fast_idle: case cSetting_fast_idle:
case cSetting_internal_feedback: case cSetting_internal_feedback:
case cSetting_internal_gui: case cSetting_internal_gui:
case cSetting_internal_prompt: case cSetting_internal_prompt:
case cSetting_logging: case cSetting_logging:
case cSetting_max_threads: case cSetting_max_threads:
case cSetting_mouse_grid: case cSetting_mouse_grid:
case cSetting_mouse_scale: case cSetting_mouse_scale:
case cSetting_nb_spheres_use_shader: case cSetting_nb_spheres_use_shader:
case cSetting_no_idle: case cSetting_no_idle:
case cSetting_nvidia_bugs: case cSetting_nvidia_bugs:
case cSetting_presentation:
case cSetting_precomputed_lighting: case cSetting_precomputed_lighting:
case cSetting_render_as_cylinders: case cSetting_render_as_cylinders:
case cSetting_security: case cSetting_security:
case cSetting_session_changed: case cSetting_session_changed:
case cSetting_session_file: case cSetting_session_file:
case cSetting_session_migration: case cSetting_session_migration:
case cSetting_session_version_check: case cSetting_session_version_check:
case cSetting_shaders_from_disk: case cSetting_shaders_from_disk:
case cSetting_show_progress: case cSetting_show_progress:
case cSetting_slow_idle: case cSetting_slow_idle:
skipping to change at line 660 skipping to change at line 666
case cSetting_stereo_double_pump_mono: case cSetting_stereo_double_pump_mono:
case cSetting_stereo_mode: case cSetting_stereo_mode:
case cSetting_suspend_deferred: case cSetting_suspend_deferred:
case cSetting_suspend_undo: case cSetting_suspend_undo:
case cSetting_suspend_undo_atom_count: case cSetting_suspend_undo_atom_count:
case cSetting_suspend_updates: case cSetting_suspend_updates:
case cSetting_text: case cSetting_text:
case cSetting_trilines: case cSetting_trilines:
case cSetting_use_geometry_shaders: case cSetting_use_geometry_shaders:
case cSetting_use_shaders: case cSetting_use_shaders:
case cSetting_pick32bit:
case cSetting_display_scale_factor:
#ifdef _PYMOL_IOS #ifdef _PYMOL_IOS
case cSetting_cgo_sphere_quality: case cSetting_cgo_sphere_quality:
case cSetting_dynamic_measures: case cSetting_dynamic_measures:
case cSetting_label_outline_color: case cSetting_label_outline_color:
case cSetting_mouse_selection_mode: case cSetting_mouse_selection_mode:
case cSetting_sphere_mode: case cSetting_sphere_mode:
case cSetting_sphere_quality: case cSetting_sphere_quality:
case cSetting_stick_ball: case cSetting_stick_ball:
case cSetting_virtual_trackball: case cSetting_virtual_trackball:
#elif defined(_PYMOL_ACTIVEX) #elif defined(_PYMOL_ACTIVEX)
skipping to change at line 866 skipping to change at line 874
int ok = true; int ok = true;
CSetting *I = G->Setting; CSetting *I = G->Setting;
if(list) if(list)
if(PyList_Check(list)) if(PyList_Check(list))
ok = SettingFromPyList(I, list); ok = SettingFromPyList(I, list);
/* restore the following settings */ /* restore the following settings */
if(G->Option->presentation) {
SettingSet_b(I, cSetting_presentation, 1);
}
if(G->Option->no_quit) { if(G->Option->no_quit) {
SettingSet_b(I, cSetting_presentation_auto_quit, 0); SettingSet_b(I, cSetting_presentation_auto_quit, 0);
} }
ColorUpdateFrontFromSettings(G); ColorUpdateFrontFromSettings(G);
return (ok); return (ok);
} }
PyObject *SettingGetGlobalsAsPyList(PyMOLGlobals * G) PyObject *SettingGetGlobalsAsPyList(PyMOLGlobals * G)
{ {
skipping to change at line 973 skipping to change at line 978
/*========================================================================*/ /*========================================================================*/
static int set_list(CSetting * I, PyObject * list) static int set_list(CSetting * I, PyObject * list)
{ {
int index = -1; int index = -1;
int setting_type = -1; int setting_type = -1;
union { union {
int val_i; int val_i;
float val_f; float val_f;
float val_3f[3]; float val_3f[3];
char * val_s; const char * val_s;
}; };
if (list == NULL || CPythonVal_IsNone(list)) if (list == NULL || CPythonVal_IsNone(list))
return true; return true;
ok_assert(1, PyList_Check(list)); ok_assert(1, PyList_Check(list));
ok_assert(1, CPythonVal_PConvPyIntToInt_From_List(I->G, list, 0, &index)); ok_assert(1, CPythonVal_PConvPyIntToInt_From_List(I->G, list, 0, &index));
ok_assert(1, CPythonVal_PConvPyIntToInt_From_List(I->G, list, 1, &setting_type )); ok_assert(1, CPythonVal_PConvPyIntToInt_From_List(I->G, list, 1, &setting_type ));
if (is_session_blacklisted(index)) if (is_session_blacklisted(index))
skipping to change at line 2766 skipping to change at line 2771
case cSetting_selection_round_points: case cSetting_selection_round_points:
ExecutiveInvalidateSelectionIndicatorsCGO(G); ExecutiveInvalidateSelectionIndicatorsCGO(G);
break; break;
case cSetting_antialias_shader: case cSetting_antialias_shader:
case cSetting_atom_type_format: case cSetting_atom_type_format:
case cSetting_bg_image_mode: case cSetting_bg_image_mode:
case cSetting_bg_image_filename: case cSetting_bg_image_filename:
case cSetting_bg_image_linear: case cSetting_bg_image_linear:
case cSetting_bg_image_tilesize: case cSetting_bg_image_tilesize:
case cSetting_chromadepth: case cSetting_chromadepth:
case cSetting_colored_feedback:
case cSetting_dash_transparency: case cSetting_dash_transparency:
case cSetting_label_bg_color: case cSetting_label_bg_color:
case cSetting_label_bg_outline: case cSetting_label_bg_outline:
case cSetting_label_bg_transparency: case cSetting_label_bg_transparency:
case cSetting_label_connector: case cSetting_label_connector:
case cSetting_label_connector_color: case cSetting_label_connector_color:
case cSetting_label_connector_ext_length: case cSetting_label_connector_ext_length:
case cSetting_label_connector_mode: case cSetting_label_connector_mode:
case cSetting_label_connector_width: case cSetting_label_connector_width:
case cSetting_label_multiline_justification: case cSetting_label_multiline_justification:
skipping to change at line 2797 skipping to change at line 2803
case cSetting_session_embeds_data: case cSetting_session_embeds_data:
case cSetting_shaders_from_disk: case cSetting_shaders_from_disk:
case cSetting_suspend_undo: case cSetting_suspend_undo:
case cSetting_use_geometry_shaders: case cSetting_use_geometry_shaders:
case cSetting_volume_mode: case cSetting_volume_mode:
case cSetting_surface_smooth_edges: case cSetting_surface_smooth_edges:
PRINTFB(G, FB_Setting, FB_Warnings) PRINTFB(G, FB_Setting, FB_Warnings)
" Setting-Warning: %s is not supported in Open-Source version of PyMOL\n", " Setting-Warning: %s is not supported in Open-Source version of PyMOL\n",
SettingInfo[index].name SettingInfo[index].name
ENDFB(G); ENDFB(G);
break;
case cSetting_display_scale_factor:
{
int scaleFactor = SettingGetGlobal_i(G, cSetting_display_scale_factor);
if (scaleFactor > 0) {
_gScaleFactor = scaleFactor;
ExecutiveInvalidateRep(G, NULL, cRepLabel, cRepInvRep);
OrthoCommandIn(G, "viewport");
} else {
SettingSetGlobal_i(G, cSetting_display_scale_factor, 1);
PRINTFB(G, FB_Setting, FB_Warnings)
"Setting-Error: Cannot set a display scale factor of 0\n"
ENDFB(G);
}
}
default: default:
break; break;
} }
} }
/*========================================================================*/ /*========================================================================*/
void SettingFreeGlobal(PyMOLGlobals * G) void SettingFreeGlobal(PyMOLGlobals * G)
{ {
CSetting *I = G->Setting; CSetting *I = G->Setting;
SettingUniqueFree(G); SettingUniqueFree(G);
skipping to change at line 2865 skipping to change at line 2886
set_b(I, cSetting_auto_show_nonbonded, G->Option->sphere_mode < 0); set_b(I, cSetting_auto_show_nonbonded, G->Option->sphere_mode < 0);
set_b(I, cSetting_presentation, G->Option->presentation); set_b(I, cSetting_presentation, G->Option->presentation);
set_i(I, cSetting_defer_builds_mode, G->Option->defer_builds_mode); set_i(I, cSetting_defer_builds_mode, G->Option->defer_builds_mode);
set_b(I, cSetting_presentation_auto_quit, !G->Option->no_quit); set_b(I, cSetting_presentation_auto_quit, !G->Option->no_quit);
set_b(I, cSetting_auto_show_spheres, G->Option->sphere_mode >= 0); set_b(I, cSetting_auto_show_spheres, G->Option->sphere_mode >= 0);
set_i(I, cSetting_internal_feedback, G->Option->internal_feedback); set_i(I, cSetting_internal_feedback, G->Option->internal_feedback);
if(G->Option->stereo_mode) { if(G->Option->stereo_mode) {
set_i(I, cSetting_stereo_mode, G->Option->stereo_mode); set_i(I, cSetting_stereo_mode, G->Option->stereo_mode);
} else if(G->StereoCapable || G->Option->blue_line) { } else if(G->StereoCapable || G->Option->blue_line) {
set_i(I, cSetting_stereo_mode, 1); /* quadbuffer if we can */ set_i(I, cSetting_stereo_mode, cStereo_quadbuffer); /* quadbuffer if we can */
} }
/* In order to get electrostatic potentials in kT from the Coulomb equation. .. /* In order to get electrostatic potentials in kT from the Coulomb equation. ..
PyMOL charges: Q, in e PyMOL charges: Q, in e
PyMOL distances: r, in Angstrom PyMOL distances: r, in Angstrom
Coulomb Constant: K = 8.987552e9 ((J*m)/(C^2)) Coulomb Constant: K = 8.987552e9 ((J*m)/(C^2))
Angstrom Convertor: 1 A = 1e-10 m Angstrom Convertor: 1 A = 1e-10 m
Coulomb Convertor: 1 e = 1.60217733e-19 C Coulomb Convertor: 1 e = 1.60217733e-19 C
Angstrom Convertor: 1 A = 10e-10 m Angstrom Convertor: 1 A = 10e-10 m
 End of changes. 9 change blocks. 
6 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)