| Yattm - unified GTK instant-messaging client | ![]() |
| [Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003] |
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | protocol_smiley_struct |
| struct | smiley_struct |
Typedefs | |
| typedef protocol_smiley_struct | protocol_smiley |
| typedef smiley_struct | smiley |
Functions | |
| void | init_smileys (void) |
| gchar * | eb_smilify (gchar *text, GList *protocol_smileys) |
| GList * | eb_default_smileys (void) |
| GList * | add_smiley (GList *list, char *name, gchar **data) |
| GList * | add_protocol_smiley (GList *list, char *text, char *name) |
| GList * | eb_smileys (void) |
| smiley * | get_smiley_by_name (char *name) |
Variables | |
| GList * | smileys |
| int | do_smiley |
|
|
|
|
|
|
|
||||||||||||||||
|
Definition at line 187 of file smileys.c. References protocol_smiley_struct::name, and protocol_smiley_struct::text. Referenced by init_smileys().
00188 {
00189 protocol_smiley * psmile;
00190
00191 psmile=g_new0(protocol_smiley, 1);
00192 strcpy(psmile->text, text);
00193 strcpy(psmile->name, name);
00194 return g_list_append(list, psmile);
00195 }
|
|
||||||||||||||||
|
Definition at line 197 of file smileys.c. References smiley_struct::name, and smiley_struct::pixmap. Referenced by init_smileys().
|
|
|
Definition at line 182 of file smileys.c. References default_smileys.
00183 {
00184 return default_smileys;
00185 }
|
|
|
Definition at line 46 of file smileys.c. References _eb_smileys.
00047 {
00048 return _eb_smileys;
00049 }
|
|
||||||||||||
|
Definition at line 112 of file smileys.c. References protocol_smiley_struct::name, no_smileys, and protocol_smiley_struct::text. Referenced by eb_chat_room_show_message(), eb_chat_window_display_remote_message(), and send_message().
00113 {
00114 int ipos=0;
00115 int found;
00116 int i;
00117 GList * l=protocol_smileys;
00118 GString * newstr;
00119 char * result;
00120
00121 if(!do_smiley)
00122 {
00123 return text;
00124 }
00125
00126 newstr=g_string_sized_new(2048);
00127
00128 while(text[ipos]!='\0')
00129 {
00130 /* ignore anything in < > */
00131 if(text[ipos] == '<') {
00132 while(text[ipos] && text[ipos] != '>') {
00133 g_string_append_c(newstr, text[ipos++]);
00134 }
00135 if(text[ipos] == '>')
00136 g_string_append_c(newstr, text[ipos++]);
00137 else /* text[ipos] is null */
00138 break;
00139 }
00140
00141 /* ignore anything in the ignore list (http://, ftp://, etc.) */
00142 for(i=0; no_smileys[i]; i++) {
00143 int len = strlen(no_smileys[i]);
00144 if( !strncmp( text + ipos, no_smileys[i], len ) ) {
00145 g_string_append(newstr, no_smileys[i]);
00146 ipos += len;
00147 }
00148 }
00149
00150
00151 l=protocol_smileys;
00152
00153 found=0;
00154
00155 while(l!=NULL)
00156 {
00157 protocol_smiley * ps=(protocol_smiley *)l->data;
00158 if(!strncmp(text+ipos, ps->text, strlen(ps->text)))
00159 {
00160 g_string_append(newstr, "<smiley name=\"");
00161 g_string_append(newstr, ps->name);
00162 g_string_append(newstr, "\" alt=\"");
00163 g_string_append(newstr, ps->text);
00164 g_string_append(newstr, "\">");
00165 ipos += strlen(ps->text);
00166 found=1;
00167 break;
00168 }
00169 l=l->next;
00170 }
00171 if(!found) { g_string_append_c(newstr, text[ipos++]); }
00172 }
00173
00174
00175 free(text);
00176 result = newstr->str;
00177 g_string_free(newstr, FALSE);
00178
00179 return result;
00180 }
|
|
|
Definition at line 207 of file smileys.c. References smiley_struct::name, and smileys. Referenced by show_smileys_callback().
|
|
|
|
Definition at line 45 of file smileys.h. Referenced by build_chat_prefs(), cancel_chat_prefs(), eb_read_prefs(), and write_chat_prefs(). |
|
|
Definition at line 25 of file smileys.h. Referenced by get_smiley_by_name(), and init_smileys(). |