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

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

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

revision 3363 by schoenebeck, Fri May 26 22:10:16 2017 UTC revision 3364 by schoenebeck, Tue Nov 14 18:07:25 2017 UTC
# Line 7  Line 7 
7    
8  #include "scriptslots.h"  #include "scriptslots.h"
9  #include "global.h"  #include "global.h"
10    #include "compat.h"
11    
12  ScriptSlots::ScriptSlots() :  ScriptSlots::ScriptSlots() :
13    #if HAS_GTKMM_STOCK
14      m_closeButton(Gtk::Stock::CLOSE)      m_closeButton(Gtk::Stock::CLOSE)
15    #else
16        m_closeButton(_("_Close"), true)
17    #endif
18  {  {
19      m_instrument = NULL;      m_instrument = NULL;
20    
21    #if !HAS_GTKMM_STOCK
22        m_closeButton.set_icon_name("window-close");
23    #endif
24    
25      if (!Settings::singleton()->autoRestoreWindowDimension) {      if (!Settings::singleton()->autoRestoreWindowDimension) {
26          set_default_size(460,300);          set_default_size(460,300);
27          set_position(Gtk::WIN_POS_MOUSE);          set_position(Gtk::WIN_POS_MOUSE);
# Line 62  ScriptSlots::ScriptSlots() : Line 71  ScriptSlots::ScriptSlots() :
71          sigc::mem_fun(*this, &ScriptSlots::onScriptDragNDropDataReceived)          sigc::mem_fun(*this, &ScriptSlots::onScriptDragNDropDataReceived)
72      );      );
73    
74    #if HAS_GTKMM_SHOW_ALL_CHILDREN
75      show_all_children();      show_all_children();
76    #endif
77  }  }
78    
79  ScriptSlots::~ScriptSlots() {  ScriptSlots::~ScriptSlots() {
# Line 127  void ScriptSlots::appendNewSlot(gig::Scr Line 138  void ScriptSlots::appendNewSlot(gig::Scr
138    
139      Row row;      Row row;
140      row.id = slotID++;      row.id = slotID++;
141      row.hbox = new Gtk::HBox;      row.hbox = new HBox;
142      row.label = new Gtk::Label;      row.label = new Gtk::Label;
143    #if HAS_GTKMM_STOCK
144      row.downButton = new Gtk::Button(Gtk::Stock::GO_DOWN);      row.downButton = new Gtk::Button(Gtk::Stock::GO_DOWN);
145      row.upButton = new Gtk::Button(Gtk::Stock::GO_UP);      row.upButton = new Gtk::Button(Gtk::Stock::GO_UP);
146      row.deleteButton = new Gtk::Button(Gtk::Stock::DELETE);      row.deleteButton = new Gtk::Button(Gtk::Stock::DELETE);
147    #else
148        row.downButton = new Gtk::Button(_("_Down"), true);
149        row.upButton = new Gtk::Button(_("_Up"), true);
150        row.deleteButton = new Gtk::Button(_("_Delete"), true);
151    
152        row.downButton->set_icon_name("go-down");
153        row.upButton->set_icon_name("go-up");
154        row.deleteButton->set_icon_name("edit-delete");
155    #endif
156      row.script = script;      row.script = script;
157    
158      row.hbox->pack_start(*row.label);      row.hbox->pack_start(*row.label);
# Line 159  void ScriptSlots::appendNewSlot(gig::Scr Line 180  void ScriptSlots::appendNewSlot(gig::Scr
180      );      );
181    
182      m_vboxSlots.add(*row.hbox);      m_vboxSlots.add(*row.hbox);
183    #if HAS_GTKMM_SHOW_ALL_CHILDREN
184      m_scrolledWindow.show_all_children();      m_scrolledWindow.show_all_children();
185    #endif
186    
187      m_slots.push_back(row);      m_slots.push_back(row);
188  }  }

Legend:
Removed from v.3363  
changed lines
  Added in v.3364

  ViewVC Help
Powered by ViewVC