Mercurial > pidgin
view plugins/crazychat/models.c @ 12468:6faefbebcd24
[gaim-migrate @ 14778]
SF Patch #1372898 from charkins
"This patch updates the unseen conversation api in
gtkconv to ensure consistancy and avoid code
duplication. The ...first_unseen() function is renamed
and expanded to return a list of conversations that
match the specified criteria. A max_count parameter is
used to allow this to short circuit early (using 1
gives old behavior). An additional flag was added to
allow this function to only consider hidden
conversations (used by the buddy list). The blist is
currently inconsistant in which conversations it loops
over for showing the menu tray icon, creating the
tooltip and the unseen menu. This patch fixes that.
The ...find_unseen_list() now handles contact-aware
conversations correctly as well (based on sadrul's
patches in #1362579 which are obsoleted by this patch).
I also included the fix from #1362579 which increments
unseen_count only when state>=UNSEEN_TEXT."
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Mon, 12 Dec 2005 18:59:29 +0000 |
| parents | ed017b9c532d |
| children |
line wrap: on
line source
#include"glm.h" #include <GL/gl.h> #include <GL/glu.h> #include "face.h" #define ASCII_DIGITS 48 void init_lists(GLint** lists, GLMmodel*** models, int num_lists, char* name, float my_scale){ int i; char c; GLint* temp_lists; GLMmodel** temp_models; char* temp = (char*)malloc(sizeof(char) * (strlen(name) + strlen(".obj" + 3))); GLMmodel* model; float dum; temp_lists = (GLint*)malloc(sizeof(GLint) * num_lists); temp_models = (GLMmodel**)malloc(sizeof(GLMmodel*) * num_lists); for(i=0;i<num_lists;i++) { strcpy(temp, name); if(i<10){ c = (char)(ASCII_DIGITS+i); strncat(temp, &c, 1); } else{ c = (char)(i/10+ASCII_DIGITS); strncat(temp, &c, 1); c = (char)(i%10 + ASCII_DIGITS); strncat(temp, &c, 1); } strcat(temp, ".obj"); temp_models[i]=glmReadOBJ(temp); glmScale(temp_models[i], my_scale); dum =glmUnitize(temp_models[i]); // this actually just centers //printf("%s factor %f", temp, dum); temp_lists[i]=glmList(temp_models[i], GLM_SMOOTH); } *lists = temp_lists; *models = temp_models; free(temp); } int compute_lid(BOOL open, int curr_lid, int max){ if(open) { if(curr_lid < max){ curr_lid++; } else curr_lid=max; } else { if(curr_lid >=2){ curr_lid-=2; } else if(curr_lid==1){ curr_lid--; } curr_lid=0; } return curr_lid; } void apply_output_mode(FACE f, GLfloat* angle, GLfloat* yangle, BOOL* left_open, BOOL* right_open, GLfloat* open, DIRECTION* dir) { struct doggy_struct* dog = (struct doggy_struct*)f->char_struct; if(f->my_mode==NORMAL){ f->curr_z_angle=0; return; } if(f->my_mode==CRAZY1){ f->curr_z_angle = f->curr_z_angle+ANGLE_INC; *angle = f->curr_z_angle; } }
