/[svn]/gigedit/trunk/src/gigedit/mainwindow.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/mainwindow.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3619 by schoenebeck, Tue Oct 1 16:21:28 2019 UTC revision 3635 by schoenebeck, Thu Oct 24 11:16:26 2019 UTC
# Line 2856  InstrumentProps::InstrumentProps() : Line 2856  InstrumentProps::InstrumentProps() :
2856      ePitchbendRange(_("Pitchbend range"), 0, 48),      ePitchbendRange(_("Pitchbend range"), 0, 48),
2857      ePianoReleaseMode(_("Piano release mode")),      ePianoReleaseMode(_("Piano release mode")),
2858      eDimensionKeyRangeLow(_("Keyswitching range low")),      eDimensionKeyRangeLow(_("Keyswitching range low")),
2859      eDimensionKeyRangeHigh(_("Keyswitching range high"))      eDimensionKeyRangeHigh(_("Keyswitching range high")),
2860        table2(2,1),
2861        eName2(_("Name")),
2862        eCreationDate(_("Creation date")),
2863        eComments(_("Comments")),
2864        eProduct(_("Product")),
2865        eCopyright(_("Copyright")),
2866        eArtists(_("Artists")),
2867        eGenre(_("Genre")),
2868        eKeywords(_("Keywords")),
2869        eEngineer(_("Engineer")),
2870        eTechnician(_("Technician")),
2871        eSoftware(_("Software")),
2872        eMedium(_("Medium")),
2873        eSource(_("Source")),
2874        eSourceForm(_("Source form")),
2875        eCommissioned(_("Commissioned")),
2876        eSubject(_("Subject"))
2877  {  {
2878      if (!Settings::singleton()->autoRestoreWindowDimension) {      if (!Settings::singleton()->autoRestoreWindowDimension) {
2879          //set_default_size(470, 390);          //set_default_size(470, 390);
# Line 2865  InstrumentProps::InstrumentProps() : Line 2882  InstrumentProps::InstrumentProps() :
2882    
2883      set_title(_("Instrument Properties"));      set_title(_("Instrument Properties"));
2884    
2885        tabs.append_page(vbox[1], _("Settings"));
2886        tabs.append_page(vbox[2], _("Info"));
2887    
2888      eDimensionKeyRangeLow.set_tip(      eDimensionKeyRangeLow.set_tip(
2889          _("start of the keyboard area which should switch the "          _("start of the keyboard area which should switch the "
2890            "\"keyswitching\" dimension")            "\"keyswitching\" dimension")
# Line 2889  InstrumentProps::InstrumentProps() : Line 2909  InstrumentProps::InstrumentProps() :
2909    
2910      eName.signal_value_changed().connect(sig_name_changed.make_slot());      eName.signal_value_changed().connect(sig_name_changed.make_slot());
2911    
2912        connect(eName2, &InstrumentProps::set_Name);
2913        connectLambda(eCreationDate, [this](gig::String s) {
2914            m->pInfo->CreationDate = s;
2915        });
2916        connectLambda(eComments, [this](gig::String s) {
2917            m->pInfo->Comments = s;
2918        });
2919        connectLambda(eProduct, [this](gig::String s) {
2920            m->pInfo->Product = s;
2921        });
2922        connectLambda(eCopyright, [this](gig::String s) {
2923            m->pInfo->Copyright = s;
2924        });
2925        connectLambda(eArtists, [this](gig::String s) {
2926            m->pInfo->Artists = s;
2927        });
2928        connectLambda(eGenre, [this](gig::String s) {
2929            m->pInfo->Genre = s;
2930        });
2931        connectLambda(eKeywords, [this](gig::String s) {
2932            m->pInfo->Keywords = s;
2933        });
2934        connectLambda(eEngineer, [this](gig::String s) {
2935            m->pInfo->Engineer = s;
2936        });
2937        connectLambda(eTechnician, [this](gig::String s) {
2938            m->pInfo->Technician = s;
2939        });
2940        connectLambda(eSoftware, [this](gig::String s) {
2941            m->pInfo->Software = s;
2942        });
2943        connectLambda(eMedium, [this](gig::String s) {
2944            m->pInfo->Medium = s;
2945        });
2946        connectLambda(eSource, [this](gig::String s) {
2947            m->pInfo->Source = s;
2948        });
2949        connectLambda(eSourceForm, [this](gig::String s) {
2950            m->pInfo->SourceForm = s;
2951        });
2952        connectLambda(eCommissioned, [this](gig::String s) {
2953            m->pInfo->Commissioned = s;
2954        });
2955        connectLambda(eSubject, [this](gig::String s) {
2956            m->pInfo->Subject = s;
2957        });
2958    
2959        // tab 1
2960  #if USE_GTKMM_GRID  #if USE_GTKMM_GRID
2961      table.set_column_spacing(5);      table.set_column_spacing(5);
2962  #else  #else
2963      table.set_col_spacings(5);      table.set_col_spacings(5);
2964  #endif  #endif
   
2965      table.add(eName);      table.add(eName);
2966      table.add(eIsDrum);      table.add(eIsDrum);
2967      table.add(eMIDIBank);      table.add(eMIDIBank);
# Line 2908  InstrumentProps::InstrumentProps() : Line 2975  InstrumentProps::InstrumentProps() :
2975      table.add(eDimensionKeyRangeLow);      table.add(eDimensionKeyRangeLow);
2976      table.add(eDimensionKeyRangeHigh);      table.add(eDimensionKeyRangeHigh);
2977    
2978      add(vbox);      // tab 2
2979    #if USE_GTKMM_GRID
2980        table2.set_column_spacing(5);
2981    #else
2982        table2.set_col_spacings(5);
2983    #endif
2984        table2.add(eName2);
2985        table2.add(eCreationDate);
2986        table2.add(eComments);
2987        table2.add(eProduct);
2988        table2.add(eCopyright);
2989        table2.add(eArtists);
2990        table2.add(eGenre);
2991        table2.add(eKeywords);
2992        table2.add(eEngineer);
2993        table2.add(eTechnician);
2994        table2.add(eSoftware);
2995        table2.add(eMedium);
2996        table2.add(eSource);
2997        table2.add(eSourceForm);
2998        table2.add(eCommissioned);
2999        table2.add(eSubject);
3000    
3001        add(vbox[0]);
3002  #if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)  #if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)
3003      table.set_margin(5);      table.set_margin(5);
3004  #else  #else
3005      table.set_border_width(5);      table.set_border_width(5);
3006  #endif  #endif
3007      vbox.pack_start(table);      vbox[1].pack_start(table);
3008        vbox[2].pack_start(table2);
3009      table.show();      table.show();
3010      vbox.pack_start(buttonBox, Gtk::PACK_SHRINK);      table2.show();
3011        vbox[0].pack_start(tabs);
3012        vbox[0].pack_start(buttonBox, Gtk::PACK_SHRINK);
3013      buttonBox.set_layout(Gtk::BUTTONBOX_END);      buttonBox.set_layout(Gtk::BUTTONBOX_END);
3014  #if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)  #if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)
3015      buttonBox.set_margin(5);      buttonBox.set_margin(5);
# Line 2932  InstrumentProps::InstrumentProps() : Line 3025  InstrumentProps::InstrumentProps() :
3025          sigc::mem_fun(*this, &InstrumentProps::hide));          sigc::mem_fun(*this, &InstrumentProps::hide));
3026    
3027      quitButton.show();      quitButton.show();
3028      vbox.show();      vbox[0].show();
3029  #if HAS_GTKMM_SHOW_ALL_CHILDREN  #if HAS_GTKMM_SHOW_ALL_CHILDREN
3030      show_all_children();      show_all_children();
3031  #endif  #endif
# Line 2943  void InstrumentProps::set_instrument(gig Line 3036  void InstrumentProps::set_instrument(gig
3036      update(instrument);      update(instrument);
3037    
3038      update_model++;      update_model++;
3039    
3040        // tab 1
3041      eName.set_value(instrument->pInfo->Name);      eName.set_value(instrument->pInfo->Name);
3042      eIsDrum.set_value(instrument->IsDrum);      eIsDrum.set_value(instrument->IsDrum);
3043      eMIDIBank.set_value(instrument->MIDIBank);      eMIDIBank.set_value(instrument->MIDIBank);
3044      eMIDIProgram.set_value(instrument->MIDIProgram);      eMIDIProgram.set_value(instrument->MIDIProgram);
3045        // tab 2
3046        eName2.set_value(instrument->pInfo->Name);
3047        eCreationDate.set_value(instrument->pInfo->CreationDate);
3048        eComments.set_value(instrument->pInfo->Comments);
3049        eProduct.set_value(instrument->pInfo->Product);
3050        eCopyright.set_value(instrument->pInfo->Copyright);
3051        eArtists.set_value(instrument->pInfo->Artists);
3052        eGenre.set_value(instrument->pInfo->Genre);
3053        eKeywords.set_value(instrument->pInfo->Keywords);
3054        eEngineer.set_value(instrument->pInfo->Engineer);
3055        eTechnician.set_value(instrument->pInfo->Technician);
3056        eSoftware.set_value(instrument->pInfo->Software);
3057        eMedium.set_value(instrument->pInfo->Medium);
3058        eSource.set_value(instrument->pInfo->Source);
3059        eSourceForm.set_value(instrument->pInfo->SourceForm);
3060        eCommissioned.set_value(instrument->pInfo->Commissioned);
3061        eSubject.set_value(instrument->pInfo->Subject);
3062    
3063      update_model--;      update_model--;
3064  }  }
3065    

Legend:
Removed from v.3619  
changed lines
  Added in v.3635

  ViewVC Help
Powered by ViewVC