Wiki » History » Version 82

« Previous - Version 82/93 (diff) - Next » - Current version
Abdullah Alsaraf, 04/15/2015 08:27 PM


Wiki

# Potential Bugs To Fix:

  • Ticket #16305 Playing an incoming call sound feature.
  • Ticket #16339 Large messages cause data to be lost.
  • Ticket #15728 displays string of numbers instead of username on mouse over.
  • Ticket #1406 Easy way to increase text size.
  • Ticket #16303 Shows file transfer rejection twice

# 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.

# 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 line that looks 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.

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);