Wiki

# Potential Bugs To Fix:

  • Ticket #16305 Playing an incoming call sound feature.
  • Ticket #16339 Bug: Large messages cause data to be lost.
  • Ticket #15728 Bug: Displays string of numbers instead of username on mouse over.
  • Ticket #1406 Feature Request: Easy way to increase text size.
  • Ticket #16303 Bug: Shows file transfer rejection twice.
  • Ticket #7835 Feature Request: Sound option for file transfer request.
  • Ticket #14536 Feature Request: Shortcut to open chat history.

# Compilation Issues:

  • Make issue:
    "It is quite standard to need to use `ldconfig` after installing new libraries in order for the libraries to be loaded when an application needs them."

# Data Editing:

  • To modify Developers Information:
    Edit the folder in ~/[GIT REPO]/pidgin/gtkdialogs.c and add the following in the 'developers' array: {"NAME" , NULL, NULL}

# Bug Fix Progress:

  • "Unable to Send Message : Message is too large" lost message bug: Fixed and verified on AIM and Yahoo.
  • "displays string of numbers instead of username on mouse over" Fixed and verified on Facebook.
  • "Text Size Shortcut" Added and verified on AIM.
  • "file transfer rejection shown twice" Added and verified on Yahoo.
  • "Play sound on file transfer" Added and verified on Yahoo
  • "Shortcut to open chat history" Added and verified on Yahoo and AIM.

# Possible Solutions:

  • "Message is too large" Solution 1: The long message won't reach the other person. However, the data(long message) will no be lost. The chat window will display the long message with a notification under it that says "Unable to send message: The message is too large."

( pidgin folder --> libpurple folder --> open conversation.c --> inside the IF statement (err == -E2BIG) --> before msg = _("") include these two lines:

PurpleConvIm *im = PURPLE_CONV_IM(conv);
purple_conv_im_write(im, NULL, displayed, msgflags, time(NULL));

  • Modification to 'Message is too large' bug (Bold Red 'Error' Font) : I looked around in the Doxygen database which holds specific descriptions of every function in the program, found that 'msgflags' in the purple_conv_im_write function can be substituted with an enumerator that changes the type of the message displayed. Using the enumerator 'PURPLE_MESSAGE_ERROR' classifies the message as an error and displays it in a bold red font, this is the final code:

PurpleConvIm *im = PURPLE_CONV_IM(conv);
purple_conv_im_write(im, NULL, displayed, PURPLE_MESSAGE_ERROR, time(NULL));

  • "displays string of numbers instead of username on mouse over" Solution 1: A random string of numbers is displayed in the tooltip box when you mouse over a buddies name in Facebook.

(pidgin --> gtkblist.c line 2980 the tmp variable is what ends up being printed to the tooltip box.

  • Modification to "displays string of numbers instead of username on mouse over" : I first looked around in the pidgin Doxygen database and didn't make it very far but that was just because I was looking in the wrong areas. I then found out that the box you hover over is called "tooltip". This lead me to search the source code for the word tooltip and it lead to finding multiple functions that created these boxes. I then commented out code until the string of numbers disappeared so I knew where it was located. At this point all that had to be done was replace this string with the account alias. I expected it to take around 3 hours in the beginning and it ended up taking around 12 to locate the bug and find out how to replace the string correctly without causing other problems. The final code change is shown below:

tmp = g_markup_escape_text(purple_buddy_get_name((PurpleBuddy*)node), -1);
tmp = g_markup_escape_text(((PurpleBuddy*)(node))->alias, -1);

  • "Font size shortcut (increase/decrease)" Solution 1: An easy way to increase or decrease the text size quickly.
( pidgin folder --> inside gtkconv.c --> two functions were added and then passed to an array that holds the actions for the active conversation)

The two functions:

increase_font_size(gpointer data, guint action, GtkWidget *widget)

decrease_font_size(gpointer data, guint action, GtkWidget *widget)

They will get the active conversation, access the IMHTMLTOOLBAR and IMHTML, then send a GROW or SHRINK signal (increase or decrease). Check the difference under latest revisions for the definition.

The two new values inside the conversation array:

{ N_("/Conversation/Font Size _Larger"), "<CTL>S", increase_font_size, 0, "<StockItem>", NULL },

{ N_("/Conversation/Font Size _Smaller"), "<CTL>D", decrease_font_size, 0, "<StockItem>", NULL },

They will start the functions when the corresponding keys are pressed. When you open a new conversation, under Conversation on the toolbar, "Font Size Larger" and "Font Size Smaller" will be shown with their keys next to them.
The first argument will be shown under Conversation as a text, the second argument defines the key, the third argument is as function call, which will be executed when the second argument is active. IMHTLTOOLBAR.c and IMHTML.c define the font size, how they are called, and how to access them. The font size could go larger three times its default size and go two times smaller than its default size.

The shortcuts work fine; however, proper declarations were added later to avoid warnings about no previous prototypes

  • "rejection shown twice after file cancellation" Solution 1: File rejection shown twice: one rejection in conversation window and the other as a pop-up dialog. The fix removes the dialog and keeps the rejection shown in the conversation.

Most of the work done on this fix was using "grep" to locate where the cancellation happens and commenting out lines that look related to the problem. at first, the whole search was happening inside the pidgin folder, which has the file responsible for conversations: conv.c
After no success, the search changed to libpurple which has a file that is responsible for remote side and host side cancellations and other stuff.

File:

(libpurple --> ft.c --> purple_xfer_cancel_remote )

Code: comment out or remove the line below

purple_xfer_error(purple_xfer_get_type(xfer), account, xfer->who, msg);

  • "Feature Request: Play sound on file transfer request"
    An entry to the sounds array was added to link the File Transfer Request event to a specific sound, after that, an option to disable said sound effect was added to the Sounds section of the Pidgin preferences.

Array entry in line 67 of pidgin/gtksound.h:

{N_("File Transfer Requested"), "ft_req", "receive.wav"},

Option to turn off in preferences in lines 295-296 of pidgin/gtksound.h

purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/enabled/ft_req", TRUE);
purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/file/ft_req", "");

Function name added to the array in the header file in line 46 of libpurple/sound.h

PURPLE_SOUND_FILE_TRANSFER,

Sound is played when notification of file transfer pops up in line 593 of libpurple/ft.c the file that handles file transfers

purple_sound_play_event(PURPLE_SOUND_FILE_TRANSFER, NULL);