MonoTorrent Gtk# Interface Update

Finally an update to this log, conveniently before midterm evaluations! I have updated the midterm deliverables page to reflect the current status of the project, but for those who love visuals here is a screenshot showing off the interface in action.

Monsoon

As of posting, most basic functionality is complete. As listed in the midterm deliverables there are still some outstanding features not yet working. Missing is, UPnP support, a persistent interface between sessions, restoring individual torrent settings between sessions, viewing pieces, creating and setting labels, and also a small handful of helper features(auto add from directory, move data once download is complete, etc).

Regarding viewing pieces, to my knowledge, currently there is nothing like a piece bar available in gtk-sharp. This is going to be needed to illustrate torrent availability/pieces, as well as a file’s download progress. Although at the moment I’m not sure what creating a custom widget like this entails.

After adding filtering support to my TreeView, drag n’ drop broke. This was due to the TreeModelFilter not supporting the TreeDragDest interface. I am having a hard time solving this problem. The following Gtk warning has some suggestions,

Gtk-WARNING **: You must override the default 'drag_drop' handler on GtkTreeView when using models that don't support the GtkTreeDragDest interface and enabling drag-and-drop. The simplest way to do this is to connect to 'drag_drop' and call g_signal_stop_emission_by_name() in your signal handler to prevent the default handler from running. Look at the source code for the default handler in gtktreeview.c to get an idea what your handler should do. (gtktreeview.c is in the GTK source code.) If you're using GTK from a language other than C, there may be a more natural way to override default handlers, e.g. via derivation.

I’m sure this is an easy solution, but as I am new to gtk-sharp, I’m quite lost! I’ve tried creating a stub by overiding OnDragDrop in my TreeView but that of course stopped DragDataReceived from working. It suggests a call to g_signal_stop_emission_by_name() (through a P/Invoke?) but I’m guessing that would be the same as creating a stub. Lastly I derived TreeModelFilter and implemented the interface but at runtime I received a cannot override exception.

Other then the above problems, development has been great. Alan’s MonoTorrent library is great to work with.


Posted

in

,

by

Tags:

Comments

4 responses to “MonoTorrent Gtk# Interface Update”

  1. cesar nataren Avatar

    I encountered that problem too. I just added a type that derives from TreeView, and overrides OnDragDataReceived that does nothing on its body.

  2. Armando Jagucki Avatar
    Armando Jagucki

    Nice work! I will have to try this out later.

  3. duff Avatar
    duff

    Hi,

    I have done the winform GUI for Monotorrent. So if you need any help or idea to improove user-friendlyness or just help call me 😉
    Anyway, Good job because old gtk gui lake a lot of things and is buggy according Alan. So if you have succeed to make it a real option of GUI. IT will be good for SUSE and integration in list of torrent client…

  4. Marcos Marín Avatar
    Marcos Marín

    This is looking really nice, good work!

    Something I have always wanted from a torrent client is to be able to apply multiple labels to a torrent. For example I like to have torrents from private trackers under a “private” label, and I would also like to be able to put them under another label more specific to what they are.