Changeset 2869 for libpipi


Ignore:
Timestamp:
Oct 5, 2008, 3:43:07 AM (12 years ago)
Author:
Sam Hocevar
Message:

Reorganise ThePimp? and pipi-sharp, adding a test program and allowing to
build using the autotools.

Location:
libpipi/trunk
Files:
17 added
13 deleted
3 edited
12 moved

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/.gitignore

    r2694 r2869  
    2424*.lo
    2525*.o
     26*.userprefs
     27*.usertasks
  • libpipi/trunk/Makefile.am

    r2856 r2869  
    11# $Id$
    22
    3 SUBDIRS = pipi src genethumb examples test
     3SUBDIRS = pipi src genethumb examples test pipi-sharp ThePimp
    44
    55EXTRA_DIST = bootstrap build-win32 common.h NOTES
  • libpipi/trunk/ThePimp/Main.cs

    r2866 r2869  
    77using Gtk;
    88
    9 namespace Pimp
     9namespace ThePimp
    1010{
    11     class Pimp
     11    class ThePimp
    1212    {
    1313        public static void Main (string[] args)
  • libpipi/trunk/ThePimp/MainWindow.cs

    r2866 r2869  
    77using Gtk;
    88using Pipi;
     9using ThePimp;
    910
    1011public partial class MainWindow: Gtk.Window
     
    2425    protected virtual void OnOpenActionActivated (object sender, System.EventArgs e)
    2526    {
    26         Pimp.OpenFile open = new Pimp.OpenFile();
    27         ResponseType rsp = (ResponseType)open.Run();
     27        ThePimp.OpenFile open = new ThePimp.OpenFile();
     28        Pipi.Picture p = open.Load();
    2829        open.Destroy();
    29         if(rsp == ResponseType.Ok)
    30             return;
     30        if(p != null)
     31        {
     32            Title += " image " + p.Width + "x" + p.Height;
     33            scrolledwindow1.Add(new PictureView(p));
     34        }
    3135    }
    3236
  • libpipi/trunk/ThePimp/ThePimp.mdp

    r2866 r2869  
    1 <Project name="Pimp" fileversion="2.0" Description="The Pathetic Image Manipulation Program" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
     1<Project name="ThePimp" fileversion="2.0" Description="The Pathetic Image Manipulation Program" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
    22  <Configurations active="Debug">
    33    <Configuration name="Debug" ctype="DotNetProjectConfiguration">
    44      <CustomCommands>
    5         <Command type="AfterBuild" command="ln -s ${CombineDir}/Pipi/pipi-sharp.dll.config ${TargetDir}" workingdir="" />
     5        <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" workingdir="" />
    66      </CustomCommands>
    7       <Output directory="bin/Debug" assemblyKeyFile="." assembly="Pimp" />
     7      <Output directory="." assemblyKeyFile="." assembly="Pimp" />
    88      <Build debugmode="True" target="Exe" />
    99      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
     
    1111    </Configuration>
    1212    <Configuration name="Release" ctype="DotNetProjectConfiguration">
    13       <Output directory="bin/Release" assembly="Pimp" />
     13      <CustomCommands>
     14        <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" />
     15      </CustomCommands>
     16      <Output directory="." assemblyKeyFile="." assembly="Pimp" />
    1417      <Build debugmode="False" target="Exe" />
    1518      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
     
    2730    <File name="OpenFile.cs" subtype="Code" buildaction="Compile" />
    2831    <File name="gtk-gui/Pimp.OpenFile.cs" subtype="Code" buildaction="Compile" />
     32    <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />
     33    <File name="PictureView.cs" subtype="Code" buildaction="Compile" />
     34    <File name="gtk-gui/ThePimp.PictureView.cs" subtype="Code" buildaction="Compile" />
    2935  </Contents>
    3036  <References>
     
    3642    <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    3743    <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
    38     <ProjectReference type="Project" localcopy="True" refto="Pipi" />
     44    <ProjectReference type="Project" localcopy="True" refto="pipi-sharp" />
    3945  </References>
    4046  <Deployment.LinuxDeployData />
    41   <GtkDesignInfo gtkVersion="2.12.1" />
     47  <GtkDesignInfo gtkVersion="2.12.1">
     48    <ExportedWidgets>
     49      <Widget>ThePimp.PictureView</Widget>
     50    </ExportedWidgets>
     51  </GtkDesignInfo>
    4252</Project>
  • libpipi/trunk/ThePimp/gtk-gui/MainWindow.cs

    r2866 r2869  
    8181    private Gtk.ScrolledWindow scrolledwindow1;
    8282   
    83     private Gtk.DrawingArea drawingarea1;
    84    
    8583    private Gtk.Label label1;
    8684   
     
    8987    private Gtk.VBox vbox2;
    9088   
     89    private Gtk.Label label2;
     90   
    9191    private Gtk.VBox vbox3;
     92   
     93    private Gtk.Label label3;
    9294   
    9395    private Gtk.Statusbar statusbar1;
     
    238240        this.scrolledwindow1.Name = "scrolledwindow1";
    239241        this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
    240         // Container child scrolledwindow1.Gtk.Container+ContainerChild
    241         Gtk.Viewport w5 = new Gtk.Viewport();
    242         w5.ShadowType = ((Gtk.ShadowType)(0));
    243         // Container child GtkViewport.Gtk.Container+ContainerChild
    244         this.drawingarea1 = new Gtk.DrawingArea();
    245         this.drawingarea1.Name = "drawingarea1";
    246         w5.Add(this.drawingarea1);
    247         this.scrolledwindow1.Add(w5);
    248242        this.notebook1.Add(this.scrolledwindow1);
    249243        // Notebook tab
     
    254248        this.label1.ShowAll();
    255249        this.hpaned1.Add(this.notebook1);
    256         Gtk.Paned.PanedChild w9 = ((Gtk.Paned.PanedChild)(this.hpaned1[this.notebook1]));
    257         w9.Resize = false;
     250        Gtk.Paned.PanedChild w6 = ((Gtk.Paned.PanedChild)(this.hpaned1[this.notebook1]));
     251        w6.Resize = false;
    258252        // Container child hpaned1.Gtk.Paned+PanedChild
    259253        this.vpaned1 = new Gtk.VPaned();
     
    265259        this.vbox2.Name = "vbox2";
    266260        this.vbox2.BorderWidth = ((uint)(5));
     261        // Container child vbox2.Gtk.Box+BoxChild
     262        this.label2 = new Gtk.Label();
     263        this.label2.WidthRequest = 100;
     264        this.label2.Name = "label2";
     265        this.label2.LabelProp = Mono.Unix.Catalog.GetString("Tools");
     266        this.vbox2.Add(this.label2);
     267        Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.label2]));
     268        w7.Position = 0;
     269        w7.Expand = false;
     270        w7.Fill = false;
    267271        this.vpaned1.Add(this.vbox2);
    268         Gtk.Paned.PanedChild w10 = ((Gtk.Paned.PanedChild)(this.vpaned1[this.vbox2]));
    269         w10.Resize = false;
     272        Gtk.Paned.PanedChild w8 = ((Gtk.Paned.PanedChild)(this.vpaned1[this.vbox2]));
     273        w8.Resize = false;
    270274        // Container child vpaned1.Gtk.Paned+PanedChild
    271275        this.vbox3 = new Gtk.VBox();
    272276        this.vbox3.Name = "vbox3";
    273277        this.vbox3.BorderWidth = ((uint)(5));
     278        // Container child vbox3.Gtk.Box+BoxChild
     279        this.label3 = new Gtk.Label();
     280        this.label3.WidthRequest = 100;
     281        this.label3.Name = "label3";
     282        this.label3.LabelProp = Mono.Unix.Catalog.GetString("Layers & Channels");
     283        this.vbox3.Add(this.label3);
     284        Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox3[this.label3]));
     285        w9.Position = 0;
     286        w9.Expand = false;
     287        w9.Fill = false;
    274288        this.vpaned1.Add(this.vbox3);
    275289        this.hpaned1.Add(this.vpaned1);
    276290        this.vbox1.Add(this.hpaned1);
    277         Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox1[this.hpaned1]));
    278         w13.Position = 2;
     291        Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox1[this.hpaned1]));
     292        w12.Position = 2;
    279293        // Container child vbox1.Gtk.Box+BoxChild
    280294        this.statusbar1 = new Gtk.Statusbar();
     
    282296        this.statusbar1.Spacing = 6;
    283297        this.vbox1.Add(this.statusbar1);
    284         Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));
    285         w14.Position = 3;
    286         w14.Expand = false;
    287         w14.Fill = false;
     298        Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));
     299        w13.Position = 3;
     300        w13.Expand = false;
     301        w13.Fill = false;
    288302        this.Add(this.vbox1);
    289303        if ((this.Child != null)) {
  • libpipi/trunk/ThePimp/gtk-gui/ThePimp.OpenFile.cs

    r2866 r2869  
    99// ------------------------------------------------------------------------------
    1010
    11 namespace Pimp {
     11namespace ThePimp {
    1212   
    1313   
     
    2222        protected virtual void Build() {
    2323            Stetic.Gui.Initialize(this);
    24             // Widget Pimp.OpenFile
    25             this.Name = "Pimp.OpenFile";
     24            // Widget ThePimp.OpenFile
     25            this.Name = "ThePimp.OpenFile";
    2626            this.Title = Mono.Unix.Catalog.GetString("Open File");
    2727            this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-open", Gtk.IconSize.Menu, 16);
     
    3030            this.Modal = true;
    3131            this.HasSeparator = false;
    32             // Internal child Pimp.OpenFile.VBox
     32            // Internal child ThePimp.OpenFile.VBox
    3333            Gtk.VBox w1 = this.VBox;
    3434            w1.Name = "dialog1_VBox";
     
    4040            Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.filechooserwidget1]));
    4141            w2.Position = 0;
    42             // Internal child Pimp.OpenFile.ActionArea
     42            // Internal child ThePimp.OpenFile.ActionArea
    4343            Gtk.HButtonBox w3 = this.ActionArea;
    4444            w3.Name = "dialog1_ActionArea";
  • libpipi/trunk/ThePimp/gtk-gui/gui.stetic

    r2866 r2869  
    55    <target-gtk-version>2.12.1</target-gtk-version>
    66  </configuration>
     7  <import>
     8    <widget-library name="../Pimp.exe" internal="true" />
     9  </import>
    710  <widget class="Gtk.Window" id="MainWindow" design-size="840 680">
    811    <action-group name="Default">
     
    276279                        <property name="ShadowType">None</property>
    277280                        <child>
    278                           <widget class="Gtk.DrawingArea" id="drawingarea1">
    279                             <property name="MemberName" />
    280                           </widget>
     281                          <placeholder />
    281282                        </child>
    282283                      </widget>
     
    308309                    <property name="BorderWidth">5</property>
    309310                    <child>
    310                       <placeholder />
     311                      <widget class="Gtk.Label" id="label2">
     312                        <property name="MemberName" />
     313                        <property name="WidthRequest">100</property>
     314                        <property name="LabelProp" translatable="yes">Tools</property>
     315                      </widget>
     316                      <packing>
     317                        <property name="Position">0</property>
     318                        <property name="AutoSize">True</property>
     319                        <property name="Expand">False</property>
     320                        <property name="Fill">False</property>
     321                      </packing>
    311322                    </child>
    312323                    <child>
     
    326337                    <property name="BorderWidth">5</property>
    327338                    <child>
    328                       <placeholder />
     339                      <widget class="Gtk.Label" id="label3">
     340                        <property name="MemberName" />
     341                        <property name="WidthRequest">100</property>
     342                        <property name="LabelProp" translatable="yes">Layers &amp; Channels</property>
     343                      </widget>
     344                      <packing>
     345                        <property name="Position">0</property>
     346                        <property name="AutoSize">True</property>
     347                        <property name="Expand">False</property>
     348                        <property name="Fill">False</property>
     349                      </packing>
    329350                    </child>
    330351                    <child>
     
    365386    </child>
    366387  </widget>
    367   <widget class="Gtk.Dialog" id="Pimp.OpenFile" design-size="627 448">
     388  <widget class="Gtk.Dialog" id="ThePimp.OpenFile" design-size="627 448">
    368389    <property name="MemberName" />
    369390    <property name="Title" translatable="yes">Open File</property>
     
    433454    </child>
    434455  </widget>
     456  <widget class="Gtk.Bin" id="ThePimp.PictureView" design-size="300 300">
     457    <property name="MemberName" />
     458    <child>
     459      <widget class="Gtk.DrawingArea" id="drawingarea1">
     460        <property name="MemberName" />
     461      </widget>
     462    </child>
     463  </widget>
    435464</stetic-interface>
  • libpipi/trunk/configure.ac

    r2866 r2869  
    121121fi
    122122
     123# Build The Pimp?
     124AC_PATH_PROG(GMCS, gmcs, no)
     125PKG_CHECK_MODULES([GLADE_SHARP_20], [glade-sharp-2.0], [:])
     126PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0], [:])
     127PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0], [:])
     128AM_CONDITIONAL(USE_CSHARP, test "${gmcs}" != "no")
     129
    123130AC_CONFIG_FILES([
    124131  Makefile
     
    128135  examples/Makefile
    129136  test/Makefile
     137  pipi-sharp/Makefile
     138  ThePimp/Makefile
    130139])
    131140AC_CONFIG_FILES([
    132141  pipi/pipi.pc
     142  pipi-sharp/pipi-sharp.pc
     143  pipi-sharp/pipi-sharp.dll.config
    133144])
    134145
    135146AC_OUTPUT
    136147
    137 (cd pimp && ./configure)
    138 
  • libpipi/trunk/pipi-sharp/pipi-sharp.mdp

    r2866 r2869  
    1 <Project name="Pipi" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
     1<Project name="pipi-sharp" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
    22  <Configurations active="Debug">
    33    <Configuration name="Debug" ctype="DotNetProjectConfiguration">
    4       <Output directory="bin/Debug" assembly="pipi-sharp" />
     4      <Output directory="." assembly="pipi-sharp" />
    55      <Build debugmode="True" target="Library" />
    66      <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
     
    88    </Configuration>
    99    <Configuration name="Release" ctype="DotNetProjectConfiguration">
    10       <Output directory="bin/Release" assembly="pipi-sharp" />
     10      <Output directory="." assembly="pipi-sharp" />
    1111      <Build debugmode="False" target="Library" />
    1212      <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
     
    1616  <Contents>
    1717    <File name="Pipi.cs" subtype="Code" buildaction="Compile" />
     18    <File name="Picture.cs" subtype="Code" buildaction="Compile" />
    1819    <File name="AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
    1920  </Contents>
Note: See TracChangeset for help on using the changeset viewer.