mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-05-22 17:42:20 +00:00
2005-06-02 Mike Kestner <mkestner@novell.com>
* glib/ListBase.cs : add a nested class to support filename encoded string element marshaling. * gtk/Gtk.metadata : mark the filenames and folders as filename encoded. * gtk/FileChooserDialog.custom : use new ListBase.FilenameString type for list element type of filenames and folders. * gtk/FileChooserWidget.custom : use new ListBase.FilenameString type for list element type of filenames and folders. [Fixes #72701] svn path=/trunk/gtk-sharp/; revision=45334
This commit is contained in:
parent
bd2b0d9a7f
commit
ff096ac998
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2005-06-02 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* glib/ListBase.cs : add a nested class to support filename encoded
|
||||||
|
string element marshaling.
|
||||||
|
* gtk/Gtk.metadata : mark the filenames and folders as filename
|
||||||
|
encoded.
|
||||||
|
* gtk/FileChooserDialog.custom : use new ListBase.FilenameString type
|
||||||
|
for list element type of filenames and folders.
|
||||||
|
* gtk/FileChooserWidget.custom : use new ListBase.FilenameString type
|
||||||
|
for list element type of filenames and folders.
|
||||||
|
[Fixes #72701]
|
||||||
|
|
||||||
2005-06-02 Mike Kestner <mkestner@novell.com>
|
2005-06-02 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* generator/ConstFilenameGen.cs : new generatable for filename encoded
|
* generator/ConstFilenameGen.cs : new generatable for filename encoded
|
||||||
|
|
18
doc/en/GLib/ListBase+FilenameString.xml
Normal file
18
doc/en/GLib/ListBase+FilenameString.xml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<Type Name="ListBase+FilenameString" FullName="GLib.ListBase+FilenameString">
|
||||||
|
<TypeSignature Language="C#" Value="public class FilenameString" />
|
||||||
|
<AssemblyInfo>
|
||||||
|
<AssemblyName>glib-sharp</AssemblyName>
|
||||||
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||||||
|
</AssemblyInfo>
|
||||||
|
<Base>
|
||||||
|
<BaseTypeName>System.Object</BaseTypeName>
|
||||||
|
</Base>
|
||||||
|
<Interfaces />
|
||||||
|
<Members>
|
||||||
|
|
||||||
|
</Members>
|
||||||
|
<Docs>
|
||||||
|
<summary>Type for Filename encoded string element marshaling.</summary>
|
||||||
|
<remarks>Use this type as a List constructor element_type parameter to use filename-encoded string marshaling.</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Type>
|
|
@ -71,6 +71,7 @@
|
||||||
<Type Name="TimeoutHandler" />
|
<Type Name="TimeoutHandler" />
|
||||||
<Type Name="LogLevelFlags" />
|
<Type Name="LogLevelFlags" />
|
||||||
<Type Name="TypeFundamentals" />
|
<Type Name="TypeFundamentals" />
|
||||||
|
<Type Name="ListBase+FilenameString" />
|
||||||
</Namespace>
|
</Namespace>
|
||||||
<Namespace Name="Pango">
|
<Namespace Name="Pango">
|
||||||
<Type Name="Attribute" />
|
<Type Name="Attribute" />
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
// SList.cs - GSList class wrapper implementation
|
// ListBase.cs - List base class implementation
|
||||||
//
|
//
|
||||||
// Authors: Mike Kestner <mkestner@speakeasy.net>
|
// Authors: Mike Kestner <mkestner@novell.com>
|
||||||
//
|
//
|
||||||
// Copyright (c) 2002 Mike Kestner
|
// Copyright (c) 2002 Mike Kestner
|
||||||
|
// Copyright (c) 2005 Novell, Inc.
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -134,12 +135,18 @@ namespace GLib {
|
||||||
orig.CopyTo (array, index);
|
orig.CopyTo (array, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class FilenameString {
|
||||||
|
private FilenameString () {}
|
||||||
|
}
|
||||||
|
|
||||||
internal object DataMarshal (IntPtr data)
|
internal object DataMarshal (IntPtr data)
|
||||||
{
|
{
|
||||||
object ret = null;
|
object ret = null;
|
||||||
if (element_type != null) {
|
if (element_type != null) {
|
||||||
if (element_type == typeof (string))
|
if (element_type == typeof (string))
|
||||||
ret = Marshaller.Utf8PtrToString (data);
|
ret = Marshaller.Utf8PtrToString (data);
|
||||||
|
else if (element_type == typeof (FilenameString))
|
||||||
|
ret = Marshaller.FilenamePtrToString (data);
|
||||||
else if (element_type == typeof (int))
|
else if (element_type == typeof (int))
|
||||||
ret = (int) data;
|
ret = (int) data;
|
||||||
else if (element_type.IsValueType)
|
else if (element_type.IsValueType)
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
IntPtr raw_ret = gtk_file_chooser_get_filenames (Handle);
|
IntPtr raw_ret = gtk_file_chooser_get_filenames (Handle);
|
||||||
if (raw_ret == IntPtr.Zero)
|
if (raw_ret == IntPtr.Zero)
|
||||||
return new string[0];
|
return new string[0];
|
||||||
GLib.SList list = new GLib.SList (raw_ret, typeof (string));
|
GLib.SList list = new GLib.SList (raw_ret, typeof (GLib.ListBase.FilenameString));
|
||||||
string[] result = new string [list.Count];
|
string[] result = new string [list.Count];
|
||||||
for (int i = 0; i < list.Count; i++)
|
for (int i = 0; i < list.Count; i++)
|
||||||
result [i] = (string) list [i];
|
result [i] = (string) list [i];
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
IntPtr raw_ret = gtk_file_chooser_list_shortcut_folders (Handle);
|
IntPtr raw_ret = gtk_file_chooser_list_shortcut_folders (Handle);
|
||||||
if (raw_ret == IntPtr.Zero)
|
if (raw_ret == IntPtr.Zero)
|
||||||
return new string[0];
|
return new string[0];
|
||||||
GLib.SList list = new GLib.SList (raw_ret, typeof (string));
|
GLib.SList list = new GLib.SList (raw_ret, typeof (GLib.ListBase.FilenameString));
|
||||||
string[] result = new string [list.Count];
|
string[] result = new string [list.Count];
|
||||||
for (int i = 0; i < list.Count; i++)
|
for (int i = 0; i < list.Count; i++)
|
||||||
result [i] = (string) list [i];
|
result [i] = (string) list [i];
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
IntPtr raw_ret = gtk_file_chooser_get_filenames (Handle);
|
IntPtr raw_ret = gtk_file_chooser_get_filenames (Handle);
|
||||||
if (raw_ret == IntPtr.Zero)
|
if (raw_ret == IntPtr.Zero)
|
||||||
return new string[0];
|
return new string[0];
|
||||||
GLib.SList list = new GLib.SList (raw_ret, typeof (string));
|
GLib.SList list = new GLib.SList (raw_ret, typeof (GLib.ListBase.FilenameString));
|
||||||
string[] result = new string [list.Count];
|
string[] result = new string [list.Count];
|
||||||
for (int i = 0; i < list.Count; i++)
|
for (int i = 0; i < list.Count; i++)
|
||||||
result [i] = (string) list [i];
|
result [i] = (string) list [i];
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
IntPtr raw_ret = gtk_file_chooser_list_shortcut_folders (Handle);
|
IntPtr raw_ret = gtk_file_chooser_list_shortcut_folders (Handle);
|
||||||
if (raw_ret == IntPtr.Zero)
|
if (raw_ret == IntPtr.Zero)
|
||||||
return new string[0];
|
return new string[0];
|
||||||
GLib.SList list = new GLib.SList (raw_ret, typeof (string));
|
GLib.SList list = new GLib.SList (raw_ret, typeof (GLib.ListBase.FilenameString));
|
||||||
string[] result = new string [list.Count];
|
string[] result = new string [list.Count];
|
||||||
for (int i = 0; i < list.Count; i++)
|
for (int i = 0; i < list.Count; i++)
|
||||||
result [i] = (string) list [i];
|
result [i] = (string) list [i];
|
||||||
|
|
|
@ -87,7 +87,12 @@
|
||||||
<attr path="/api/namespace/interface[@cname='GtkEditable']/signal[@name='DeleteText']" name="name">TextDeleted</attr>
|
<attr path="/api/namespace/interface[@cname='GtkEditable']/signal[@name='DeleteText']" name="name">TextDeleted</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkEditable']/signal[@name='InsertText']/*/*[@name='position']" name="pass_as">ref</attr>
|
<attr path="/api/namespace/interface[@cname='GtkEditable']/signal[@name='InsertText']/*/*[@name='position']" name="pass_as">ref</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkEditable']/signal[@name='InsertText']" name="name">TextInserted</attr>
|
<attr path="/api/namespace/interface[@cname='GtkEditable']/signal[@name='InsertText']" name="name">TextInserted</attr>
|
||||||
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='GetCurrentFolder']/return-type" name="type">gfilename*</attr>
|
||||||
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='GetFilename']/return-type" name="type">gfilename*</attr>
|
||||||
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='GetPreviewFilename']/return-type" name="type">gfilename*</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='GetFilenames']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='GetFilenames']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method/parameters/*[@name='filename']" name="type">const-gfilename*</attr>
|
||||||
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method/parameters/*[@name='folder']" name="type">const-gfilename*</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='GetUris']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='GetUris']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='ListFilters']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='ListFilters']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='ListShortcutFolders']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@cname='GtkFileChooser']/method[@name='ListShortcutFolders']" name="hidden">1</attr>
|
||||||
|
|
Loading…
Reference in a new issue