Changeset 3098


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

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

Location:
libpipi/trunk/ThePimp
Files:
5 edited

Legend:

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

    r2885 r3098  
    3333            this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-about", Gtk.IconSize.Menu, 16);
    3434            this.TypeHint = ((Gdk.WindowTypeHint)(1));
    35             this.WindowPosition = ((Gtk.WindowPosition)(4));
     35            this.WindowPosition = ((Gtk.WindowPosition)(3));
    3636            this.Modal = true;
    3737            this.DefaultWidth = 450;
    3838            this.DefaultHeight = 300;
     39            this.Gravity = ((Gdk.Gravity)(5));
    3940            // Container child ThePimp.AboutWindow.Gtk.Container+ContainerChild
    4041            this.vbox2 = new Gtk.VBox();
  • 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        }
  • libpipi/trunk/ThePimp/gtk-gui/gui.stetic

    r2950 r3098  
    678678    <property name="Icon">stock:gtk-about Menu</property>
    679679    <property name="TypeHint">Dialog</property>
    680     <property name="WindowPosition">CenterOnParent</property>
     680    <property name="WindowPosition">CenterAlways</property>
    681681    <property name="Modal">True</property>
    682682    <property name="DefaultWidth">450</property>
    683683    <property name="DefaultHeight">300</property>
     684    <property name="Gravity">Center</property>
    684685    <child>
    685686      <widget class="Gtk.VBox" id="vbox2">
     
    762763    </child>
    763764  </widget>
    764   <widget class="Gtk.Dialog" id="ThePimp.NewFile" design-size="240 202">
     765  <widget class="Gtk.Dialog" id="ThePimp.NewFile" design-size="240 221">
    765766    <property name="MemberName" />
    766767    <property name="Title" translatable="yes">New Image</property>
    767768    <property name="Icon">stock:gtk-new Menu</property>
     769    <property name="TypeHint">Dialog</property>
    768770    <property name="WindowPosition">CenterOnParent</property>
     771    <property name="Modal">True</property>
    769772    <property name="Buttons">2</property>
    770773    <property name="HelpButton">False</property>
     
    800803                            <property name="RowSpacing">6</property>
    801804                            <property name="ColumnSpacing">6</property>
    802                             <child>
    803                               <widget class="Gtk.Entry" id="entry1">
    804                                 <property name="MemberName" />
    805                                 <property name="CanFocus">True</property>
    806                                 <property name="Text" translatable="yes">1024</property>
    807                                 <property name="IsEditable">True</property>
    808                                 <property name="WidthChars">6</property>
    809                                 <property name="InvisibleChar">●</property>
    810                                 <property name="Xalign">1</property>
    811                               </widget>
    812                               <packing>
    813                                 <property name="LeftAttach">1</property>
    814                                 <property name="RightAttach">2</property>
    815                                 <property name="AutoSize">False</property>
    816                                 <property name="XOptions">Fill</property>
    817                                 <property name="YOptions">Fill</property>
    818                                 <property name="XExpand">False</property>
    819                                 <property name="XFill">True</property>
    820                                 <property name="XShrink">False</property>
    821                                 <property name="YExpand">False</property>
    822                                 <property name="YFill">True</property>
    823                                 <property name="YShrink">False</property>
    824                               </packing>
    825                             </child>
    826                             <child>
    827                               <widget class="Gtk.Entry" id="entry2">
    828                                 <property name="MemberName" />
    829                                 <property name="CanFocus">True</property>
    830                                 <property name="Text" translatable="yes">768</property>
    831                                 <property name="IsEditable">True</property>
    832                                 <property name="WidthChars">6</property>
    833                                 <property name="InvisibleChar">●</property>
    834                                 <property name="Xalign">1</property>
    835                               </widget>
    836                               <packing>
    837                                 <property name="TopAttach">1</property>
    838                                 <property name="BottomAttach">2</property>
    839                                 <property name="LeftAttach">1</property>
    840                                 <property name="RightAttach">2</property>
    841                                 <property name="AutoSize">False</property>
    842                                 <property name="XOptions">Fill</property>
    843                                 <property name="YOptions">Fill</property>
    844                                 <property name="XExpand">False</property>
    845                                 <property name="XFill">True</property>
    846                                 <property name="XShrink">False</property>
    847                                 <property name="YExpand">False</property>
    848                                 <property name="YFill">True</property>
    849                                 <property name="YShrink">False</property>
    850                               </packing>
    851                             </child>
    852805                            <child>
    853806                              <widget class="Gtk.Label" id="label1">
     
    928881                              </packing>
    929882                            </child>
     883                            <child>
     884                              <widget class="Gtk.SpinButton" id="spinbutton1">
     885                                <property name="MemberName" />
     886                                <property name="CanFocus">True</property>
     887                                <property name="Lower">1</property>
     888                                <property name="Upper">1000000</property>
     889                                <property name="PageIncrement">10</property>
     890                                <property name="StepIncrement">1</property>
     891                                <property name="ClimbRate">1</property>
     892                                <property name="Numeric">True</property>
     893                                <property name="Value">1600</property>
     894                              </widget>
     895                              <packing>
     896                                <property name="LeftAttach">1</property>
     897                                <property name="RightAttach">2</property>
     898                                <property name="AutoSize">True</property>
     899                                <property name="XOptions">Fill</property>
     900                                <property name="YOptions">Fill</property>
     901                                <property name="XExpand">False</property>
     902                                <property name="XFill">True</property>
     903                                <property name="XShrink">False</property>
     904                                <property name="YExpand">False</property>
     905                                <property name="YFill">True</property>
     906                                <property name="YShrink">False</property>
     907                              </packing>
     908                            </child>
     909                            <child>
     910                              <widget class="Gtk.SpinButton" id="spinbutton2">
     911                                <property name="MemberName" />
     912                                <property name="CanFocus">True</property>
     913                                <property name="Lower">1</property>
     914                                <property name="Upper">1000000</property>
     915                                <property name="PageIncrement">10</property>
     916                                <property name="StepIncrement">1</property>
     917                                <property name="ClimbRate">1</property>
     918                                <property name="Numeric">True</property>
     919                                <property name="Value">1200</property>
     920                              </widget>
     921                              <packing>
     922                                <property name="TopAttach">1</property>
     923                                <property name="BottomAttach">2</property>
     924                                <property name="LeftAttach">1</property>
     925                                <property name="RightAttach">2</property>
     926                                <property name="AutoSize">True</property>
     927                                <property name="XOptions">Fill</property>
     928                                <property name="YOptions">Fill</property>
     929                                <property name="XExpand">False</property>
     930                                <property name="XFill">True</property>
     931                                <property name="XShrink">False</property>
     932                                <property name="YExpand">False</property>
     933                                <property name="YFill">True</property>
     934                                <property name="YShrink">False</property>
     935                              </packing>
     936                            </child>
    930937                          </widget>
    931938                          <packing>
  • libpipi/trunk/ThePimp/src/AboutWindow.cs

    r3039 r3098  
    1717namespace ThePimp
    1818{
     19    [Gtk.Binding(Gdk.Key.Escape, "Destroy")]
    1920    public partial class AboutWindow : Gtk.Window
    2021    {
  • libpipi/trunk/ThePimp/src/NewFile.cs

    r3039 r3098  
    4343            }
    4444
    45             return type + ":" + entry1.Text + "x" + entry2.Text;
     45            return type + ":" + spinbutton1.Text + "x" + spinbutton2.Text;
    4646        }
    4747    }
Note: See TracChangeset for help on using the changeset viewer.