Ignore:
Timestamp:
Oct 25, 2008, 3:05:00 AM (15 years ago)
Author:
Sam Hocevar
Message:

ThePimp?: use spinbuttons instead of text areas for image dimensions.
ThePimp?: "Esc" now exits the about box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/ThePimp/gtk-gui/ThePimp.NewFile.cs

    r2948 r3098  
    2424        private Gtk.Table table1;
    2525       
    26         private Gtk.Entry entry1;
    27        
    28         private Gtk.Entry entry2;
    29        
    3026        private Gtk.Label label1;
    3127       
     
    3531       
    3632        private Gtk.Label label4;
     33       
     34        private Gtk.SpinButton spinbutton1;
     35       
     36        private Gtk.SpinButton spinbutton2;
    3737       
    3838        private Gtk.Label GtkLabel3;
     
    6060            this.Title = Mono.Unix.Catalog.GetString("New Image");
    6161            this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-new", Gtk.IconSize.Menu, 16);
     62            this.TypeHint = ((Gdk.WindowTypeHint)(1));
    6263            this.WindowPosition = ((Gtk.WindowPosition)(4));
     64            this.Modal = true;
    6365            this.HasSeparator = false;
    6466            // Internal child ThePimp.NewFile.VBox
     
    8991            this.table1.ColumnSpacing = ((uint)(6));
    9092            // Container child table1.Gtk.Table+TableChild
    91             this.entry1 = new Gtk.Entry();
    92             this.entry1.CanFocus = true;
    93             this.entry1.Name = "entry1";
    94             this.entry1.Text = Mono.Unix.Catalog.GetString("1024");
    95             this.entry1.IsEditable = true;
    96             this.entry1.WidthChars = 6;
    97             this.entry1.InvisibleChar = '●';
    98             this.entry1.Xalign = 1F;
    99             this.table1.Add(this.entry1);
    100             Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.entry1]));
    101             w2.LeftAttach = ((uint)(1));
    102             w2.RightAttach = ((uint)(2));
    103             w2.XOptions = ((Gtk.AttachOptions)(4));
    104             w2.YOptions = ((Gtk.AttachOptions)(4));
    105             // Container child table1.Gtk.Table+TableChild
    106             this.entry2 = new Gtk.Entry();
    107             this.entry2.CanFocus = true;
    108             this.entry2.Name = "entry2";
    109             this.entry2.Text = Mono.Unix.Catalog.GetString("768");
    110             this.entry2.IsEditable = true;
    111             this.entry2.WidthChars = 6;
    112             this.entry2.InvisibleChar = '●';
    113             this.entry2.Xalign = 1F;
    114             this.table1.Add(this.entry2);
    115             Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.entry2]));
    116             w3.TopAttach = ((uint)(1));
    117             w3.BottomAttach = ((uint)(2));
    118             w3.LeftAttach = ((uint)(1));
    119             w3.RightAttach = ((uint)(2));
    120             w3.XOptions = ((Gtk.AttachOptions)(4));
    121             w3.YOptions = ((Gtk.AttachOptions)(4));
    122             // Container child table1.Gtk.Table+TableChild
    12393            this.label1 = new Gtk.Label();
    12494            this.label1.Name = "label1";
    12595            this.label1.LabelProp = Mono.Unix.Catalog.GetString("px");
    12696            this.table1.Add(this.label1);
    127             Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
    128             w4.LeftAttach = ((uint)(2));
    129             w4.RightAttach = ((uint)(3));
    130             w4.XOptions = ((Gtk.AttachOptions)(4));
    131             w4.YOptions = ((Gtk.AttachOptions)(4));
     97            Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
     98            w2.LeftAttach = ((uint)(2));
     99            w2.RightAttach = ((uint)(3));
     100            w2.XOptions = ((Gtk.AttachOptions)(4));
     101            w2.YOptions = ((Gtk.AttachOptions)(4));
    132102            // Container child table1.Gtk.Table+TableChild
    133103            this.label2 = new Gtk.Label();
     
    135105            this.label2.LabelProp = Mono.Unix.Catalog.GetString("px");
    136106            this.table1.Add(this.label2);
    137             Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
    138             w5.TopAttach = ((uint)(1));
    139             w5.BottomAttach = ((uint)(2));
    140             w5.LeftAttach = ((uint)(2));
    141             w5.RightAttach = ((uint)(3));
    142             w5.XOptions = ((Gtk.AttachOptions)(4));
    143             w5.YOptions = ((Gtk.AttachOptions)(4));
     107            Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
     108            w3.TopAttach = ((uint)(1));
     109            w3.BottomAttach = ((uint)(2));
     110            w3.LeftAttach = ((uint)(2));
     111            w3.RightAttach = ((uint)(3));
     112            w3.XOptions = ((Gtk.AttachOptions)(4));
     113            w3.YOptions = ((Gtk.AttachOptions)(4));
    144114            // Container child table1.Gtk.Table+TableChild
    145115            this.label3 = new Gtk.Label();
     
    148118            this.label3.Justify = ((Gtk.Justification)(1));
    149119            this.table1.Add(this.label3);
    150             Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
    151             w6.XOptions = ((Gtk.AttachOptions)(0));
    152             w6.YOptions = ((Gtk.AttachOptions)(4));
     120            Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
     121            w4.XOptions = ((Gtk.AttachOptions)(0));
     122            w4.YOptions = ((Gtk.AttachOptions)(4));
    153123            // Container child table1.Gtk.Table+TableChild
    154124            this.label4 = new Gtk.Label();
     
    157127            this.label4.Justify = ((Gtk.Justification)(1));
    158128            this.table1.Add(this.label4);
    159             Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
     129            Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
     130            w5.TopAttach = ((uint)(1));
     131            w5.BottomAttach = ((uint)(2));
     132            w5.XOptions = ((Gtk.AttachOptions)(0));
     133            w5.YOptions = ((Gtk.AttachOptions)(4));
     134            // Container child table1.Gtk.Table+TableChild
     135            this.spinbutton1 = new Gtk.SpinButton(1, 1000000, 1);
     136            this.spinbutton1.CanFocus = true;
     137            this.spinbutton1.Name = "spinbutton1";
     138            this.spinbutton1.Adjustment.PageIncrement = 10;
     139            this.spinbutton1.ClimbRate = 1;
     140            this.spinbutton1.Numeric = true;
     141            this.spinbutton1.Value = 1600;
     142            this.table1.Add(this.spinbutton1);
     143            Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.spinbutton1]));
     144            w6.LeftAttach = ((uint)(1));
     145            w6.RightAttach = ((uint)(2));
     146            w6.XOptions = ((Gtk.AttachOptions)(4));
     147            w6.YOptions = ((Gtk.AttachOptions)(4));
     148            // Container child table1.Gtk.Table+TableChild
     149            this.spinbutton2 = new Gtk.SpinButton(1, 1000000, 1);
     150            this.spinbutton2.CanFocus = true;
     151            this.spinbutton2.Name = "spinbutton2";
     152            this.spinbutton2.Adjustment.PageIncrement = 10;
     153            this.spinbutton2.ClimbRate = 1;
     154            this.spinbutton2.Numeric = true;
     155            this.spinbutton2.Value = 1200;
     156            this.table1.Add(this.spinbutton2);
     157            Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.spinbutton2]));
    160158            w7.TopAttach = ((uint)(1));
    161159            w7.BottomAttach = ((uint)(2));
    162             w7.XOptions = ((Gtk.AttachOptions)(0));
     160            w7.LeftAttach = ((uint)(1));
     161            w7.RightAttach = ((uint)(2));
     162            w7.XOptions = ((Gtk.AttachOptions)(4));
    163163            w7.YOptions = ((Gtk.AttachOptions)(4));
    164164            this.vbox3.Add(this.table1);
     
    262262            }
    263263            this.DefaultWidth = 240;
    264             this.DefaultHeight = 202;
     264            this.DefaultHeight = 221;
    265265            this.Show();
    266266        }
Note: See TracChangeset for help on using the changeset viewer.