瀏覽代碼

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

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3099 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 年之前
父節點
當前提交
804c8710b4
共有 5 個文件被更改,包括 14 次插入1 次删除
  1. +1
    -0
      ThePimp/gtk-gui/ThePimp.OpenFile.cs
  2. +1
    -0
      ThePimp/gtk-gui/ThePimp.SaveFile.cs
  3. +2
    -0
      ThePimp/gtk-gui/gui.stetic
  4. +5
    -1
      ThePimp/src/OpenFile.cs
  5. +5
    -0
      ThePimp/src/SaveFile.cs

+ 1
- 0
ThePimp/gtk-gui/ThePimp.OpenFile.cs 查看文件

@@ -76,6 +76,7 @@ namespace ThePimp {
this.DefaultWidth = 640;
this.DefaultHeight = 480;
this.Show();
this.filechooserwidget1.FileActivated += new System.EventHandler(this.OnFilechooserwidget1FileActivated);
}
}
}

+ 1
- 0
ThePimp/gtk-gui/ThePimp.SaveFile.cs 查看文件

@@ -74,6 +74,7 @@ namespace ThePimp {
this.DefaultWidth = 640;
this.DefaultHeight = 480;
this.Show();
this.filechooserwidget1.FileActivated += new System.EventHandler(this.OnFilechooserwidget1FileActivated);
}
}
}

+ 2
- 0
ThePimp/gtk-gui/gui.stetic 查看文件

@@ -368,6 +368,7 @@
<child>
<widget class="Gtk.FileChooserWidget" id="filechooserwidget1">
<property name="MemberName" />
<signal name="FileActivated" handler="OnFilechooserwidget1FileActivated" />
</widget>
<packing>
<property name="Position">0</property>
@@ -621,6 +622,7 @@
<widget class="Gtk.FileChooserWidget" id="filechooserwidget1">
<property name="MemberName" />
<property name="Action">Save</property>
<signal name="FileActivated" handler="OnFilechooserwidget1FileActivated" />
</widget>
<packing>
<property name="Position">0</property>


+ 5
- 1
ThePimp/src/OpenFile.cs 查看文件

@@ -30,8 +30,12 @@ namespace ThePimp
Hide();
if(rsp != ResponseType.Ok)
return null;

return filechooserwidget1.Filename;
}

protected virtual void OnFilechooserwidget1FileActivated (object sender, System.EventArgs e)
{
Respond(ResponseType.Ok);
}
}
}

+ 5
- 0
ThePimp/src/SaveFile.cs 查看文件

@@ -32,5 +32,10 @@ namespace ThePimp
return;
p.Save(filechooserwidget1.Filename);
}

protected virtual void OnFilechooserwidget1FileActivated (object sender, System.EventArgs e)
{
Respond(ResponseType.Ok);
}
}
}

Loading…
取消
儲存