Commits

Lucian Brănescu-Mihăilă  committed a3edb3e

Start putting data in TreeViews.

  • Participants
  • Parent commits 3d7ee4b

Comments (0)

Files changed (2)

 #!/usr/bin/env python
 
-from twisted.internet import reactor
+from twisted.internet import gtk3reactor
+gtk3reactor.install()
 
 from gi.repository import Gtk, Gio
 
         self.connect("activate", self._activate_cb)
 
         self.builder = Gtk.Builder()
-        self.builder.add_from_file('irk.glade')
+        self.builder.add_from_file('irk.ui')
         window = self.builder.get_object('Main window')
         window.show_all()
         self.add_window(window)
 
+        summary = self.builder.get_object('Summary')
+        store = Gtk.ListStore(str)
+        summary.set_model(store)
+
+        summary.append_column(
+            Gtk.TreeViewColumn("Message", Gtk.CellRendererText(), text=0))
+
+        store.append(['Hello'])
+
     def _activate_cb(self, widget):
         pass
 
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
+                  <object class="GtkTreeView" id="Channel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection4"/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkEntry" id="Input box">
               <object class="GtkTreeView" id="Summary">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="headers_visible">False</property>
                 <child internal-child="selection">
                   <object class="GtkTreeSelection" id="treeview-selection3"/>
                 </child>
               <object class="GtkTreeView" id="Users list">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="headers_visible">False</property>
                 <child internal-child="selection">
                   <object class="GtkTreeSelection" id="treeview-selection1"/>
                 </child>
               <object class="GtkTreeView" id="Channels list">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="headers_visible">False</property>
                 <child internal-child="selection">
                   <object class="GtkTreeSelection" id="treeview-selection2"/>
                 </child>