Changeset 2874


Ignore:
Timestamp:
Oct 5, 2008, 10:31:28 PM (15 years ago)
Author:
Sam Hocevar
Message:

ThePimp?: we can now save files.

Location:
libpipi/trunk
Files:
2 added
11 edited
1 copied

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/ThePimp/MainWindow.cs

    r2873 r2874  
    5151        Application.Quit ();
    5252    }
     53
     54    protected virtual void OnSaveAsActionActivated (object sender, System.EventArgs e)
     55    {
     56        ThePimp.SaveFile save = new ThePimp.SaveFile();
     57        ThePimp.PictureView view = notebook1.CurrentPageWidget as ThePimp.PictureView;
     58        save.Save(view.Picture);
     59        save.Destroy();
     60    }
    5361}
  • libpipi/trunk/ThePimp/Makefile.am

    r2872 r2874  
    88        $(srcdir)/OpenFile.cs \
    99        $(srcdir)/gtk-gui/ThePimp.OpenFile.cs \
     10        $(srcdir)/SaveFile.cs \
     11        $(srcdir)/gtk-gui/ThePimp.SaveFile.cs \
    1012        $(srcdir)/MainWindow.cs \
    1113        $(srcdir)/gtk-gui/MainWindow.cs
     
    2022        cp ../pipi-sharp/pipi-sharp.dll .
    2123        cp ../pipi-sharp/pipi-sharp.dll.config .
    22         gmcs $(pimp_sources) -out:$@ -lib:./ \
     24        cp ../pipi-sharp/pipi-sharp.dll.mdb .
     25        gmcs -debug $(pimp_sources) -out:$@ -lib:./ \
    2326          -pkg:gtk-sharp-2.0 -r:Mono.Posix -r:pipi-sharp.dll
    2427
    2528clean-local:
    26         rm -f pipi-sharp.dll pipi-sharp.dll.config
     29        rm -f pipi-sharp.dll.config
    2730        rm -f *.exe *.dll *.mdb
    2831
  • libpipi/trunk/ThePimp/PictureView.cs

    r2873 r2874  
    2222    {
    2323        private Pipi.Picture _p;
    24         private Pango.Layout _l;
    2524        private Adjustment _hadj = null, _vadj = null;
    2625
     
    120119    }
    121120
    122     public class PictureView : Gtk.ScrolledWindow
     121    public partial class PictureView : Gtk.ScrolledWindow
    123122    {
     123        public readonly Picture Picture;
     124
    124125        public PictureView(Picture p)
    125126        {
     127            Picture = p;
    126128            Add(new PictureArea(p));
    127129            ShowAll();
  • libpipi/trunk/ThePimp/ThePimp.mdp

    r2872 r2874  
    44      <CustomCommands>
    55        <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" workingdir="" />
     6        <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.mdb ${TargetDir}" />
    67      </CustomCommands>
    78      <Output directory="." assemblyKeyFile="." assembly="Pimp" />
     
    1314      <CustomCommands>
    1415        <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" />
     16        <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.mdb ${TargetDir}" />
    1517      </CustomCommands>
    1618      <Output directory="." assemblyKeyFile="." assembly="Pimp" />
     
    3436    <File name="ToolBox.cs" subtype="Code" buildaction="Compile" />
    3537    <File name="gtk-gui/ThePimp.ToolBox.cs" subtype="Code" buildaction="Compile" />
     38    <File name="gtk-gui/ThePimp.PictureView.cs" subtype="Code" buildaction="Compile" />
     39    <File name="SaveFile.cs" subtype="Code" buildaction="Compile" />
     40    <File name="gtk-gui/ThePimp.SaveFile.cs" subtype="Code" buildaction="Compile" />
    3641  </Contents>
    3742  <References>
  • libpipi/trunk/ThePimp/ToolBox.cs

    r2872 r2874  
    1 // ToolBox.cs created with MonoDevelop
    2 // User: sam at 12:31 05/10/2008
    31//
    4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers
     2//  The Pimp      The Pathetic Image Manipulation Program
     3//  Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org>
     4//                All Rights Reserved
     5//
     6//  $Id$
     7//
     8//  This library is free software. It comes without any warranty, to
     9//  the extent permitted by applicable law. You can redistribute it
     10//  and/or modify it under the terms of the Do What The Fuck You Want
     11//  To Public License, Version 2, as published by Sam Hocevar. See
     12//  http://sam.zoy.org/wtfpl/COPYING for more details.
    513//
    614
     
    917namespace ThePimp
    1018{
    11    
    12    
    1319    public partial class ToolBox : Gtk.Bin
    1420    {
    15        
    1621        public ToolBox()
    1722        {
  • libpipi/trunk/ThePimp/gtk-gui/MainWindow.cs

    r2872 r2874  
    6868   
    6969    private Gtk.Action helpAction;
     70   
     71    private Gtk.Action saveAsAction;
    7072   
    7173    private Gtk.VBox vbox1;
     
    130132        w2.Add(this.SaveAction, null);
    131133        this.SaveAsAction = new Gtk.Action("SaveAsAction", Mono.Unix.Catalog.GetString("Save _As"), null, "gtk-save-as");
    132         this.SaveAsAction.Sensitive = false;
    133134        this.SaveAsAction.ShortLabel = Mono.Unix.Catalog.GetString("Save _As");
    134135        w2.Add(this.SaveAsAction, null);
     
    189190        this.helpAction.Sensitive = false;
    190191        w2.Add(this.helpAction, null);
     192        this.saveAsAction = new Gtk.Action("saveAsAction", null, null, "gtk-save-as");
     193        w2.Add(this.saveAsAction, null);
    191194        w1.InsertActionGroup(w2, 0);
    192195        this.AddAccelGroup(w1.AccelGroup);
     
    208211        w3.Fill = false;
    209212        // Container child vbox1.Gtk.Box+BoxChild
    210         w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='newAction'/><toolitem action='openAction'/><toolitem action='saveAction'/><separator/><toolitem action='undoAction'/><toolitem action='redoAction'/><separator/><toolitem action='zoomInAction'/><toolitem action='zoomOutAction'/><toolitem action='zoomFitAction'/><toolitem action='zoom100Action'/><separator/><toolitem action='helpAction'/></toolbar></ui>");
     213        w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='newAction'/><toolitem action='openAction'/><toolitem action='saveAction'/><toolitem action='saveAsAction'/><separator/><toolitem action='undoAction'/><toolitem action='redoAction'/><separator/><toolitem action='zoomInAction'/><toolitem action='zoomOutAction'/><toolitem action='zoomFitAction'/><toolitem action='zoom100Action'/><separator/><toolitem action='helpAction'/></toolbar></ui>");
    211214        this.toolbar1 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1")));
    212215        this.toolbar1.Name = "toolbar1";
     
    293296        this.OpenAction.Activated += new System.EventHandler(this.OnOpenActionActivated);
    294297        this.QuitAction.Activated += new System.EventHandler(this.OnQuitActionActivated);
     298        this.saveAsAction.Activated += new System.EventHandler(this.OnSaveAsActionActivated);
    295299    }
    296300}
  • libpipi/trunk/ThePimp/gtk-gui/ThePimp.PictureView.cs

    r2873 r2874  
    1212   
    1313   
    14     public partial class ToolBox {
     14    public partial class PictureView {
    1515       
    1616        protected virtual void Build() {
    1717            Stetic.Gui.Initialize(this);
    18             // Widget ThePimp.ToolBox
     18            // Widget ThePimp.PictureView
    1919            Stetic.BinContainer.Attach(this);
    20             this.Name = "ThePimp.ToolBox";
     20            this.Name = "ThePimp.PictureView";
    2121            if ((this.Child != null)) {
    2222                this.Child.ShowAll();
  • libpipi/trunk/ThePimp/gtk-gui/ThePimp.ToolBox.cs

    r2872 r2874  
    1414    public partial class ToolBox {
    1515       
     16        private Gtk.Table table1;
     17       
     18        private Gtk.Button button10;
     19       
     20        private Gtk.Image image5;
     21       
     22        private Gtk.Button button11;
     23       
     24        private Gtk.Image image6;
     25       
     26        private Gtk.Button button12;
     27       
     28        private Gtk.Image image9;
     29       
     30        private Gtk.Button button13;
     31       
     32        private Gtk.Image image8;
     33       
     34        private Gtk.Button button5;
     35       
     36        private Gtk.Image image1;
     37       
     38        private Gtk.Button button6;
     39       
     40        private Gtk.Image image7;
     41       
     42        private Gtk.Button button7;
     43       
     44        private Gtk.Image image3;
     45       
     46        private Gtk.Button button8;
     47       
     48        private Gtk.Image image2;
     49       
     50        private Gtk.Button button9;
     51       
     52        private Gtk.Image image4;
     53       
    1654        protected virtual void Build() {
    1755            Stetic.Gui.Initialize(this);
     
    1957            Stetic.BinContainer.Attach(this);
    2058            this.Name = "ThePimp.ToolBox";
     59            // Container child ThePimp.ToolBox.Gtk.Container+ContainerChild
     60            this.table1 = new Gtk.Table(((uint)(3)), ((uint)(3)), false);
     61            this.table1.Name = "table1";
     62            this.table1.RowSpacing = ((uint)(6));
     63            this.table1.ColumnSpacing = ((uint)(6));
     64            // Container child table1.Gtk.Table+TableChild
     65            this.button10 = new Gtk.Button();
     66            this.button10.CanFocus = true;
     67            this.button10.Name = "button10";
     68            // Container child button10.Gtk.Container+ContainerChild
     69            this.image5 = new Gtk.Image();
     70            this.image5.Name = "image5";
     71            this.image5.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-rectangle", Gtk.IconSize.Menu, 16);
     72            this.button10.Add(this.image5);
     73            this.button10.Label = null;
     74            this.table1.Add(this.button10);
     75            Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.button10]));
     76            w2.TopAttach = ((uint)(1));
     77            w2.BottomAttach = ((uint)(2));
     78            w2.LeftAttach = ((uint)(1));
     79            w2.RightAttach = ((uint)(2));
     80            w2.XOptions = ((Gtk.AttachOptions)(4));
     81            w2.YOptions = ((Gtk.AttachOptions)(4));
     82            // Container child table1.Gtk.Table+TableChild
     83            this.button11 = new Gtk.Button();
     84            this.button11.CanFocus = true;
     85            this.button11.Name = "button11";
     86            // Container child button11.Gtk.Container+ContainerChild
     87            this.image6 = new Gtk.Image();
     88            this.image6.Name = "image6";
     89            this.image6.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-ellipse", Gtk.IconSize.Menu, 16);
     90            this.button11.Add(this.image6);
     91            this.button11.Label = null;
     92            this.table1.Add(this.button11);
     93            Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.button11]));
     94            w4.TopAttach = ((uint)(1));
     95            w4.BottomAttach = ((uint)(2));
     96            w4.LeftAttach = ((uint)(2));
     97            w4.RightAttach = ((uint)(3));
     98            w4.XOptions = ((Gtk.AttachOptions)(4));
     99            w4.YOptions = ((Gtk.AttachOptions)(4));
     100            // Container child table1.Gtk.Table+TableChild
     101            this.button12 = new Gtk.Button();
     102            this.button12.CanFocus = true;
     103            this.button12.Name = "button12";
     104            // Container child button12.Gtk.Container+ContainerChild
     105            this.image9 = new Gtk.Image();
     106            this.image9.Name = "image9";
     107            this.image9.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_3d-color-picker", Gtk.IconSize.Menu, 16);
     108            this.button12.Add(this.image9);
     109            this.button12.Label = null;
     110            this.table1.Add(this.button12);
     111            Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.button12]));
     112            w6.TopAttach = ((uint)(2));
     113            w6.BottomAttach = ((uint)(3));
     114            w6.LeftAttach = ((uint)(2));
     115            w6.RightAttach = ((uint)(3));
     116            w6.XOptions = ((Gtk.AttachOptions)(4));
     117            w6.YOptions = ((Gtk.AttachOptions)(4));
     118            // Container child table1.Gtk.Table+TableChild
     119            this.button13 = new Gtk.Button();
     120            this.button13.CanFocus = true;
     121            this.button13.Name = "button13";
     122            // Container child button13.Gtk.Container+ContainerChild
     123            this.image8 = new Gtk.Image();
     124            this.image8.Name = "image8";
     125            this.image8.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-text", Gtk.IconSize.Menu, 16);
     126            this.button13.Add(this.image8);
     127            this.button13.Label = null;
     128            this.table1.Add(this.button13);
     129            Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table1[this.button13]));
     130            w8.TopAttach = ((uint)(2));
     131            w8.BottomAttach = ((uint)(3));
     132            w8.LeftAttach = ((uint)(1));
     133            w8.RightAttach = ((uint)(2));
     134            w8.XOptions = ((Gtk.AttachOptions)(4));
     135            w8.YOptions = ((Gtk.AttachOptions)(4));
     136            // Container child table1.Gtk.Table+TableChild
     137            this.button5 = new Gtk.Button();
     138            this.button5.CanFocus = true;
     139            this.button5.Name = "button5";
     140            // Container child button5.Gtk.Container+ContainerChild
     141            this.image1 = new Gtk.Image();
     142            this.image1.Name = "image1";
     143            this.image1.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_show-draw-functions", Gtk.IconSize.Menu, 16);
     144            this.button5.Add(this.image1);
     145            this.button5.Label = null;
     146            this.table1.Add(this.button5);
     147            Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table1[this.button5]));
     148            w10.XOptions = ((Gtk.AttachOptions)(4));
     149            w10.YOptions = ((Gtk.AttachOptions)(4));
     150            // Container child table1.Gtk.Table+TableChild
     151            this.button6 = new Gtk.Button();
     152            this.button6.CanFocus = true;
     153            this.button6.Name = "button6";
     154            // Container child button6.Gtk.Container+ContainerChild
     155            this.image7 = new Gtk.Image();
     156            this.image7.Name = "image7";
     157            this.image7.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-polygon", Gtk.IconSize.Menu, 16);
     158            this.button6.Add(this.image7);
     159            this.button6.Label = null;
     160            this.table1.Add(this.button6);
     161            Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table1[this.button6]));
     162            w12.TopAttach = ((uint)(2));
     163            w12.BottomAttach = ((uint)(3));
     164            w12.XOptions = ((Gtk.AttachOptions)(4));
     165            w12.YOptions = ((Gtk.AttachOptions)(4));
     166            // Container child table1.Gtk.Table+TableChild
     167            this.button7 = new Gtk.Button();
     168            this.button7.CanFocus = true;
     169            this.button7.Name = "button7";
     170            // Container child button7.Gtk.Container+ContainerChild
     171            this.image3 = new Gtk.Image();
     172            this.image3.Name = "image3";
     173            this.image3.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.Menu, 16);
     174            this.button7.Add(this.image3);
     175            this.button7.Label = null;
     176            this.table1.Add(this.button7);
     177            Gtk.Table.TableChild w14 = ((Gtk.Table.TableChild)(this.table1[this.button7]));
     178            w14.LeftAttach = ((uint)(2));
     179            w14.RightAttach = ((uint)(3));
     180            w14.XOptions = ((Gtk.AttachOptions)(4));
     181            w14.YOptions = ((Gtk.AttachOptions)(4));
     182            // Container child table1.Gtk.Table+TableChild
     183            this.button8 = new Gtk.Button();
     184            this.button8.CanFocus = true;
     185            this.button8.Name = "button8";
     186            // Container child button8.Gtk.Container+ContainerChild
     187            this.image2 = new Gtk.Image();
     188            this.image2.Name = "image2";
     189            this.image2.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_insert-fields-author", Gtk.IconSize.Menu, 16);
     190            this.button8.Add(this.image2);
     191            this.button8.Label = null;
     192            this.table1.Add(this.button8);
     193            Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.table1[this.button8]));
     194            w16.LeftAttach = ((uint)(1));
     195            w16.RightAttach = ((uint)(2));
     196            w16.XOptions = ((Gtk.AttachOptions)(4));
     197            w16.YOptions = ((Gtk.AttachOptions)(4));
     198            // Container child table1.Gtk.Table+TableChild
     199            this.button9 = new Gtk.Button();
     200            this.button9.CanFocus = true;
     201            this.button9.Name = "button9";
     202            // Container child button9.Gtk.Container+ContainerChild
     203            this.image4 = new Gtk.Image();
     204            this.image4.Name = "image4";
     205            this.image4.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line", Gtk.IconSize.Menu, 16);
     206            this.button9.Add(this.image4);
     207            this.button9.Label = null;
     208            this.table1.Add(this.button9);
     209            Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table1[this.button9]));
     210            w18.TopAttach = ((uint)(1));
     211            w18.BottomAttach = ((uint)(2));
     212            w18.XOptions = ((Gtk.AttachOptions)(4));
     213            w18.YOptions = ((Gtk.AttachOptions)(4));
     214            this.Add(this.table1);
    21215            if ((this.Child != null)) {
    22216                this.Child.ShowAll();
  • libpipi/trunk/ThePimp/gtk-gui/gui.stetic

    r2872 r2874  
    7676        <property name="Type">Action</property>
    7777        <property name="Label" translatable="yes">Save _As</property>
    78         <property name="Sensitive">False</property>
    7978        <property name="ShortLabel" translatable="yes">Save _As</property>
    8079        <property name="StockId">gtk-save-as</property>
     
    184183        <property name="Sensitive">False</property>
    185184        <property name="StockId">gtk-help</property>
     185      </action>
     186      <action id="saveAsAction">
     187        <property name="Type">Action</property>
     188        <property name="Label" translatable="yes" />
     189        <property name="StockId">gtk-save-as</property>
     190        <signal name="Activated" handler="OnSaveAsActionActivated" />
    186191      </action>
    187192    </action-group>
     
    237242              <node type="Toolitem" action="openAction" />
    238243              <node type="Toolitem" action="saveAction" />
     244              <node type="Toolitem" action="saveAsAction" />
    239245              <node type="Separator" />
    240246              <node type="Toolitem" action="undoAction" />
     
    433439    <property name="MemberName" />
    434440    <child>
    435       <placeholder />
     441      <widget class="Gtk.Table" id="table1">
     442        <property name="MemberName" />
     443        <property name="NRows">3</property>
     444        <property name="NColumns">3</property>
     445        <property name="RowSpacing">6</property>
     446        <property name="ColumnSpacing">6</property>
     447        <child>
     448          <widget class="Gtk.Button" id="button10">
     449            <property name="MemberName" />
     450            <property name="CanFocus">True</property>
     451            <property name="Type">Custom</property>
     452            <child>
     453              <widget class="Gtk.Image" id="image5">
     454                <property name="MemberName" />
     455                <property name="Pixbuf">stock:stock_draw-rectangle Menu</property>
     456              </widget>
     457            </child>
     458          </widget>
     459          <packing>
     460            <property name="TopAttach">1</property>
     461            <property name="BottomAttach">2</property>
     462            <property name="LeftAttach">1</property>
     463            <property name="RightAttach">2</property>
     464            <property name="AutoSize">True</property>
     465            <property name="XOptions">Fill</property>
     466            <property name="YOptions">Fill</property>
     467            <property name="XExpand">False</property>
     468            <property name="XFill">True</property>
     469            <property name="XShrink">False</property>
     470            <property name="YExpand">False</property>
     471            <property name="YFill">True</property>
     472            <property name="YShrink">False</property>
     473          </packing>
     474        </child>
     475        <child>
     476          <widget class="Gtk.Button" id="button11">
     477            <property name="MemberName" />
     478            <property name="CanFocus">True</property>
     479            <property name="Type">Custom</property>
     480            <child>
     481              <widget class="Gtk.Image" id="image6">
     482                <property name="MemberName" />
     483                <property name="Pixbuf">stock:stock_draw-ellipse Menu</property>
     484              </widget>
     485            </child>
     486          </widget>
     487          <packing>
     488            <property name="TopAttach">1</property>
     489            <property name="BottomAttach">2</property>
     490            <property name="LeftAttach">2</property>
     491            <property name="RightAttach">3</property>
     492            <property name="AutoSize">True</property>
     493            <property name="XOptions">Fill</property>
     494            <property name="YOptions">Fill</property>
     495            <property name="XExpand">False</property>
     496            <property name="XFill">True</property>
     497            <property name="XShrink">False</property>
     498            <property name="YExpand">False</property>
     499            <property name="YFill">True</property>
     500            <property name="YShrink">False</property>
     501          </packing>
     502        </child>
     503        <child>
     504          <widget class="Gtk.Button" id="button12">
     505            <property name="MemberName" />
     506            <property name="CanFocus">True</property>
     507            <property name="Type">Custom</property>
     508            <child>
     509              <widget class="Gtk.Image" id="image9">
     510                <property name="MemberName" />
     511                <property name="Pixbuf">stock:stock_3d-color-picker Menu</property>
     512              </widget>
     513            </child>
     514          </widget>
     515          <packing>
     516            <property name="TopAttach">2</property>
     517            <property name="BottomAttach">3</property>
     518            <property name="LeftAttach">2</property>
     519            <property name="RightAttach">3</property>
     520            <property name="AutoSize">True</property>
     521            <property name="XOptions">Fill</property>
     522            <property name="YOptions">Fill</property>
     523            <property name="XExpand">False</property>
     524            <property name="XFill">True</property>
     525            <property name="XShrink">False</property>
     526            <property name="YExpand">False</property>
     527            <property name="YFill">True</property>
     528            <property name="YShrink">False</property>
     529          </packing>
     530        </child>
     531        <child>
     532          <widget class="Gtk.Button" id="button13">
     533            <property name="MemberName" />
     534            <property name="CanFocus">True</property>
     535            <property name="Type">Custom</property>
     536            <child>
     537              <widget class="Gtk.Image" id="image8">
     538                <property name="MemberName" />
     539                <property name="Pixbuf">stock:stock_draw-text Menu</property>
     540              </widget>
     541            </child>
     542          </widget>
     543          <packing>
     544            <property name="TopAttach">2</property>
     545            <property name="BottomAttach">3</property>
     546            <property name="LeftAttach">1</property>
     547            <property name="RightAttach">2</property>
     548            <property name="AutoSize">True</property>
     549            <property name="XOptions">Fill</property>
     550            <property name="YOptions">Fill</property>
     551            <property name="XExpand">False</property>
     552            <property name="XFill">True</property>
     553            <property name="XShrink">False</property>
     554            <property name="YExpand">False</property>
     555            <property name="YFill">True</property>
     556            <property name="YShrink">False</property>
     557          </packing>
     558        </child>
     559        <child>
     560          <widget class="Gtk.Button" id="button5">
     561            <property name="MemberName" />
     562            <property name="CanFocus">True</property>
     563            <property name="Type">Custom</property>
     564            <child>
     565              <widget class="Gtk.Image" id="image1">
     566                <property name="MemberName" />
     567                <property name="Pixbuf">stock:stock_show-draw-functions Menu</property>
     568              </widget>
     569            </child>
     570          </widget>
     571          <packing>
     572            <property name="AutoSize">True</property>
     573            <property name="XOptions">Fill</property>
     574            <property name="YOptions">Fill</property>
     575            <property name="XExpand">False</property>
     576            <property name="XFill">True</property>
     577            <property name="XShrink">False</property>
     578            <property name="YExpand">False</property>
     579            <property name="YFill">True</property>
     580            <property name="YShrink">False</property>
     581          </packing>
     582        </child>
     583        <child>
     584          <widget class="Gtk.Button" id="button6">
     585            <property name="MemberName" />
     586            <property name="CanFocus">True</property>
     587            <property name="Type">Custom</property>
     588            <child>
     589              <widget class="Gtk.Image" id="image7">
     590                <property name="MemberName" />
     591                <property name="Pixbuf">stock:stock_draw-polygon Menu</property>
     592              </widget>
     593            </child>
     594          </widget>
     595          <packing>
     596            <property name="TopAttach">2</property>
     597            <property name="BottomAttach">3</property>
     598            <property name="AutoSize">True</property>
     599            <property name="XOptions">Fill</property>
     600            <property name="YOptions">Fill</property>
     601            <property name="XExpand">False</property>
     602            <property name="XFill">True</property>
     603            <property name="XShrink">False</property>
     604            <property name="YExpand">False</property>
     605            <property name="YFill">True</property>
     606            <property name="YShrink">False</property>
     607          </packing>
     608        </child>
     609        <child>
     610          <widget class="Gtk.Button" id="button7">
     611            <property name="MemberName" />
     612            <property name="CanFocus">True</property>
     613            <property name="Type">Custom</property>
     614            <child>
     615              <widget class="Gtk.Image" id="image3">
     616                <property name="MemberName" />
     617                <property name="Pixbuf">stock:gtk-clear Menu</property>
     618              </widget>
     619            </child>
     620          </widget>
     621          <packing>
     622            <property name="LeftAttach">2</property>
     623            <property name="RightAttach">3</property>
     624            <property name="AutoSize">True</property>
     625            <property name="XOptions">Fill</property>
     626            <property name="YOptions">Fill</property>
     627            <property name="XExpand">False</property>
     628            <property name="XFill">True</property>
     629            <property name="XShrink">False</property>
     630            <property name="YExpand">False</property>
     631            <property name="YFill">True</property>
     632            <property name="YShrink">False</property>
     633          </packing>
     634        </child>
     635        <child>
     636          <widget class="Gtk.Button" id="button8">
     637            <property name="MemberName" />
     638            <property name="CanFocus">True</property>
     639            <property name="Type">Custom</property>
     640            <child>
     641              <widget class="Gtk.Image" id="image2">
     642                <property name="MemberName" />
     643                <property name="Pixbuf">stock:stock_insert-fields-author Menu</property>
     644              </widget>
     645            </child>
     646          </widget>
     647          <packing>
     648            <property name="LeftAttach">1</property>
     649            <property name="RightAttach">2</property>
     650            <property name="AutoSize">True</property>
     651            <property name="XOptions">Fill</property>
     652            <property name="YOptions">Fill</property>
     653            <property name="XExpand">False</property>
     654            <property name="XFill">True</property>
     655            <property name="XShrink">False</property>
     656            <property name="YExpand">False</property>
     657            <property name="YFill">True</property>
     658            <property name="YShrink">False</property>
     659          </packing>
     660        </child>
     661        <child>
     662          <widget class="Gtk.Button" id="button9">
     663            <property name="MemberName" />
     664            <property name="CanFocus">True</property>
     665            <property name="Type">Custom</property>
     666            <child>
     667              <widget class="Gtk.Image" id="image4">
     668                <property name="MemberName" />
     669                <property name="Pixbuf">stock:stock_draw-line Menu</property>
     670              </widget>
     671            </child>
     672          </widget>
     673          <packing>
     674            <property name="TopAttach">1</property>
     675            <property name="BottomAttach">2</property>
     676            <property name="AutoSize">True</property>
     677            <property name="XOptions">Fill</property>
     678            <property name="YOptions">Fill</property>
     679            <property name="XExpand">False</property>
     680            <property name="XFill">True</property>
     681            <property name="XShrink">False</property>
     682            <property name="YExpand">False</property>
     683            <property name="YFill">True</property>
     684            <property name="YShrink">False</property>
     685          </packing>
     686        </child>
     687      </widget>
    436688    </child>
    437689  </widget>
     
    442694    </child>
    443695  </widget>
     696  <widget class="Gtk.Dialog" id="ThePimp.SaveFile" design-size="400 300">
     697    <property name="MemberName" />
     698    <property name="WindowPosition">CenterOnParent</property>
     699    <property name="Buttons">2</property>
     700    <property name="HelpButton">False</property>
     701    <property name="HasSeparator">False</property>
     702    <child internal-child="VBox">
     703      <widget class="Gtk.VBox" id="dialog1_VBox">
     704        <property name="MemberName" />
     705        <property name="BorderWidth">2</property>
     706        <child>
     707          <widget class="Gtk.FileChooserWidget" id="filechooserwidget1">
     708            <property name="MemberName" />
     709          </widget>
     710          <packing>
     711            <property name="Position">0</property>
     712            <property name="AutoSize">True</property>
     713          </packing>
     714        </child>
     715      </widget>
     716    </child>
     717    <child internal-child="ActionArea">
     718      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
     719        <property name="MemberName" />
     720        <property name="Spacing">6</property>
     721        <property name="BorderWidth">5</property>
     722        <property name="Size">2</property>
     723        <property name="LayoutStyle">End</property>
     724        <child>
     725          <widget class="Gtk.Button" id="buttonCancel">
     726            <property name="MemberName" />
     727            <property name="CanDefault">True</property>
     728            <property name="CanFocus">True</property>
     729            <property name="UseStock">True</property>
     730            <property name="Type">StockItem</property>
     731            <property name="StockId">gtk-cancel</property>
     732            <property name="ResponseId">-6</property>
     733            <property name="label">gtk-cancel</property>
     734          </widget>
     735          <packing>
     736            <property name="Expand">False</property>
     737            <property name="Fill">False</property>
     738          </packing>
     739        </child>
     740        <child>
     741          <widget class="Gtk.Button" id="buttonOk">
     742            <property name="MemberName" />
     743            <property name="CanDefault">True</property>
     744            <property name="CanFocus">True</property>
     745            <property name="UseStock">True</property>
     746            <property name="Type">StockItem</property>
     747            <property name="StockId">gtk-ok</property>
     748            <property name="ResponseId">-5</property>
     749            <property name="label">gtk-ok</property>
     750          </widget>
     751          <packing>
     752            <property name="Position">1</property>
     753            <property name="Expand">False</property>
     754            <property name="Fill">False</property>
     755          </packing>
     756        </child>
     757      </widget>
     758    </child>
     759  </widget>
    444760</stetic-interface>
  • libpipi/trunk/pipi-sharp/Makefile.am

    r2869 r2874  
    2020
    2121pipi-sharp.dll: $(pipi_sources)
    22         gmcs -unsafe $(pipi_sources) -out:$@ -target:library
     22        gmcs -debug -unsafe $(pipi_sources) -out:$@ -target:library
    2323
    2424test.exe: $(test_sources) pipi-sharp.dll
    25         gmcs $(test_sources) -out:$@ -lib:./ \
     25        gmcs -debug $(test_sources) -out:$@ -lib:./ \
    2626          -r:./pipi-sharp.dll
    2727
  • libpipi/trunk/pipi-sharp/Picture.cs

    r2873 r2874  
    4444        [DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl),
    4545         SuppressUnmanagedCodeSecurity]
    46         private static extern IntPtr pipi_save(IntPtr p, string s);
    47         public void Save(string s)
     46        private static extern int pipi_save(IntPtr p, string s);
     47        public int Save(string s)
    4848        {
    49             _picture = pipi_save(_picture, s);
     49            return pipi_save(_picture, s);
    5050        }
    5151
  • libpipi/trunk/pipi-sharp/pipi-sharp.mdp

    r2869 r2874  
    55      <Build debugmode="True" target="Library" />
    66      <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
    7       <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     7      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
    88    </Configuration>
    99    <Configuration name="Release" ctype="DotNetProjectConfiguration">
     
    1111      <Build debugmode="False" target="Library" />
    1212      <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
    13       <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     13      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
    1414    </Configuration>
    1515  </Configurations>
Note: See TracChangeset for help on using the changeset viewer.