diff --git a/geometry/dict-utils.cc b/geometry/dict-utils.cc index 8e1776f2de..c5f7d9c406 100644 --- a/geometry/dict-utils.cc +++ b/geometry/dict-utils.cc @@ -954,7 +954,6 @@ coot::dictionary_residue_restraints_t::make_graph(bool use_hydrogens) const { // This contains the atom indices of of atom_info (0-indexed). An // mmdb graph is 1-indexed. // - int vertex_indexing[atom_info.size()]; mmdb::math::Graph *graph = new mmdb::math::Graph; int i_atom = 0; @@ -981,11 +980,11 @@ coot::dictionary_residue_restraints_t::make_graph(bool use_hydrogens) const { if (it_1 == name_map.end()) { if (use_hydrogens || !is_hydrogen(br.atom_id_1_4c())) - std::cout << "Not found in name map atom 1 :" << br.atom_id_1() << ":" << std::endl; + std::cout << "WARNING:: Not found in name map atom 1 :" << br.atom_id_1() << ":" << std::endl; } else { if (it_2 == name_map.end()) { if (use_hydrogens || !is_hydrogen(br.atom_id_2_4c())) - std::cout << "Not found in name map atom 2 :" << br.atom_id_2() << ":" << std::endl; + std::cout << "WARNING:: Not found in name map atom 2 :" << br.atom_id_2() << ":" << std::endl; } else { if (use_hydrogens || (!is_hydrogen(br.atom_id_1_4c()) && diff --git a/python/coot_gui.py b/python/coot_gui.py index 68e5159087..41bd3fdc6a 100644 --- a/python/coot_gui.py +++ b/python/coot_gui.py @@ -5795,7 +5795,7 @@ def pukka_puckers_qm(imol): import types residue_list = [] - crit_d = 3.0 # Richardson's grup value to partition C2'-endo from C3'-endo + crit_d = 3.0 # Richardson's group value to partition C2'-endo from C3'-endo def add_questionable(r): residue_list.append(r) diff --git a/src/c-interface-gui.cc b/src/c-interface-gui.cc index 0f150521f6..a0b73051fb 100644 --- a/src/c-interface-gui.cc +++ b/src/c-interface-gui.cc @@ -3222,7 +3222,6 @@ GtkWidget *wrapped_create_model_fit_refine_dialog() { void update_model_fit_refine_dialog_menu(GtkWidget *dialog) { -#if (GTK_MAJOR_VERSION > 1) GtkWidget *menu_item; // update the menu for the rot/trans menu if (graphics_info_t::rot_trans_object_type == ROT_TRANS_TYPE_CHAIN) { @@ -3237,7 +3236,6 @@ update_model_fit_refine_dialog_menu(GtkWidget *dialog) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_item), TRUE); } } -#endif } // function to update button labels (currently rot/trans only) diff --git a/src/c-interface-pisa-gui.cc b/src/c-interface-pisa-gui.cc index a57705fe85..d91408e96b 100644 --- a/src/c-interface-pisa-gui.cc +++ b/src/c-interface-pisa-gui.cc @@ -40,7 +40,6 @@ void coot::pisa_interfaces_gui(const std::vector &gui_info) { -#if (GTK_MAJOR_VERSION > 1) if (graphics_info_t::use_graphics_interface_flag) { GtkWidget *w = create_pisa_interfaces_dialog(); gtk_widget_show(w); @@ -95,10 +94,8 @@ coot::pisa_interfaces_gui(const std::vector &gui_info) { gui_info_copy); } -#endif } -#if (GTK_MAJOR_VERSION > 1) void coot::add_pisa_interfaces_cell_renderer(GtkTreeView *tree_view, const std::string &column_title, @@ -114,11 +111,9 @@ coot::add_pisa_interfaces_cell_renderer(GtkTreeView *tree_view, gtk_tree_view_column_set_sort_column_id(column, pos); g_object_set_data (G_OBJECT (cell_renderer), "column", GINT_TO_POINTER (pos)); } -#endif -#if (GTK_MAJOR_VERSION > 1) void coot::on_pisa_interfaces_seletion_changed(GtkTreeSelection *treeselection, gpointer user_data) { @@ -167,4 +162,3 @@ coot::on_pisa_interfaces_seletion_changed(GtkTreeSelection *treeselection, } } -#endif diff --git a/src/graphics-info-defines.cc b/src/graphics-info-defines.cc index 3adc52c2b2..57b1de8d52 100644 --- a/src/graphics-info-defines.cc +++ b/src/graphics-info-defines.cc @@ -147,11 +147,7 @@ graphics_info_t::model_fit_refine_button_name_list() { std::vector names; names.push_back("model_refine_dialog_refine_params_button"); names.push_back("model_refine_dialog_map_select_button"); -#if (GTK_MAJOR_VERSION >1) names.push_back("model_refine_dialog_fixed_atoms_button"); -#else - names.push_back("model_refine_dialog_fix_atoms_button"); -#endif // names.push_back("model_refine_dialog_find_waters_button"); names.push_back("model_refine_dialog_add_alt_conf_button"); names.push_back("model_refine_dialog_pointer_atom_button"); diff --git a/src/graphics-info-draw.cc b/src/graphics-info-draw.cc index 02257fd9d9..3b259fd0bb 100644 --- a/src/graphics-info-draw.cc +++ b/src/graphics-info-draw.cc @@ -3728,6 +3728,10 @@ void graphics_info_t::reset_frame_buffers(int width, int height) { if (use_framebuffers) { + + + // 20220108-PE note to self. Try using the framebuffer::reset() function instead + unsigned int sf = framebuffer_scale; unsigned int index_offset = 0; @@ -5005,6 +5009,7 @@ graphics_info_t::fullscreen() { //static void graphics_info_t::unfullscreen() { + GtkWidget *window = widget_from_builder("main_window"); if (GTK_IS_WINDOW(window)) { gtk_window_unfullscreen(GTK_WINDOW(window)); @@ -5016,7 +5021,8 @@ graphics_info_t::unfullscreen() { GtkWidget *status_bar = widget_from_builder("main_window_statusbar"); GtkWidget *tool_bar = widget_from_builder("main_window_toolbar"); GtkWidget *menu_bar = widget_from_builder("main_window_menubar"); -#if 0 + +#if (GTK_MAJOR_VERSION > 3) gtk_overlay_remove_overlay(GTK_OVERLAY(overlay), tool_bar); gtk_container_add(GTK_CONTAINER(vbox), tool_bar); diff --git a/src/graphics-info-refmac.cc b/src/graphics-info-refmac.cc index 88430b81b8..a1865e2b9d 100644 --- a/src/graphics-info-refmac.cc +++ b/src/graphics-info-refmac.cc @@ -1116,14 +1116,8 @@ graphics_info_t::update_refmac_column_labels_frame(GtkWidget *map_optionmenu, // if given mtz file: get the parameters from coot::refmac::saved_refmac_parameters std::string file_mtz_filename; GtkWidget *twin_mtz_label = lookup_widget(map_optionmenu, "run_refmac_mtz_file_label"); -#if (GTK_MAJOR_VERSION > 1) const gchar *mtz_filename = gtk_label_get_text(GTK_LABEL(twin_mtz_label)); file_mtz_filename = mtz_filename; -#else - gchar **mtz_filename = 0; - gtk_label_get(GTK_LABEL(twin_mtz_label), mtz_filename); - file_mtz_filename = (char *)mtz_filename; -#endif // GTK std::string tmp_mtz; for (int i=0; i 0) { diff --git a/src/lbg-interface.cc b/src/lbg-interface.cc index 23f0384281..0eb2889517 100644 --- a/src/lbg-interface.cc +++ b/src/lbg-interface.cc @@ -23,13 +23,11 @@ #endif #include "compat/coot-sysdep.h" +#define ENABLE_NLS // 20220126-PE Charles says this is needed to fix dcgettext() problems + // when including libintl.h - move it up above graphics-info.h #include "graphics-info.h" - #include -#define ENABLE_NLS // fix dcgettext() header problems on including - // libintl.h (via RDKitBase.h etc (including boost - // stuff). #ifdef MAKE_ENHANCED_LIGAND_TOOLS #include "lidia-core/rdkit-interface.hh" diff --git a/src/model-as-mesh.shader b/src/model-as-mesh.shader index db6937b8fc..d447ff9e5b 100644 --- a/src/model-as-mesh.shader +++ b/src/model-as-mesh.shader @@ -2,6 +2,8 @@ #version 330 core +// this is for an instanced Mesh. + layout(location = 0) in vec3 position; layout(location = 1) in vec3 normal; layout(location = 2) in vec4 colour; // instanced. For instanced objects, the colour is set diff --git a/src/molecular-mesh-generator-mol-tris.cc b/src/molecular-mesh-generator-mol-tris.cc index dbc734ba7f..a6ce9ecffd 100644 --- a/src/molecular-mesh-generator-mol-tris.cc +++ b/src/molecular-mesh-generator-mol-tris.cc @@ -210,7 +210,7 @@ molecular_mesh_generator_t::get_molecular_triangles_mesh(mmdb::Manager *mol, if (colour_scheme == "colorRampChainsScheme" || colour_scheme == "Ramp") { - std::cout << "here with colorRampChainsScheme" << std::endl; + std::cout << "debug:: in get_molecular_triangles_mesh() with colorRampChainsScheme" << std::endl; for(int imod = 1; imod<=mol->GetNumberOfModels(); imod++) { mmdb::Model *model_inner_p = mol->GetModel(imod); if (model_p) { @@ -244,7 +244,7 @@ molecular_mesh_generator_t::get_molecular_triangles_mesh(mmdb::Manager *mol, r->redraw(); std::vector > vdp = r->getDisplayPrimitives(); auto displayPrimitiveIter = vdp.begin(); - int i=0; + // int i=0; std::vector vertices; std::vector triangles; @@ -270,7 +270,7 @@ molecular_mesh_generator_t::get_molecular_triangles_mesh(mmdb::Manager *mol, #endif unsigned int idx = 0; - for (displayPrimitiveIter=vdp.begin(); displayPrimitiveIter != vdp.end(); displayPrimitiveIter++, idx++) { + for (displayPrimitiveIter=vdp.begin(); displayPrimitiveIter != vdp.end(); displayPrimitiveIter++, ++idx) { molecular_triangles_mesh_t current_primitives; @@ -300,7 +300,7 @@ molecular_mesh_generator_t::get_molecular_triangles_mesh(mmdb::Manager *mol, // BoxSectionPrimitive have not had their colours scaled for some reason. if (displayPrimitive.type() == DisplayPrimitive::PrimitiveType::BoxSectionPrimitive) { // std::cout << "vertex iVertex " << iVertex << " " << glm::to_string(gv.color) << std::endl; - for (int i=0; i<3; i++) gv.color[i] /= 255.0; + for (int ii=0; ii<3; ii++) gv.color[ii] /= 255.0; } } diff --git a/src/molecule-class-info.h b/src/molecule-class-info.h index 8c37e2b82e..718df8465f 100644 --- a/src/molecule-class-info.h +++ b/src/molecule-class-info.h @@ -3425,9 +3425,7 @@ class molecule_class_info_t { #ifdef USE_MOLECULES_TO_TRIANGLES -#ifdef HAVE_CXX11 std::vector > molrepinsts; -#endif #endif // USE_MOLECULES_TO_TRIANGLES // return the index in the molrepinsts vector (can be negative for failure) diff --git a/src/moleculestotriangles.shader b/src/moleculestotriangles.shader index da122f3121..eafb2428d6 100644 --- a/src/moleculestotriangles.shader +++ b/src/moleculestotriangles.shader @@ -95,6 +95,7 @@ void main() { specular_strength = 0.0; dp = clamp(dp, 0.1, 1.0); // no negative dot products for diffuse + // why don't I use the light source? vec4 lsa = vec4(0.4, 0.4, 0.4, 1.0); vec4 lsd = vec4(0.6, 0.6, 0.6, 1.0); vec4 ambient = colour_transfer * lsa * 0.1; diff --git a/src/restraints-editor.cc b/src/restraints-editor.cc index be5a706374..1cc2f0fe87 100644 --- a/src/restraints-editor.cc +++ b/src/restraints-editor.cc @@ -36,8 +36,6 @@ #include // strcpy #include -#if (GTK_MAJOR_VERSION > 1) - #include "interface.h" #include "support.h" @@ -228,8 +226,8 @@ coot::restraints_editor::get_column_type(int tree_type, int column_number, int m break; default: r = G_TYPE_STRING; - } - } + } + } if (tree_type == coot::restraints_editor::TREE_TYPE_CHIRALS) { switch(column_number) { case(5): @@ -1470,4 +1468,3 @@ coot::restraints_editor::get_tree_view_by_notebook_page(gint current_page_index) return tree_view; } -#endif // (GTK_MAJOR_VERSION > 1) diff --git a/src/sdf-interface.cc b/src/sdf-interface.cc index 0900e6999e..2e511937b2 100644 --- a/src/sdf-interface.cc +++ b/src/sdf-interface.cc @@ -25,6 +25,8 @@ // We need this high so that dcgettext() so we don't get expected unqualified-id before 'const' // errors when we read libintl from rdkit-interface.hh +#define ENABLE_NLS // 20220126-PE Charles says this is needed to fix dcgettext() problems + // when including libintl.h - hmm! #include "graphics-info.h" #ifdef MAKE_ENHANCED_LIGAND_TOOLS #include @@ -34,10 +36,6 @@ #include -#define ENABLE_NLS // fix dcgettext() header problems on including - // libintl.h (via RDKitBase.h etc (including boost - // stuff). - #include // for istream? #include // for istream?