Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAneesh Dogra <lionaneesh@gmail.com>2012-12-17 21:02:52 (GMT)
committer Aneesh Dogra <lionaneesh@gmail.com>2012-12-17 21:02:52 (GMT)
commita2639c6558cc5af6bc49a9cbb65ddac1e265510b (patch)
treee4f427064b502bdf8b7806073b34b8389a70027e
parent78eccba3bebb2e6b13760e2de238189b8010482f (diff)
More fixes.
-rw-r--r--purk/widgets.py15
-rw-r--r--purk/windows.py6
2 files changed, 11 insertions, 10 deletions
diff --git a/purk/widgets.py b/purk/widgets.py
index e0630de..171c035 100644
--- a/purk/widgets.py
+++ b/purk/widgets.py
@@ -157,18 +157,19 @@ class Nicklist(Gtk.TreeView):
def insert(self, pos, realname, markedupname, sortkey):
self.get_model().insert(pos, (realname, markedupname, sortkey))
-
+
def replace(self, names):
self.set_model(Gtk.ListStore(str, str, str))
-
- self.insert_column_with_attributes(
- 0, '', Gtk.CellRendererText(), markup=1
- ).set_sizing(Gtk.TreeViewColumnSizing.FIXED)
+
+ column = Gtk.TreeViewColumn('', Gtk.CellRendererText(), text=1)
+ column.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)
+ column.set_min_width(80)
+ self.append_column(column)
for name in names:
self.append(*name)
- self.get_model().set_sort_column_id(2, Gtk.GTK_SORT_ASCENDING)
+ self.get_model().set_sort_column_id(2, Gtk.SortType.ASCENDING)
def remove(self, realname):
index = self.index(realname)
@@ -197,7 +198,7 @@ class Nicklist(Gtk.TreeView):
self.set_property("fixed-height-mode", True)
self.connect("button-press-event", self.click)
self.connect_after("button-release-event", lambda *a: True)
-
+
style_me(self, "nicklist")
# Label used to display/edit your current nick on a network
diff --git a/purk/windows.py b/purk/windows.py
index 11903dd..32ba876 100644
--- a/purk/windows.py
+++ b/purk/windows.py
@@ -160,13 +160,13 @@ class SimpleWindow(Window):
self.focus = self.input.grab_focus
self.connect("key-press-event", self.transfer_text)
- self.pack_end(self.input, expand=False)
+ self.pack_end(self.input, False, True, 0)
topbox = Gtk.ScrolledWindow()
topbox.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
topbox.add(self.output)
- self.pack_end(topbox)
+ self.pack_end(topbox, True, True, 0)
self.show_all()
@@ -222,7 +222,7 @@ class QueryWindow(Window):
topbox.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
topbox.add(self.output)
- self.pack_end(topbox)
+ self.pack_end(topbox, True, True, 0)
self.show_all()