Changeset - 857aab04f7bd
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 13 years ago 2012-06-16 02:00:03
drewp@bigasterisk.com
CC layout to fit more curves
Ignore-this: d7f2bf80e85da0c969605cac0355fbb5
2 files changed with 13 insertions and 56 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -61,41 +61,45 @@ class Main(object):
 
        if self.opts.reload:
 
            self.refreshTheme()
 
        mainwin.show_all()
 

	
 
        mainwin.connect("delete-event", lambda *args: reactor.crash())
 
        mainwin.set_title("curvecalc - %s" % graph.label(song))
 
        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)
 

	
 

	
 
        wtree.get_object("subterms").connect("add", self.onSubtermChildAdded)
 
        self.add_subterms_for_song(song, curveset, subterms)
 
        self.refreshCurveView()       
 
        
 
        self.makeStatusLines(wtree.get_object("status"))
 

	
 
        def connect(w):
 
            w.drag_dest_set(flags=gtk.DEST_DEFAULT_ALL,
 
                            targets=[('text/uri-list', 0, 0)],
 
                            actions=gtk.gdk.ACTION_COPY)
 
            w.connect("drag-data-received", self.onDataReceived)
 
        connect(mainwin)
 
        # that's not enough- deeper windows don't accept the
 
        # event. 
 
        mainwin.forall(connect) # not very effective
 
        connect(wtree.get_object("subterms")) # works for that area
 

	
 
        # may not work
 
        wtree.get_object("paned1").set_position(600)
 

	
 
    def onDataReceived(self, widget, context, x, y, selection,
 
                       targetType, time):
 
        uri = URIRef(selection.data.strip())
 
        subName = self.graph.label(uri)
 

	
 
        try:
 
            self.makeSubterm(subName, withCurve=True)
 
        except SubtermExists:
 
            pass
 
        curveView = self.curvesetView.row(subName).curveView
 
        t = self.lastSeenInputTime # curveView.current_time() # new curve hasn't heard the time yet. this has gotten too messy- everyone just needs to be able to reach the time source
 
        print "time", t
light9/curvecalc/curvecalc.glade
Show inline comments
 
@@ -291,24 +291,25 @@
 
          </object>
 
          <packing>
 
            <property name="expand">False</property>
 
            <property name="fill">True</property>
 
            <property name="position">0</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>
 
              <object class="GtkExpander" id="expander2">
 
                <property name="height_request">400</property>
 
                <property name="visible">True</property>
 
                <property name="can_focus">True</property>
 
                <property name="expanded">True</property>
 
                <child>
 
                  <object class="GtkVBox" id="vbox4">
 
                    <property name="height_request">100</property>
 
                    <property name="visible">True</property>
 
                    <property name="can_focus">False</property>
 
                    <child>
 
@@ -600,95 +601,47 @@
 
                    <property name="label" translatable="yes">Status</property>
 
                    <property name="use_markup">True</property>
 
                  </object>
 
                </child>
 
              </object>
 
              <packing>
 
                <property name="expand">True</property>
 
                <property name="fill">True</property>
 
                <property name="position">0</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <object class="GtkFrame" id="frame3">
 
              <object class="GtkTextView" id="textview1">
 
                <property name="visible">True</property>
 
                <property name="can_focus">False</property>
 
                <property name="label_xalign">0</property>
 
                <property name="label_yalign">0</property>
 
                <property name="shadow_type">out</property>
 
                <child>
 
                  <object class="GtkVBox" id="vbox7">
 
                    <property name="visible">True</property>
 
                    <property name="can_focus">False</property>
 
                    <child>
 
                      <object class="GtkImage" id="image3">
 
                        <property name="width_request">289</property>
 
                        <property name="height_request">120</property>
 
                        <property name="visible">True</property>
 
                        <property name="can_focus">False</property>
 
                        <property name="stock">gtk-missing-image</property>
 
                      </object>
 
                      <packing>
 
                        <property name="expand">False</property>
 
                        <property name="fill">False</property>
 
                        <property name="position">0</property>
 
                      </packing>
 
                    </child>
 
                    <child>
 
                      <object class="GtkLabel" id="label19">
 
                        <property name="visible">True</property>
 
                        <property name="can_focus">False</property>
 
                        <property name="yalign">0.4699999988079071</property>
 
                        <property name="label" translatable="yes">vidref from Sat 15:30</property>
 
                      </object>
 
                      <packing>
 
                        <property name="expand">True</property>
 
                        <property name="fill">True</property>
 
                        <property name="position">1</property>
 
                      </packing>
 
                    </child>
 
                  </object>
 
                </child>
 
                <child type="label_item">
 
                  <placeholder/>
 
                </child>
 
                <property name="can_focus">True</property>
 
                <property name="editable">False</property>
 
                <property name="wrap_mode">word</property>
 
                <property name="buffer">help</property>
 
              </object>
 
              <packing>
 
                <property name="expand">False</property>
 
                <property name="fill">False</property>
 
                <property name="padding">5</property>
 
                <property name="expand">True</property>
 
                <property name="fill">True</property>
 
                <property name="position">1</property>
 
              </packing>
 
            </child>
 
          </object>
 
          <packing>
 
            <property name="expand">False</property>
 
            <property name="fill">False</property>
 
            <property name="padding">5</property>
 
            <property name="position">2</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <object class="GtkTextView" id="textview1">
 
            <property name="visible">True</property>
 
            <property name="can_focus">True</property>
 
            <property name="editable">False</property>
 
            <property name="wrap_mode">word</property>
 
            <property name="buffer">help</property>
 
          </object>
 
          <packing>
 
            <property name="expand">False</property>
 
            <property name="fill">False</property>
 
            <property name="position">3</property>
 
          </packing>
 
          <placeholder/>
 
        </child>
 
      </object>
 
    </child>
 
  </object>
 
  <object class="GtkAccelGroup" id="accelgroup1"/>
 
  <object class="GtkAdjustment" id="adjustment1">
 
    <property name="upper">100</property>
 
    <property name="step_increment">1</property>
 
    <property name="page_increment">10</property>
 
  </object>
 
  <object class="GtkTextBuffer" id="help">
 
    <property name="text">Mousewheel zoom; C-p play/pause music at mouse
0 comments (0 inline, 0 general)