148 |
self.statusBar4 = gtk.Statusbar() |
self.statusBar4 = gtk.Statusbar() |
149 |
self.statusBar5 = gtk.Statusbar() |
self.statusBar5 = gtk.Statusbar() |
150 |
|
|
151 |
status_bar_table=gtk.Table(1,5) |
self.statusBar1.set_has_resize_grip(gtk.FALSE) |
152 |
status_bar_table.attach_defaults(self.statusBar1,0,1,0,1) |
self.statusBar2.set_has_resize_grip(gtk.FALSE) |
153 |
status_bar_table.attach_defaults(self.statusBar2,1,2,0,1) |
self.statusBar3.set_has_resize_grip(gtk.FALSE) |
154 |
status_bar_table.attach_defaults(self.statusBar3,2,3,0,1) |
self.statusBar4.set_has_resize_grip(gtk.FALSE) |
155 |
status_bar_table.attach_defaults(self.statusBar4,3,4,0,1) |
self.statusBar5.set_has_resize_grip(gtk.TRUE) |
156 |
status_bar_table.attach_defaults(self.statusBar5,4,5,0,1) |
|
157 |
|
status_bar_table=gtk.HBox(2) |
158 |
|
status_bar_table.set_homogeneous(gtk.FALSE) |
159 |
|
status_bar_table.pack_start(self.statusBar1,gtk.TRUE,gtk.TRUE,0) |
160 |
|
|
161 |
|
status_bar_table2=gtk.HBox(4) |
162 |
|
status_bar_table2.pack_start(self.statusBar2,gtk.TRUE,gtk.TRUE,0) |
163 |
|
status_bar_table2.pack_start(self.statusBar3,gtk.TRUE,gtk.TRUE,0) |
164 |
|
status_bar_table2.pack_start(self.statusBar4,gtk.TRUE,gtk.TRUE,0) |
165 |
|
status_bar_table2.pack_start(self.statusBar5,gtk.TRUE,gtk.TRUE,0) |
166 |
|
|
167 |
|
status_bar_table.pack_start(status_bar_table2,gtk.TRUE,gtk.TRUE,0) |
168 |
|
|
169 |
self.content_table.attach(status_bar_table, |
self.content_table.attach(status_bar_table, |
170 |
# X direction Y direction |
# X direction Y direction |
212 |
self.statusBar5.push(context_id,messg) |
self.statusBar5.push(context_id,messg) |
213 |
|
|
214 |
|
|
|
## # |
|
|
## # Adjust the status fields to reflect width of text in them |
|
|
## # |
|
|
## # This is a hack |
|
|
## # |
|
|
## tipWidth = -1 # Fill whatever remains |
|
|
## statusWidth,unused = self.statusBar.GetTextExtent(self.statusBar.GetStatusText(1)) |
|
|
## insertWidth,unused = self.statusBar.GetTextExtent(self.statusBar.GetStatusText(2)) |
|
|
## recordWidth,unused = self.statusBar.GetTextExtent(self.statusBar.GetStatusText(3)) |
|
|
## pageWidth,unused = self.statusBar.GetTextExtent(self.statusBar.GetStatusText(4)) |
|
|
|
|
|
## # Either double the width if it's set or default to 5 |
|
|
## statusWidth = statusWidth and (statusWidth * 2) or 5 |
|
|
## insertWidth = insertWidth and (insertWidth * 2) or 5 |
|
|
## recordWidth = recordWidth and (recordWidth * 2) or 5 |
|
|
## pageWidth = pageWidth and (pageWidth * 2) or 5 |
|
|
|
|
|
## self.statusBar.SetStatusWidths([tipWidth,statusWidth,insertWidth,recordWidth,pageWidth]) |
|
|
|
|
|
|
|
215 |
def show(self): |
def show(self): |
216 |
self.containerFrame.show() |
self.containerFrame.show() |
217 |
self.mainWindow.show_all() |
self.mainWindow.show_all() |