Carnegie Mellon Students looking for help

Etan Reisner pidgin at unreliablesource.net
Mon Nov 23 23:58:16 EST 2009


On Sun, Nov 22, 2009 at 03:18:53PM -0500, Anthony Hugh wrote:
> Thanks for all the quick responses.  We worked on ticket #3329 and submitted
> a patch.
>
> Right now, we're trying to get a second bug fix in for the assignment.
> We're working on ticket #9422 (Sort in "New Instant Message" and we're
> having a little trouble finding the callback function on the "Name"
> textbox.  We see that it gets created via the "pidgin_dialogs_im" function
> in gtkdialogs.c.  We also saw that in gtkrequest.c:1109,
> pidgin_request_fields fills in the call back functions for the ok button and
> the cancel button.  We can't seem to find where the "Name" textbox functions
> are though.  Could someone give us some insights on where to look?
>
> Thanks,
> Anthony Hugh

The line from pidgin_dialogs_im that is the "magic" line here is
purple_request_field_set_type_hint. If you look at
gtkrequest.c:setup_entry_field you will see that it calls
purple_request_field_get_type_hint (it is generally a fair bet that a
_set_ function has a matching _get_ function) and that when the field hint
has a prefix that matches "screenname" it does some stuff ending with a
call to pidgin_setup_screenname_autocomplete_with_filter (which is in
gtkutils.c). After a series of contortions that adds the necessary data to
the gtk_list_store and sets the sort column on the tree store.

Depending on what aspect of the request in #9422 you want to add you are
going to need to do different things.

Displaying the status would likely require a fair bit of work as I don't
imagine (though I haven't checked) that the GtkEntryCompletion stuff
supports showing complex completion results (beyond the matching text).
Which means it would require a custom completion implementation (or
similar solution to work).

Sorting by some other criteria should be considerably simpler, if the data
is already in the tree model then simply modifying the sort column should
make it work. If the data isn't in the tree model then it needs to be
added and the sort column needs to be updated.

    -Etan




More information about the Devel mailing list