Permalink
Commits on Nov 18, 2012
  1. glib: Fix crash when freeing lists with elements typed as interfaces

    bl8 committed Nov 18, 2012
    If a GList or a GSList had its element type set to a GInterface, and if
    the elements were marked as owned, it would end up freeing those
    elements with g_free(), which would lead to a crash.
    
    They need to be unreffed with g_object_unref, but the criteria for that
    was whether the element type is assignable to GLib.Object. This is not
    true for GInterface types.
    
    We now first check if the element type is an opaque. If not, and if it's
    assignable to GLib.IWrapper, we then use g_object_unref.
    
    From what I can see, all GLib.IWrapper subclasses that not opaque can be
    unreffed with g_object_unref.
  2. gio: Rename the DBus.Address* methods

    bl8 committed Nov 18, 2012
    Fix-ups to improve the DBus.Address* method names.
    
    For example, DBus.GetStream(string address ...) is clear enough and
    better than DBus.AddressGetStream(string address ...).
  3. gio: Rename the Dbus class to DBus

    bl8 committed Nov 18, 2012
    An uppercase B in DBus make the class name consistent with all the other
    DBus* classes.
  4. gio: Hide GioGlobal.RegistryBackendGetType method

    bl8 committed Nov 18, 2012
    It's Windows-specific, and probably doesn't need to be called directly
    by anyone.
  5. gio: Move static methods from Simple to SimpleAsyncResult class

    bl8 committed Nov 18, 2012
    Static methods corresponding to g_simple_async_report_* functions were
    automatically grouped into the badly-named Simple class.
    
    Add fix-ups to hide this Simple class, move the methods to
    SimpleAsyncResult and rename them accordingly.
  6. generator: Fix compilation warning in some generated interface adapters

    bl8 committed Nov 18, 2012
    Don't generate a static field if it's not going to be used.
    
    This fixes a compilation warning on the generated code for interfaces
    that don't have virtual methods.
  7. Merge pull request mono#55 from meebey/master

    bl8 committed Nov 18, 2012
    Replace top-level COPYING with LGPL2-only license
Commits on Nov 17, 2012
  1. Replaced COPYING with LGPL2-only license

    meebey committed Nov 17, 2012
    There is not a single file in gtk-sharp that has a LGPL2.1+ header but
    LGPL2-only instead.
  2. Fix a crash during initialization of interfaces (bxc#8447)

    bl8 committed Nov 17, 2012
    GInterfaceInfo.Data was automatically set to be a GCHandle on the
    interface adapter. But the generated GInterfaceInitHandlers were
    not using it, just free'ing it.
    
    But for the GInterface property support, the Data field is now used to
    pass the class pointer, so casting it to a GCHandle to free it would
    cause an exception.
    
    We now don't assume anything about GInterfaceInfo.Data.
Commits on Nov 15, 2012
  1. Update top-level COPYING with current version of the LGPL v2.1

    bl8 committed Nov 15, 2012
    Apparently it needs to have an up-to-date address for the FSF.
  2. gui-thread-check: Replace COPYING with the correct license

    bl8 committed Nov 15, 2012
    As indicated in the source code, and confirmed by the original author,
    the gui-thread-check is licensed under the GPL v2.
  3. generator: Fix misleading warning for callbacks in virtual methods

    bl8 committed Nov 15, 2012
    Wen generating a virtual method, the current member was not set in the
    GenerationInfo. That caused the warning message about the callback scope
    to refer to a wrong method name.
  4. gtk: Make the Group property for Radio* widgets a properly typed array

    bl8 committed Nov 15, 2012
    The Group property for all the Radio* classes (RadioAction, RadioButton,
    RadioMenuItem and RadioToolButton) was exposed as a GLib.SList,
    with its elements untyped.
    
    We now hide the various Group properties and have custom code to handle
    them correctly.
Commits on Nov 12, 2012
  1. gio: Enable the GSocketMsgFlags enum with hardcoded values

    bl8 committed Nov 12, 2012
    Same as the previous commit for GSocketFamily, the values are not going
    to change much.
  2. gio: Enable the GSocketFamily enum with hardcoded values

    bl8 committed Nov 12, 2012
    The values found by the parser for the GSocketFamily enum are in fact
    constants defined in another header file, so the generated code would be
    invalid.
    
    We now hardcode the values through fix-ups. They probably don't
    change, and they are also hardcoded in the gir file anyway, so it should
    be OK.
    
    Also fix-up a GInetAddress constructor that now gets generated.
Commits on Nov 11, 2012
  1. gio: Mark the Seekable interface as consume-only

    bl8 committed Nov 11, 2012
    The implementor class is not generated correctly, because of some
    strangeness with the method names. And I don't think anyone would need
    to implement it.
  2. gio: Fix-up capitalisation of several property types

    bl8 committed Nov 11, 2012
    For properties, the parser guesses the type name from an all-caps macro
    name. So if the GType has a funny name, like dbus -> DBus, the property
    type is wrong.
  3. gio: Rename what remains of Io class to IOError and adjust method names

    bl8 committed Nov 11, 2012
    All method not related to IOError have been moved to other classes, so
    we can rename the Io class to IOError.
  4. gio: Move the module-related static functions into the IOModule class

    bl8 committed Nov 11, 2012
    Also adjust their names and fix the return types.
  5. gio: Rename Content class to ContentType and adjust method names

    bl8 committed Nov 11, 2012
    The parser automatically groups static functions with the same prefix
    into classes, but the right name can't be determined automatically.
    
    In this case, ContentType.GetDescription(...) is much better than
    Content.TypeGetDescription(...).
  6. glib: Add GIOCondition symbol to glib-api.xml

    bl8 committed Nov 11, 2012
    This fixes some generator warnings for gio.
Commits on Nov 8, 2012
  1. sample: Add AsyncSample to showcase GLibSynchronizationContext

    bl8 committed Nov 8, 2012
    Add a sample to illustrate the point of having a
    GLibSynchronizationContext, but with the async/await code ifdef'ed out
    because we don't require Mono 3.0 for now. Instead, provide a crude
    equivalent of what would be generated by the compiler, to show that it
    works.
  2. Add a SynchronizationContext implementation for GLib (bnc#621444)

    ickard authored and bl8 committed Nov 8, 2012
    Create a GLibSynchronizationContext that sends code to be run on the
    GLib main loop, and set it as the current SynchronizationContext in
    Gtk.Init().
    
    When you use the await keyword to do a task asynchronously, by default
    the awaiter will capture the current SynchronizationContext, and if
    there was one, when the task completes it’ll Post the supplied
    continuation back to that context, rather than running it on whatever
    thread it wants.
    
    This means that if you use the async/await keywords in your Gtk# app,
    things will now work as expected with the GTK main thread. For example:
    
    static async void DoWork () // called in the GTK main thread
    {
        // Do some stuff with the UI...
        label.Text = "Starting Work";
    
        // Run something asynchronously, UI is not frozen
        int res = await DoLongOperation ();
    
        // Do some more UI stuff, it'll run on the GTK main thread
        label.Text = "Work done";
    }
    
    Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
Commits on Nov 4, 2012