@@ -809,29 +809,22 @@ def draw_other_job_options (self, editable=True):
809809 self .tblJOOther .hide ()
810810 return
811811
812- self .tblJOOther .resize (n , 3 )
813812 children = self .tblJOOther .get_children ()
814813 for child in children :
815814 self .tblJOOther .remove (child )
816815 i = 0
817816 for opt in self .other_job_options :
818- self .tblJOOther .attach (opt .label , 0 , 1 , i , i + 1 ,
819- xoptions = Gtk .AttachOptions .FILL ,
820- yoptions = Gtk .AttachOptions .FILL )
817+ self .tblJOOther .attach (opt .label , 0 , i , 1 , 1 )
821818 opt .label .set_alignment (0.0 , 0.5 )
822- self .tblJOOther .attach (opt .selector , 1 , 2 , i , i + 1 ,
823- xoptions = Gtk .AttachOptions .FILL ,
824- yoptions = 0 )
819+ self .tblJOOther .attach (opt .selector , 1 , i , 1 , 1 )
825820 opt .selector .set_sensitive (editable )
826821
827822 btn = Gtk .Button .new_from_icon_name (Gtk .STOCK_REMOVE ,
828823 Gtk .IconSize .BUTTON )
829824 btn .connect ("clicked" , self .on_btnJOOtherRemove_clicked )
830825 btn .pyobject = opt
831826 btn .set_sensitive (editable )
832- self .tblJOOther .attach (btn , 2 , 3 , i , i + 1 ,
833- xoptions = 0 ,
834- yoptions = 0 )
827+ self .tblJOOther .attach (btn , 2 , i , 1 , 1 )
835828 i += 1
836829
837830 self .tblJOOther .show_all ()
@@ -1567,12 +1560,12 @@ def updateMarkerLevels (self):
15671560 rows = 1 + (cols - 1 ) / 4
15681561 if cols > 4 :
15691562 cols = 4
1570- table = Gtk .Table ( n_rows = round ( rows ),
1571- n_columns = cols ,
1572- homogeneous = True )
1573- table . set_col_spacings (6 )
1574- table . set_row_spacings (12 )
1575- self .vboxMarkerLevels .pack_start (table , False , False , 0 )
1563+ grid = Gtk .Grid ()
1564+ grid . set_column_homogeneous ( True )
1565+ grid . set_row_homogeneous ( True )
1566+ grid . set_column_spacing (6 )
1567+ grid . set_row_spacing (12 )
1568+ self .vboxMarkerLevels .pack_start (grid , False , False , 0 )
15761569 for color , name , marker_type , level in markers :
15771570 if name is None :
15781571 name = ''
@@ -1584,8 +1577,8 @@ def updateMarkerLevels (self):
15841577 row = num_markers / 4
15851578 col = num_markers % 4
15861579
1587- vbox = Gtk .VBox (spacing = 6 )
1588- subhbox = Gtk .HBox ()
1580+ vbox = Gtk .Box (spacing = 6 )
1581+ subhbox = Gtk .Box ()
15891582 inklevel = gtkinklevel .GtkInkLevel (color , level )
15901583 inklevel .set_tooltip_text ("%d%%" % level )
15911584 subhbox .pack_start (inklevel , True , False , 0 )
@@ -1594,7 +1587,7 @@ def updateMarkerLevels (self):
15941587 label .set_width_chars (10 )
15951588 label .set_line_wrap (True )
15961589 vbox .pack_start (label , False , False , 0 )
1597- table .attach (vbox , col , col + 1 , row , row + 1 )
1590+ grid .attach (vbox , col , row , 1 , 1 )
15981591 num_markers += 1
15991592
16001593 self .vboxMarkerLevels .show_all ()
@@ -1747,10 +1740,10 @@ def fillPrinterOptions(self, name, editable):
17471740 frame .add (container )
17481741 tab_label = self .lblPOptions
17491742
1750- table = Gtk .Table ( n_rows = 1 , n_columns = 3 , homogeneous = False )
1751- table . set_col_spacings (6 )
1752- table . set_row_spacings (6 )
1753- container .add (table )
1743+ grid = Gtk .Grid ( )
1744+ grid . set_column_spacing (6 )
1745+ grid . set_row_spacing (6 )
1746+ container .add (grid )
17541747
17551748 rows = 0
17561749
@@ -1765,19 +1758,18 @@ def fillPrinterOptions(self, name, editable):
17651758 if option .keyword == "PageRegion" :
17661759 continue
17671760 rows += 1
1768- table .resize (rows , 3 )
17691761 o = OptionWidget (option , ppd , self , tab_label = tab_label )
1770- table .attach (o .conflictIcon , 0 , 1 , nr , nr + 1 , 0 , 0 , 0 , 0 )
1762+ grid .attach (o .conflictIcon , 0 , nr , 1 , 1 )
17711763
1772- hbox = Gtk .HBox ()
1764+ hbox = Gtk .Box ()
17731765 if o .label :
17741766 a = Gtk .Alignment .new (0.5 , 0.5 , 1.0 , 1.0 )
17751767 a .set_padding (0 , 0 , 0 , 6 )
17761768 a .add (o .label )
1777- table .attach (a , 1 , 2 , nr , nr + 1 , Gtk . AttachOptions . FILL , 0 , 0 , 0 )
1778- table .attach (hbox , 2 , 3 , nr , nr + 1 , Gtk . AttachOptions . FILL , 0 , 0 , 0 )
1769+ grid .attach (a , 1 , nr , 1 , 1 )
1770+ grid .attach (hbox , 2 , nr , 1 , 1 )
17791771 else :
1780- table .attach (hbox , 1 , 3 , nr , nr + 1 , Gtk . AttachOptions . FILL , 0 , 0 , 0 )
1772+ grid .attach (hbox , 1 , nr , 2 , 1 )
17811773 hbox .pack_start (o .selector , False , False , 0 )
17821774 self .options [option .keyword ] = o
17831775 o .selector .set_sensitive (editable )
0 commit comments