[Pidgin] #4456: option to disable wait on status change

Pidgin trac at pidgin.im
Sun Apr 27 21:05:25 EDT 2008


#4456: option to disable wait on status change
---------------------------+------------------------------------------------
  Reporter:  rpolach       |       Owner:       
      Type:  enhancement   |      Status:  new  
  Priority:  minor         |   Milestone:       
 Component:  pidgin (gtk)  |     Version:  2.3.1
Resolution:                |    Keywords:       
   Pending:  0             |  
---------------------------+------------------------------------------------
Comment (by ConnorBehan):

 There is a VERY simple workaround for those who want to edit the source.
 pidgin/gtkstatusbox.c has the like #define TYPING_TIMEOUT 4000, which
 means it makes us wait 4000 ms or 4 seconds.

 Just change that to whatever you want. Here's a patch that makes it an
 option.


 {{{
 diff -ru old/pidgin/gtkprefs.c new/pidgin/pidgin/gtkprefs.c
 --- old/pidgin/gtkprefs.c       2008-03-31 13:21:25.000000000 -0400
 +++ new/pidgin/gtkprefs.c       2008-04-27 20:52:58.897448721 -0400
 @@ -866,6 +866,9 @@

         pidgin_prefs_checkbox(_("Show IMs and chats in _tabbed windows"),
                                                         PIDGIN_PREFS_ROOT
 "/conversations/tabs", vbox);
 +
 +       pidgin_prefs_checkbox(_("Disable status changing timeout"),
 +                                                       PIDGIN_PREFS_ROOT
 "/blist/typing_timeout", vbox);

         /*
          * Connect a signal to the above preference.  When conversations
 are not
 diff -ru old/pidgin/gtkstatusbox.c new/pidgin/gtkstatusbox.c
 --- old/pidgin/gtkstatusbox.c   2008-03-31 13:21:26.000000000 -0400
 +++ new/pidgin/gtkstatusbox.c   2008-04-27 20:55:18.514103040 -0400
 @@ -67,8 +67,6 @@
  #  endif
  #endif

 -#define TYPING_TIMEOUT 4000
 -
  static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data);
  static void imhtml_format_changed_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons
 buttons, void *data);
  static void remove_typing_cb(PidginStatusBox *box);
 @@ -1126,6 +1124,14 @@

  static gboolean imhtml_remove_focus(GtkWidget *w, GdkEventKey *event,
 PidginStatusBox *status_box)
  {
 +       int TYPING_TIMEOUT;
 +
 +       if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT
 "/blist/typing_timeout")) {
 +               TYPING_TIMEOUT = 0;
 +       } else {
 +               TYPING_TIMEOUT = 4000;
 +       }
 +
         if (event->keyval == GDK_Tab || event->keyval == GDK_KP_Tab)
         {
                 /* If last inserted character is a tab, then remove the
 focus from here */
 @@ -2518,6 +2524,13 @@
         gpointer data;
         GList *accounts = NULL, *node;
         int active;
 +       int TYPING_TIMEOUT;
 +
 +       if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT
 "/blist/typing_timeout")) {
 +               TYPING_TIMEOUT = 0;
 +       } else {
 +               TYPING_TIMEOUT = 4000;
 +       }


         if (!gtk_tree_model_get_iter
 (GTK_TREE_MODEL(status_box->dropdown_store), &iter, path))
 @@ -2638,6 +2651,14 @@

  static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data)
  {
 +       int TYPING_TIMEOUT;
 +
 +       if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT
 "/blist/typing_timeout")) {
 +               TYPING_TIMEOUT = 0;
 +       } else {
 +               TYPING_TIMEOUT = 4000;
 +       }
 +
         PidginStatusBox *status_box = (PidginStatusBox*)data;
         if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box)))
         {

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/4456#comment:8>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list