Feature Requests item #893065, was opened at 2004-02-08 17:12
Message generated for change (Comment added) made by lschiere
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=350235&aid=893065&group_id=235

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Mikhail Capone (mikecapone)
Assigned to: Nobody/Anonymous (nobody)
>Summary: \"http://\"; smiley bug

Initial Comment:
It would be really nice if you guys made gaim recognize
URLs and stop displaying a :/ smiley in the middle of
"http://";

Regards,

Mikhail @ skelterhell(atttt)yahoo(dooott)com

----------------------------------------------------------------------

Comment By: Luke Schierer (lschiere)
Date: 2007-04-20 10:55

Message:
Logged In: YES 
user_id=28833
Originator: NO

As we are closing this tracker, please submit any feature request that is
still valid to http://developer.pidgin.im.  Thanks. 

----------------------------------------------------------------------

Comment By: newbeewan (newbeewan)
Date: 2004-02-19 04:39

Message:
Logged In: YES 
user_id=736123

I installed the official update of gaim 0.75-1 for mdk 9.1
and I have the bug under msn protocole...


----------------------------------------------------------------------

Comment By: Nathan Owens (pianocomp81)
Date: 2004-02-16 19:51

Message:
Logged In: YES 
user_id=320139

I see what you mean, now that I know how the problem's caused.

Here's a patch, I'll post it to the patch page too.
Hopefully it'll get accepted. Basically, it checks to see if
the next X characters are a registered protocol for gaim
(http, https, and ftp are the only ones that gaim
recognizes), and then if so, skips those characters.

This works regardless of whether someone has links showing
turned on or not.

--- src/gtkimhtml.c.orig        2004-02-16 19:14:20.000000000 +0000
+++ src/gtkimhtml.c     2004-02-16 17:59:14.000000000 +0000
@@ -1103,7 +1103,25 @@
                                                                
gtk_text_buffer_get_end_iter(imhtml->text_buffer,
&iter); \
                         } \
 
-
+static const char *accepted_protocols[] = {
+    "http://";,
+    "https://";,
+    "ftp://";
+};
+                                                          
                                                   
+static const int accepted_protocols_size = 3;
+                                                          
                                                   
+int gtk_imhtml_is_protocol(const char *text)
+{
+    int i=0;
+                                                          
                                                   
+    for(i=0; i<accepted_protocols_size; i++){
+        if( strncasecmp(text, accepted_protocols[i],
strlen(accepted_protocols[i])) == 0  ){
+            return strlen(accepted_protocols[i]);
+        }
+    }
+    return 0;
+}
 
 GString* gtk_imhtml_append_text_with_images (GtkIMHtml    
   *imhtml,
                                             const gchar      *text,
@@ -1124,6 +1142,7 @@
        gint type;
        const gchar *c;
        gchar *amp;
+       gint len_protocol;
 
        guint   bold = 0,
                italics = 0,
@@ -1447,6 +1466,11 @@
                        }
                        c++;
                        pos++;
+               } else if ((len_protocol = gtk_imhtml_is_protocol(c)) > 0){
+                    while(len_protocol--){
+                        ws [wpos++] = *c++;
+                        pos++;
+                    }
                } else if (imhtml->show_smileys && (gtk_imhtml_is_smiley
(imhtml, fonts, c, &smilelen) ||
gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) {
                        GtkTextChildAnchor *anchor;
                        GtkWidget *icon = NULL;


----------------------------------------------------------------------

Comment By: Mikhail Capone (mikecapone)
Date: 2004-02-15 15:53

Message:
Logged In: YES 
user_id=971175

I'm using 0.75 in Slackware 9.1 with the SmallSmiles smileys
by Erik Wood.

I suppose there are other smiley sets that don't have the :/
smiley, but I like both the SmallSmiles set and the :/ smiley.

I suppose that other kind of smileys can also be triggered
by URLs. I just think it'd be a bit "smarter" of GAIM to
recognize URLs and disable smileys for that line.

Just my suggestion,

----------------------------------------------------------------------

Comment By: Nathan Owens (pianocomp81)
Date: 2004-02-15 15:30

Message:
Logged In: YES 
user_id=320139

I meant the Mandrake 9.2 version, not the Mandrake Cooker
version. The cooker version fixed it. I had to build the
cooker version from source because the binaries require
libXss.so.1, which I'm guessing is in one of the the cooker
XFree86 rpms (I don't have much from cooker installed).

----------------------------------------------------------------------

Comment By: Nathan Owens (pianocomp81)
Date: 2004-02-15 14:50

Message:
Logged In: YES 
user_id=320139

It's not gaim, it's the smiley interface. Are you using the
official gaim builds? The Mandrake Cooker build of 0.75
causes this problem, but I just installed the official gaim
version for Mandrake 9.2, and it works without a problem.

----------------------------------------------------------------------

Comment By: Daniel Atallah (datallah)
Date: 2004-02-09 17:08

Message:
Logged In: YES 
user_id=325843

that is a bug in your smiley theme, choose one that doesn't
have a definition for :/

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=350235&aid=893065&group_id=235

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gaim-features mailing list
Gaim-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gaim-features

Reply via email to