Changeset 438:b7742450857a for src
- Timestamp:
- 02/23/13 09:06:22 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r433 r438 89 89 90 90 TREE_VIEW_COLUMN_FIXED = gtk.TREE_VIEW_COLUMN_FIXED 91 92 FILL = gtk.FILL 93 EXPAND = gtk.EXPAND 91 94 92 95 pixbuf_new_from_file = gdk.pixbuf_new_from_file … … 158 161 159 162 TREE_VIEW_COLUMN_FIXED = gtk.TreeViewColumnSizing.FIXED 163 164 FILL = gtk.AttachOptions.FILL 165 EXPAND = gtk.AttachOptions.EXPAND 160 166 161 167 pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file -
src/mlx/gui/delaycodes.py
r437 r438 202 202 ["Num", "Code", "Title", "Description"], 203 203 [ (CAPTION, "Others"), 204 (DELAYCODE, (" 6", "OA", "NO GATES/STAND AVAILABLE",204 (DELAYCODE, (" 6", "OA ", "NO GATES/STAND AVAILABLE", 205 205 "Due to own airline activity")), 206 206 (DELAYCODE, ("9", "SG", "SCHEDULED GROUND TIME", … … 217 217 ["MA", "IATA", "Description"], 218 218 [ (CAPTION, "Passenger and baggage"), 219 (DELAYCODE, (" 219 (DELAYCODE, (" 012", "01 ", 220 220 "Late shipping of parts and/or materials")), 221 (DELAYCODE, (" 221 (DELAYCODE, (" 111", "11", 222 222 "Check-in reopened for late passengers")), 223 (DELAYCODE, (" 223 (DELAYCODE, (" 121", "12", 224 224 "Check-in not completed by flight closure time")), 225 (DELAYCODE, (" 225 (DELAYCODE, (" 132", "13", 226 226 "Error with passenger or baggage details")) 227 227 ]) … … 237 237 self._delayCodeData = None 238 238 239 self._treeView = None240 241 239 self._treeView = gtk.TreeView(gtk.ListStore(str, str)) 242 240 self._treeView.set_rules_hint(True) … … 277 275 self._previousWidth = allocation.width 278 276 index = 0 277 lastIndex = len(self._alignments) - 1 279 278 for alignment in self._alignments: 280 279 column = self._treeView.get_column(index) 281 width = alignment.allocatedWidth + (8 if index==0 else 16) 280 width = alignment.allocatedWidth 281 width += 8 if (index==0 or index==lastIndex) else 16 282 282 column.set_fixed_width(width) 283 283 index += 1 … … 328 328 label.set_alignment(0.0, 0.5) 329 329 alignment.add(label) 330 self._table.attach(alignment, 1, numColumns, i, i+1) 330 self._table.attach(alignment, 1, numColumns, i, i+1, 331 yoptions = FILL) 331 332 self._table.set_row_spacing(i, 8) 332 333 elif type==DELAYCODE: … … 335 336 alignment = Alignment(xalign = 0.5, yalign = 0.5, xscale = 1.0) 336 337 alignment.add(checkButton) 337 self._table.attach(alignment, 0, 1, i, i+1) 338 self._table.attach(alignment, 0, 1, i, i+1, 339 xoptions = FILL, yoptions = FILL) 338 340 if firstDelayCodeRow: 339 341 self._alignments.append(alignment) 340 342 341 for j in range(0, len(elements)):343 for j in range(0, numColumns-1): 342 344 label = gtk.Label(elements[j]) 343 345 label.set_alignment(1.0 if j==0 else 0.0, 0.5) … … 345 347 xscale = 1.0) 346 348 alignment.add(label) 347 self._table.attach(alignment, j+1, j+2, i, i+1) 349 xoptions = FILL 350 if j==(numColumns-2): xoptions |= EXPAND 351 self._table.attach(alignment, j+1, j+2, i, i+1, 352 xoptions = xoptions, yoptions = FILL) 348 353 if firstDelayCodeRow: 349 354 self._alignments.append(alignment) -
src/mlx/gui/info.py
r437 r438 85 85 self._delayWindow = scrolledWindow = gtk.ScrolledWindow() 86 86 scrolledWindow.add(table) 87 scrolledWindow.set_size_request( 400, 150)87 scrolledWindow.set_size_request(600, 175) 88 88 scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) 89 89 scrolledWindow.set_shadow_type(SHADOW_IN)
Note:
See TracChangeset
for help on using the changeset viewer.