src/conversation.c

changeset 816
9c30fbc83739
parent 815
0e1f49ff7e69
child 819
9def37f1d66e
equal deleted inserted replaced
815:0e1f49ff7e69 816:9c30fbc83739
996 } else if (!strncmp(m, ":p", 2) || 996 } else if (!strncmp(m, ":p", 2) ||
997 !strncmp(m, ":P", 2)) { 997 !strncmp(m, ":P", 2)) {
998 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], tongue_xpm); 998 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], tongue_xpm);
999 } 999 }
1000 1000
1001 if (face || strlen(m) < 3) { 1001 if (face || strlen(m) < 3) return face;
1002 gdk_bitmap_unref(mask);
1003 return face;
1004 }
1005
1006 *len = 3; 1002 *len = 3;
1007 if ( !strncmp(m, ":-)", 3)) { 1003 if ( !strncmp(m, ":-)", 3)) {
1008 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], smile_xpm); 1004 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], smile_xpm);
1009 } else if (!strncmp(m, "O-)", 3)) { 1005 } else if (!strncmp(m, "O-)", 3)) {
1010 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], oneeye_xpm); 1006 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], oneeye_xpm);
1040 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], crossedlips_xpm); 1036 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], crossedlips_xpm);
1041 } else if (!strncmp(m, ":-D", 3)) { 1037 } else if (!strncmp(m, ":-D", 3)) {
1042 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], bigsmile_xpm); 1038 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], bigsmile_xpm);
1043 } 1039 }
1044 1040
1045 if (face || strlen(m) < 4) { 1041 if (face || strlen(m) < 4) return face;
1046 gdk_bitmap_unref(mask);
1047 return face;
1048 }
1049
1050 *len = 4; 1042 *len = 4;
1051 if ( !strncmp(m, "O:-)", 4)) { 1043 if ( !strncmp(m, "O:-)", 4)) {
1052 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], angel_xpm); 1044 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], angel_xpm);
1053 } 1045 }
1054 else if (!strncmp(m, "C:-)", 4)) { 1046 else if (!strncmp(m, "C:-)", 4)) {
1055 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], luke03_xpm); 1047 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], luke03_xpm);
1056 } 1048 }
1057 1049
1058 if (face || strlen(m) < 6) { 1050 if (face || strlen(m) < 6) return face;
1059 gdk_bitmap_unref(mask);
1060 return face;
1061 }
1062
1063 *len = 6; 1051 *len = 6;
1064 if ( !strncmp(m, "&gt;:o", 6)) { 1052 if ( !strncmp(m, "&gt;:o", 6)) {
1065 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], yell_xpm); 1053 face = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->base[GTK_STATE_NORMAL], yell_xpm);
1066 } 1054 }
1067 1055
1068 if (face) gdk_bitmap_unref(mask);
1069 return face; 1056 return face;
1070 } 1057 }
1071 1058
1072 void write_html_with_smileys(GtkWidget *window, GtkWidget *html, char *what) 1059 void write_html_with_smileys(GtkWidget *window, GtkWidget *html, char *what)
1073 { 1060 {

mercurial