Changeset - a59d0f4563cc
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 12 years ago 2013-06-05 23:39:44
drewp@bigasterisk.com
starting curvecalc editchoice
Ignore-this: 3885f61f6addba30ea997cc471fd39a9
2 files changed with 41 insertions and 6 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -32,12 +32,14 @@ from light9.wavelength import wavelength
 
from light9.namespaces import L9
 
from light9.curvecalc.subterm import savekey, graphPathForSubterms
 
from light9.curvecalc.subtermview import add_one_subterm
 
from light9.curvecalc.output import Output
 
from light9.gtkpyconsole import togglePyConsole
 
from light9.rdfdb.syncedgraph import SyncedGraph
 
from light9.editchoicegtk import EditChoice
 
from light9.observable import Observable
 

	
 
class SubtermExists(ValueError):
 
    pass
 

	
 
class Main(object):
 
    def __init__(self, graph, opts, session, curveset, subterms, music):
 
@@ -56,24 +58,32 @@ class Main(object):
 
        if self.opts.reload:
 
            self.refreshTheme()
 
        mainwin.show_all()
 

	
 
        mainwin.connect("delete-event", lambda *args: reactor.crash())
 
        def updateTitle():
 
            # song will soon be a lookup on this curvecalc session
 
            mainwin.set_title("curvecalc - %s" %
 
                              graph.label(
 
                                  graph.value(session, L9['currentSong'])))
 
        graph.addHandler(updateTitle)
 
        mainwin.parse_geometry("1x1-0+0")
 

	
 
        # this is the only one i found that would set the size right,
 
        # but it's a minimum size, which i don't really want
 
        mainwin.set_size_request(1678, 922)
 

	
 
        songChoice = Observable(None) # to be connected with the session song
 

	
 
        def setSong():
 
            songChoice(graph.value(session, L9['currentSong']))
 
        graph.addHandler(setSong)
 
        
 
        ec = EditChoice(graph, songChoice, label="Editing song:")
 
        wtree.get_object("currentSongEditChoice").add(ec)
 
        ec.show()
 
        
 
        wtree.get_object("subterms").connect("add", self.onSubtermChildAdded)
 
        graph.addHandler(self.add_subterms_for_song)
 
        self.refreshCurveView()       
 
        
 
        self.makeStatusLines(wtree.get_object("status"))
 

	
light9/curvecalc/curvecalc.glade
Show inline comments
 
@@ -293,12 +293,40 @@
 
            <property name="expand">False</property>
 
            <property name="fill">True</property>
 
            <property name="position">0</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <object class="GtkHBox" id="hbox3">
 
            <property name="visible">True</property>
 
            <property name="can_focus">False</property>
 
            <child>
 
              <object class="GtkHBox" id="currentSongEditChoice">
 
                <property name="visible">True</property>
 
                <property name="can_focus">False</property>
 
                <child>
 
                  <placeholder/>
 
                </child>
 
              </object>
 
              <packing>
 
                <property name="expand">False</property>
 
                <property name="fill">True</property>
 
                <property name="position">0</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <placeholder/>
 
            </child>
 
          </object>
 
          <packing>
 
            <property name="expand">False</property>
 
            <property name="fill">False</property>
 
            <property name="position">1</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <object class="GtkVPaned" id="paned1">
 
            <property name="height_request">600</property>
 
            <property name="visible">True</property>
 
            <property name="can_focus">True</property>
 
            <property name="position">600</property>
 
            <child>
 
@@ -565,13 +593,13 @@
 
              </packing>
 
            </child>
 
          </object>
 
          <packing>
 
            <property name="expand">True</property>
 
            <property name="fill">True</property>
 
            <property name="position">1</property>
 
            <property name="position">2</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <object class="GtkHBox" id="hbox1">
 
            <property name="visible">True</property>
 
            <property name="can_focus">False</property>
 
@@ -625,18 +653,15 @@
 
            </child>
 
          </object>
 
          <packing>
 
            <property name="expand">False</property>
 
            <property name="fill">False</property>
 
            <property name="padding">5</property>
 
            <property name="position">2</property>
 
            <property name="position">3</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <placeholder/>
 
        </child>
 
      </object>
 
    </child>
 
  </object>
 
  <object class="GtkAccelGroup" id="accelgroup1"/>
 
  <object class="GtkAdjustment" id="adjustment1">
 
    <property name="upper">100</property>
0 comments (0 inline, 0 general)