Changeset 3099 for libpipi/trunk


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

ThePimp?: double-clicking in the file dialogs opens or saves directly.

Location:
libpipi/trunk/ThePimp
Files:
5 edited

Legend:

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

    r2875 r3099  
    7777            this.DefaultHeight = 480;
    7878            this.Show();
     79            this.filechooserwidget1.FileActivated += new System.EventHandler(this.OnFilechooserwidget1FileActivated);
    7980        }
    8081    }
  • libpipi/trunk/ThePimp/gtk-gui/ThePimp.SaveFile.cs

    r2950 r3099  
    7575            this.DefaultHeight = 480;
    7676            this.Show();
     77            this.filechooserwidget1.FileActivated += new System.EventHandler(this.OnFilechooserwidget1FileActivated);
    7778        }
    7879    }
  • libpipi/trunk/ThePimp/gtk-gui/gui.stetic

    r3098 r3099  
    369369          <widget class="Gtk.FileChooserWidget" id="filechooserwidget1">
    370370            <property name="MemberName" />
     371            <signal name="FileActivated" handler="OnFilechooserwidget1FileActivated" />
    371372          </widget>
    372373          <packing>
     
    622623            <property name="MemberName" />
    623624            <property name="Action">Save</property>
     625            <signal name="FileActivated" handler="OnFilechooserwidget1FileActivated" />
    624626          </widget>
    625627          <packing>
  • libpipi/trunk/ThePimp/src/OpenFile.cs

    r3039 r3099  
    3131            if(rsp != ResponseType.Ok)
    3232                return null;
     33            return filechooserwidget1.Filename;
     34        }
    3335
    34             return filechooserwidget1.Filename;
     36        protected virtual void OnFilechooserwidget1FileActivated (object sender, System.EventArgs e)
     37        {
     38            Respond(ResponseType.Ok);
    3539        }
    3640    }
  • libpipi/trunk/ThePimp/src/SaveFile.cs

    r3039 r3099  
    3333            p.Save(filechooserwidget1.Filename);
    3434        }
     35
     36        protected virtual void OnFilechooserwidget1FileActivated (object sender, System.EventArgs e)
     37        {
     38            Respond(ResponseType.Ok);
     39        }
    3540    }
    3641}
Note: See TracChangeset for help on using the changeset viewer.