Kaynağa Gözat

ThePimp: use spinbuttons instead of text areas for image dimensions.

ThePimp: "Esc" now exits the about box.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3098 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 yıl önce
ebeveyn
işleme
bccac80ad6
6 değiştirilmiş dosya ile 114 ekleme ve 105 silme
  1. +1
    -1
      ThePimp/ThePimp.mdp
  2. +2
    -1
      ThePimp/gtk-gui/ThePimp.AboutWindow.cs
  3. +54
    -54
      ThePimp/gtk-gui/ThePimp.NewFile.cs
  4. +55
    -48
      ThePimp/gtk-gui/gui.stetic
  5. +1
    -0
      ThePimp/src/AboutWindow.cs
  6. +1
    -1
      ThePimp/src/NewFile.cs

+ 1
- 1
ThePimp/ThePimp.mdp Dosyayı Görüntüle

@@ -66,4 +66,4 @@
<Widget>ThePimp.ToolBox</Widget>
</ExportedWidgets>
</GtkDesignInfo>
</Project>
</Project>

+ 2
- 1
ThePimp/gtk-gui/ThePimp.AboutWindow.cs Dosyayı Görüntüle

@@ -32,10 +32,11 @@ namespace ThePimp {
this.Title = Mono.Unix.Catalog.GetString("About The Pimp");
this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-about", Gtk.IconSize.Menu, 16);
this.TypeHint = ((Gdk.WindowTypeHint)(1));
this.WindowPosition = ((Gtk.WindowPosition)(4));
this.WindowPosition = ((Gtk.WindowPosition)(3));
this.Modal = true;
this.DefaultWidth = 450;
this.DefaultHeight = 300;
this.Gravity = ((Gdk.Gravity)(5));
// Container child ThePimp.AboutWindow.Gtk.Container+ContainerChild
this.vbox2 = new Gtk.VBox();
this.vbox2.Name = "vbox2";


+ 54
- 54
ThePimp/gtk-gui/ThePimp.NewFile.cs Dosyayı Görüntüle

@@ -23,10 +23,6 @@ namespace ThePimp {
private Gtk.Table table1;
private Gtk.Entry entry1;
private Gtk.Entry entry2;
private Gtk.Label label1;
private Gtk.Label label2;
@@ -35,6 +31,10 @@ namespace ThePimp {
private Gtk.Label label4;
private Gtk.SpinButton spinbutton1;
private Gtk.SpinButton spinbutton2;
private Gtk.Label GtkLabel3;
private Gtk.Frame frame2;
@@ -59,7 +59,9 @@ namespace ThePimp {
this.Name = "ThePimp.NewFile";
this.Title = Mono.Unix.Catalog.GetString("New Image");
this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-new", Gtk.IconSize.Menu, 16);
this.TypeHint = ((Gdk.WindowTypeHint)(1));
this.WindowPosition = ((Gtk.WindowPosition)(4));
this.Modal = true;
this.HasSeparator = false;
// Internal child ThePimp.NewFile.VBox
Gtk.VBox w1 = this.VBox;
@@ -88,78 +90,76 @@ namespace ThePimp {
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
// Container child table1.Gtk.Table+TableChild
this.entry1 = new Gtk.Entry();
this.entry1.CanFocus = true;
this.entry1.Name = "entry1";
this.entry1.Text = Mono.Unix.Catalog.GetString("1024");
this.entry1.IsEditable = true;
this.entry1.WidthChars = 6;
this.entry1.InvisibleChar = '●';
this.entry1.Xalign = 1F;
this.table1.Add(this.entry1);
Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.entry1]));
w2.LeftAttach = ((uint)(1));
w2.RightAttach = ((uint)(2));
w2.XOptions = ((Gtk.AttachOptions)(4));
w2.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.entry2 = new Gtk.Entry();
this.entry2.CanFocus = true;
this.entry2.Name = "entry2";
this.entry2.Text = Mono.Unix.Catalog.GetString("768");
this.entry2.IsEditable = true;
this.entry2.WidthChars = 6;
this.entry2.InvisibleChar = '●';
this.entry2.Xalign = 1F;
this.table1.Add(this.entry2);
Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.entry2]));
w3.TopAttach = ((uint)(1));
w3.BottomAttach = ((uint)(2));
w3.LeftAttach = ((uint)(1));
w3.RightAttach = ((uint)(2));
w3.XOptions = ((Gtk.AttachOptions)(4));
w3.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label1 = new Gtk.Label();
this.label1.Name = "label1";
this.label1.LabelProp = Mono.Unix.Catalog.GetString("px");
this.table1.Add(this.label1);
Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
w4.LeftAttach = ((uint)(2));
w4.RightAttach = ((uint)(3));
w4.XOptions = ((Gtk.AttachOptions)(4));
w4.YOptions = ((Gtk.AttachOptions)(4));
Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
w2.LeftAttach = ((uint)(2));
w2.RightAttach = ((uint)(3));
w2.XOptions = ((Gtk.AttachOptions)(4));
w2.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label2 = new Gtk.Label();
this.label2.Name = "label2";
this.label2.LabelProp = Mono.Unix.Catalog.GetString("px");
this.table1.Add(this.label2);
Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
w5.TopAttach = ((uint)(1));
w5.BottomAttach = ((uint)(2));
w5.LeftAttach = ((uint)(2));
w5.RightAttach = ((uint)(3));
w5.XOptions = ((Gtk.AttachOptions)(4));
w5.YOptions = ((Gtk.AttachOptions)(4));
Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
w3.TopAttach = ((uint)(1));
w3.BottomAttach = ((uint)(2));
w3.LeftAttach = ((uint)(2));
w3.RightAttach = ((uint)(3));
w3.XOptions = ((Gtk.AttachOptions)(4));
w3.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label3 = new Gtk.Label();
this.label3.Name = "label3";
this.label3.LabelProp = Mono.Unix.Catalog.GetString("Width");
this.label3.Justify = ((Gtk.Justification)(1));
this.table1.Add(this.label3);
Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
w6.XOptions = ((Gtk.AttachOptions)(0));
w6.YOptions = ((Gtk.AttachOptions)(4));
Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
w4.XOptions = ((Gtk.AttachOptions)(0));
w4.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label4 = new Gtk.Label();
this.label4.Name = "label4";
this.label4.LabelProp = Mono.Unix.Catalog.GetString("Height");
this.label4.Justify = ((Gtk.Justification)(1));
this.table1.Add(this.label4);
Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
w5.TopAttach = ((uint)(1));
w5.BottomAttach = ((uint)(2));
w5.XOptions = ((Gtk.AttachOptions)(0));
w5.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.spinbutton1 = new Gtk.SpinButton(1, 1000000, 1);
this.spinbutton1.CanFocus = true;
this.spinbutton1.Name = "spinbutton1";
this.spinbutton1.Adjustment.PageIncrement = 10;
this.spinbutton1.ClimbRate = 1;
this.spinbutton1.Numeric = true;
this.spinbutton1.Value = 1600;
this.table1.Add(this.spinbutton1);
Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.spinbutton1]));
w6.LeftAttach = ((uint)(1));
w6.RightAttach = ((uint)(2));
w6.XOptions = ((Gtk.AttachOptions)(4));
w6.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.spinbutton2 = new Gtk.SpinButton(1, 1000000, 1);
this.spinbutton2.CanFocus = true;
this.spinbutton2.Name = "spinbutton2";
this.spinbutton2.Adjustment.PageIncrement = 10;
this.spinbutton2.ClimbRate = 1;
this.spinbutton2.Numeric = true;
this.spinbutton2.Value = 1200;
this.table1.Add(this.spinbutton2);
Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.spinbutton2]));
w7.TopAttach = ((uint)(1));
w7.BottomAttach = ((uint)(2));
w7.XOptions = ((Gtk.AttachOptions)(0));
w7.LeftAttach = ((uint)(1));
w7.RightAttach = ((uint)(2));
w7.XOptions = ((Gtk.AttachOptions)(4));
w7.YOptions = ((Gtk.AttachOptions)(4));
this.vbox3.Add(this.table1);
Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox3[this.table1]));
@@ -261,7 +261,7 @@ namespace ThePimp {
this.Child.ShowAll();
}
this.DefaultWidth = 240;
this.DefaultHeight = 202;
this.DefaultHeight = 221;
this.Show();
}
}


+ 55
- 48
ThePimp/gtk-gui/gui.stetic Dosyayı Görüntüle

@@ -677,10 +677,11 @@
<property name="Title" translatable="yes">About The Pimp</property>
<property name="Icon">stock:gtk-about Menu</property>
<property name="TypeHint">Dialog</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="WindowPosition">CenterAlways</property>
<property name="Modal">True</property>
<property name="DefaultWidth">450</property>
<property name="DefaultHeight">300</property>
<property name="Gravity">Center</property>
<child>
<widget class="Gtk.VBox" id="vbox2">
<property name="MemberName" />
@@ -761,11 +762,13 @@
</widget>
</child>
</widget>
<widget class="Gtk.Dialog" id="ThePimp.NewFile" design-size="240 202">
<widget class="Gtk.Dialog" id="ThePimp.NewFile" design-size="240 221">
<property name="MemberName" />
<property name="Title" translatable="yes">New Image</property>
<property name="Icon">stock:gtk-new Menu</property>
<property name="TypeHint">Dialog</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="Modal">True</property>
<property name="Buttons">2</property>
<property name="HelpButton">False</property>
<property name="HasSeparator">False</property>
@@ -800,19 +803,14 @@
<property name="RowSpacing">6</property>
<property name="ColumnSpacing">6</property>
<child>
<widget class="Gtk.Entry" id="entry1">
<widget class="Gtk.Label" id="label1">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Text" translatable="yes">1024</property>
<property name="IsEditable">True</property>
<property name="WidthChars">6</property>
<property name="InvisibleChar">●</property>
<property name="Xalign">1</property>
<property name="LabelProp" translatable="yes">px</property>
</widget>
<packing>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">False</property>
<property name="LeftAttach">2</property>
<property name="RightAttach">3</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
<property name="XExpand">False</property>
@@ -824,21 +822,16 @@
</packing>
</child>
<child>
<widget class="Gtk.Entry" id="entry2">
<widget class="Gtk.Label" id="label2">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Text" translatable="yes">768</property>
<property name="IsEditable">True</property>
<property name="WidthChars">6</property>
<property name="InvisibleChar">●</property>
<property name="Xalign">1</property>
<property name="LabelProp" translatable="yes">px</property>
</widget>
<packing>
<property name="TopAttach">1</property>
<property name="BottomAttach">2</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">False</property>
<property name="LeftAttach">2</property>
<property name="RightAttach">3</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
<property name="XExpand">False</property>
@@ -850,18 +843,17 @@
</packing>
</child>
<child>
<widget class="Gtk.Label" id="label1">
<widget class="Gtk.Label" id="label3">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">px</property>
<property name="LabelProp" translatable="yes">Width</property>
<property name="Justify">Right</property>
</widget>
<packing>
<property name="LeftAttach">2</property>
<property name="RightAttach">3</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="AutoSize">False</property>
<property name="XOptions">0</property>
<property name="YOptions">Fill</property>
<property name="XExpand">False</property>
<property name="XFill">True</property>
<property name="XFill">False</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
<property name="YFill">True</property>
@@ -869,20 +861,19 @@
</packing>
</child>
<child>
<widget class="Gtk.Label" id="label2">
<widget class="Gtk.Label" id="label4">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">px</property>
<property name="LabelProp" translatable="yes">Height</property>
<property name="Justify">Right</property>
</widget>
<packing>
<property name="TopAttach">1</property>
<property name="BottomAttach">2</property>
<property name="LeftAttach">2</property>
<property name="RightAttach">3</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="AutoSize">False</property>
<property name="XOptions">0</property>
<property name="YOptions">Fill</property>
<property name="XExpand">False</property>
<property name="XFill">True</property>
<property name="XFill">False</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
<property name="YFill">True</property>
@@ -890,17 +881,25 @@
</packing>
</child>
<child>
<widget class="Gtk.Label" id="label3">
<widget class="Gtk.SpinButton" id="spinbutton1">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">Width</property>
<property name="Justify">Right</property>
<property name="CanFocus">True</property>
<property name="Lower">1</property>
<property name="Upper">1000000</property>
<property name="PageIncrement">10</property>
<property name="StepIncrement">1</property>
<property name="ClimbRate">1</property>
<property name="Numeric">True</property>
<property name="Value">1600</property>
</widget>
<packing>
<property name="AutoSize">False</property>
<property name="XOptions">0</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
<property name="XExpand">False</property>
<property name="XFill">False</property>
<property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
<property name="YFill">True</property>
@@ -908,19 +907,27 @@
</packing>
</child>
<child>
<widget class="Gtk.Label" id="label4">
<widget class="Gtk.SpinButton" id="spinbutton2">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">Height</property>
<property name="Justify">Right</property>
<property name="CanFocus">True</property>
<property name="Lower">1</property>
<property name="Upper">1000000</property>
<property name="PageIncrement">10</property>
<property name="StepIncrement">1</property>
<property name="ClimbRate">1</property>
<property name="Numeric">True</property>
<property name="Value">1200</property>
</widget>
<packing>
<property name="TopAttach">1</property>
<property name="BottomAttach">2</property>
<property name="AutoSize">False</property>
<property name="XOptions">0</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
<property name="XExpand">False</property>
<property name="XFill">False</property>
<property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
<property name="YFill">True</property>


+ 1
- 0
ThePimp/src/AboutWindow.cs Dosyayı Görüntüle

@@ -16,6 +16,7 @@ using System;

namespace ThePimp
{
[Gtk.Binding(Gdk.Key.Escape, "Destroy")]
public partial class AboutWindow : Gtk.Window
{
public AboutWindow() : base(Gtk.WindowType.Toplevel)


+ 1
- 1
ThePimp/src/NewFile.cs Dosyayı Görüntüle

@@ -42,7 +42,7 @@ namespace ThePimp
break;
}

return type + ":" + entry1.Text + "x" + entry2.Text;
return type + ":" + spinbutton1.Text + "x" + spinbutton2.Text;
}
}
}

Yükleniyor…
İptal
Kaydet