⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pref-windows-callbacks.c

📁 一个功能全面的电子邮件客户端
💻 C
📖 第 1 页 / 共 3 页
字号:
void prefs_server_bpe(GtkWidget *widget, GdkEvent *event, gpointer data) {        if (event->type == GDK_BUTTON_PRESS) return;	prefs_edit_account (NULL, NULL);}void paned_pos_rehash() {	if (!tm_globs->ppos.mnw_hp1) tm_globs->ppos.mnw_hp1 = 186;	if (!tm_globs->ppos.mnw_vp1) tm_globs->ppos.mnw_vp1 = 161;	if (!tm_globs->ppos.mnw_vp2) tm_globs->ppos.mnw_vp2 = 175;	if (!tm_globs->ppos.msgw_vp1) tm_globs->ppos.msgw_vp1 = 150;	gtk_paned_set_position(GTK_PANED(lookup_widget(GTK_WIDGET(tm_globs->main_window),"hpaned1")),tm_globs->ppos.mnw_hp1);	gtk_paned_set_position(GTK_PANED(lookup_widget(GTK_WIDGET(tm_globs->main_window),"vpaned1")),tm_globs->ppos.mnw_vp1);	gtk_paned_set_position(GTK_PANED(lookup_widget(GTK_WIDGET(tm_globs->main_window),"mime_vpaned")),tm_globs->ppos.mnw_vp2);}void paned_pos_set(char *ppos) {  char *cs;  char *orph ;  if ((atoi(orph=cut_string(ppos,' ',1,1))) >= 0) {    free( orph ) ;    cs = cut_string(ppos,' ',1,2);    tm_globs->ppos.mnw_hp1=atoi(orph=cut_string(cs,' ',2,1));    free( orph ) ;    free (cs);    cs = cut_string(ppos,' ',1,3);    tm_globs->ppos.mnw_vp1=atoi(orph=cut_string(cs,' ',2,2));    free( orph ) ;    free (cs);    cs = cut_string(ppos,' ',1,4);    tm_globs->ppos.mnw_vp2=atoi(orph=cut_string(cs,' ',2,3));    free( orph ) ;    free (cs);    tm_globs->ppos.msgw_vp1=atoi(orph=cut_string(ppos,' ',2,4));    free( orph ) ;  } else {    free( orph ) ;  }}void window_sizes_set (char *sizes) {  char *cs;  char *orph ;  if ((atoi(orph=cut_string(sizes,' ',1,1))) >= 0) {    free( orph ) ;    cs = cut_string(sizes,' ',1,2);    tm_globs->wsize.main_window.x=atoi(orph=cut_string(cs,' ',2,1));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,3);    tm_globs->wsize.main_window.y=atoi(orph=cut_string(cs,' ',2,2));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,4);    tm_globs->wsize.new_message_window.x=atoi(orph=cut_string(cs,' ',2,3));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,5);    tm_globs->wsize.new_message_window.y=atoi(orph=cut_string(cs,' ',2,4));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,6);    tm_globs->wsize.message_window.x=atoi(orph=cut_string(cs,' ',2,5));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,7);    tm_globs->wsize.message_window.y=atoi(orph=cut_string(cs,' ',2,6));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,8);    tm_globs->wsize.calendar_window.x=atoi(orph=cut_string(cs,' ',2,7));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,9);    tm_globs->wsize.calendar_window.y=atoi(orph=cut_string(cs,' ',2,8));    free( orph ) ;    free (cs);    cs = cut_string(sizes,' ',1,10);    tm_globs->wsize.msearch_window.x=atoi(orph=cut_string(cs,' ',2,9));    free( orph ) ;    free (cs);    tm_globs->wsize.msearch_window.y=atoi(orph=cut_string(sizes,' ',2,10));    free( orph ) ;  }  return ;}void clist_pos_rehash() {	GtkWidget *fl=lookup_widget(tm_globs->main_window,"folder_tree");	GtkWidget *fl2=lookup_widget(tm_globs->main_window,"folder_ntree");	GtkWidget *msg=lookup_widget(tm_globs->main_window,"message_clist");	GtkWidget *mime=lookup_widget(tm_globs->main_window,"mime_clist");	int i;	if (!fl) return;	if (!tm_globs->cpos.mw_fl[0]) tm_globs->cpos.mw_fl[0] = 122;	if (!tm_globs->cpos.mw_fl[1]) tm_globs->cpos.mw_fl[1] = 20;	if (!tm_globs->cpos.mw_fl[2]) tm_globs->cpos.mw_fl[2] = 16;	if (!tm_globs->cpos.mw_msg[0]) tm_globs->cpos.mw_msg[0] = 17;	if (!tm_globs->cpos.mw_msg[1]) tm_globs->cpos.mw_msg[1] = 17;	if (!tm_globs->cpos.mw_msg[2]) tm_globs->cpos.mw_msg[2] = 150;	if (!tm_globs->cpos.mw_msg[3]) tm_globs->cpos.mw_msg[3] = 100;	if (!tm_globs->cpos.mw_msg[4]) tm_globs->cpos.mw_msg[4] = 100;	if (!tm_globs->cpos.mw_msg[5]) tm_globs->cpos.mw_msg[5] = 100;	if (!tm_globs->cpos.mw_mime[0]) tm_globs->cpos.mw_mime[0] = 91;	if (!tm_globs->cpos.mw_mime[1]) tm_globs->cpos.mw_mime[1] = 150;	if (!tm_globs->cpos.mw_mime[2]) tm_globs->cpos.mw_mime[2] = 23;	if (!tm_globs->cpos.msgw[0]) tm_globs->cpos.msgw[0] = 142;	if (!tm_globs->cpos.msgw[1]) tm_globs->cpos.msgw[1] = 201;	if (!tm_globs->cpos.msgw[2]) tm_globs->cpos.msgw[2] = 114;	if (!tm_globs->cpos.nmsgw[0]) tm_globs->cpos.nmsgw[0] = 133;	if (!tm_globs->cpos.nmsgw[1]) tm_globs->cpos.nmsgw[1] = 185;	if (!tm_globs->cpos.nmsgw[2]) tm_globs->cpos.nmsgw[2] = 134;	if (!tm_globs->cpos.ab[0]) tm_globs->cpos.ab[0] = 173;	if (!tm_globs->cpos.ab[1]) tm_globs->cpos.ab[1] = 173;        if (!tm_globs->cpos.msw[0]) tm_globs->cpos.msw[0] = 17;        if (!tm_globs->cpos.msw[1]) tm_globs->cpos.msw[1] = 17;        if (!tm_globs->cpos.msw[2]) tm_globs->cpos.msw[2] = 150;        if (!tm_globs->cpos.msw[3]) tm_globs->cpos.msw[3] = 100;        if (!tm_globs->cpos.msw[4]) tm_globs->cpos.msw[4] = 100;        if (!tm_globs->cpos.msw[5]) tm_globs->cpos.msw[5] = 100;	for (i=0;i<3;i++) {		gtk_clist_set_column_width (GTK_CLIST (fl), i, tm_globs->cpos.mw_fl[i]);		gtk_clist_set_column_width (GTK_CLIST (fl2), i, tm_globs->cpos.mw_fl[i]);        }	for (i=0;i<6;i++)		gtk_clist_set_column_width (GTK_CLIST (msg), i, tm_globs->cpos.mw_msg[i]);	for (i=0;i<3;i++)		gtk_clist_set_column_width (GTK_CLIST (mime), i, tm_globs->cpos.mw_mime[i]);}void clist_pos_set (char *pos) {  char *cs;  char *orph ;  if ((atoi(orph=cut_string(pos,' ',1,1))) >= 0) {    free( orph ) ;    cs = cut_string(pos,' ',1,2);    tm_globs->cpos.mw_fl[0] = atoi(orph=cut_string(cs,' ',2,1));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,3);    tm_globs->cpos.mw_fl[1] = atoi(orph=cut_string(cs,' ',2,2));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,4);    tm_globs->cpos.mw_fl[2] = atoi(orph=cut_string(cs,' ',2,3));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,5);    tm_globs->cpos.mw_msg[0] = atoi(orph=cut_string(cs,' ',2,4));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,6);    tm_globs->cpos.mw_msg[1] = atoi(orph=cut_string(cs,' ',2,5));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,7);    tm_globs->cpos.mw_msg[2] = atoi(orph=cut_string(cs,' ',2,6));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,8);    tm_globs->cpos.mw_msg[3] = atoi(orph=cut_string(cs,' ',2,7));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,9);    tm_globs->cpos.mw_msg[4] = atoi(orph=cut_string(cs,' ',2,8));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,10);    tm_globs->cpos.mw_msg[5] = atoi(orph=cut_string(cs,' ',2,9));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,11);    tm_globs->cpos.mw_mime[0] = atoi(orph=cut_string(cs,' ',2,10));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,12);    tm_globs->cpos.mw_mime[1] = atoi(orph=cut_string(cs,' ',2,11));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,13);    tm_globs->cpos.mw_mime[2] = atoi(orph=cut_string(cs,' ',2,12));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,14);    tm_globs->cpos.msgw[0] = atoi(orph=cut_string(cs,' ',2,13));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,15);    tm_globs->cpos.msgw[1] = atoi(orph=cut_string(cs,' ',2,14));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,16);    tm_globs->cpos.msgw[2] = atoi(orph=cut_string(cs,' ',2,15));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,17);    tm_globs->cpos.nmsgw[0] = atoi(orph=cut_string(cs,' ',2,16));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,18);    tm_globs->cpos.nmsgw[1] = atoi(orph=cut_string(cs,' ',2,17));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,19);    tm_globs->cpos.nmsgw[2] = atoi(orph=cut_string(cs,' ',2,18));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,20);    tm_globs->cpos.ab[0] = atoi(orph=cut_string(cs,' ',2,19));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,21);    tm_globs->cpos.ab[1] = atoi(orph=cut_string(cs,' ',2,20));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,22);    tm_globs->cpos.msw[0] = atoi(orph=cut_string(cs,' ',2,21));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,23);    tm_globs->cpos.msw[1] = atoi(orph=cut_string(cs,' ',2,22));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,24);    tm_globs->cpos.msw[2] = atoi(orph=cut_string(cs,' ',2,23));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,25);    tm_globs->cpos.msw[3] = atoi(orph=cut_string(cs,' ',2,24));    free( orph ) ;    free (cs);    cs = cut_string(pos,' ',1,26);    tm_globs->cpos.msw[4] = atoi(orph=cut_string(cs,' ',2,25));    free( orph ) ;    free (cs);    tm_globs->cpos.msw[5] = atoi(orph=cut_string(pos,' ',2,26));    free( orph ) ;  }}void window_sizes_rehash() {	if (!tm_globs->wsize.main_window.x) tm_globs->wsize.main_window.x = 620;	if (!tm_globs->wsize.main_window.y) tm_globs->wsize.main_window.y = 440;        if (!tm_globs->wsize.message_window.x) tm_globs->wsize.message_window.x = 500;        if (!tm_globs->wsize.message_window.y) tm_globs->wsize.message_window.y = 440;        if (!tm_globs->wsize.new_message_window.x) tm_globs->wsize.new_message_window.x = 500;        if (!tm_globs->wsize.new_message_window.y) tm_globs->wsize.new_message_window.y = 440;        if (!tm_globs->wsize.calendar_window.x) tm_globs->wsize.calendar_window.x = 620;        if (!tm_globs->wsize.calendar_window.y) tm_globs->wsize.calendar_window.y = 440;        if (!tm_globs->wsize.msearch_window.x) tm_globs->wsize.msearch_window.x = 540;        if (!tm_globs->wsize.msearch_window.y) tm_globs->wsize.msearch_window.y = 400;	gtk_window_set_default_size(GTK_WINDOW(tm_globs->main_window),tm_globs->wsize.main_window.x, tm_globs->wsize.main_window.y);}void wsize_set_msw(GtkWidget *widget, GdkEvent *event, gpointer data) {        tm_globs->wsize.msearch_window.x = widget->allocation.width;        tm_globs->wsize.msearch_window.y = widget->allocation.height;}void wsize_set_mnw(GtkWidget *widget, GdkEvent *event, gpointer data) {	tm_globs->wsize.main_window.x = widget->allocation.width;	tm_globs->wsize.main_window.y = widget->allocation.height;}void wsize_set_msgw(GtkWidget *widget, GdkEvent *event, gpointer data) {        tm_globs->wsize.message_window.x = widget->allocation.width;        tm_globs->wsize.message_window.y = widget->allocation.height;}void wsize_set_nmsgw(GtkWidget *widget, GdkEvent *event, gpointer data) {        tm_globs->wsize.new_message_window.x = widget->allocation.width;        tm_globs->wsize.new_message_window.y = widget->allocation.height;}void wsize_set_calw(GtkWidget *widget, GdkEvent *event, gpointer data) {        tm_globs->wsize.calendar_window.x = widget->allocation.width;        tm_globs->wsize.calendar_window.y = widget->allocation.height;}void ppos_set_mnw(GtkWidget *widget, GdkEvent *event, gpointer data) {	GtkWidget *window=tm_globs->main_window;	GtkWidget *hp1=lookup_widget(window,"hpaned1");	GtkWidget *vp1=lookup_widget(window,"vpaned1");	GtkWidget *vp2=lookup_widget(window,"mime_vpaned");	tm_globs->ppos.mnw_hp1 = GTK_PANED(hp1)->handle_xpos;	tm_globs->ppos.mnw_vp1 = GTK_PANED(vp1)->handle_ypos;	tm_globs->ppos.mnw_vp2 = GTK_PANED(vp2)->handle_ypos;}void ppos_set_msgw(GtkWidget *widget, GdkEvent *event, gpointer data) {	tm_globs->ppos.msgw_vp1 = GTK_PANED(widget)->handle_ypos;}void cpos_set_msw(GtkCList *clist, gint column, gint width, gpointer data) {        tm_globs->cpos.msw[column] = width;}void cpos_set_mnw_fl(GtkCList *clist, gint column, gint width, gpointer data) {	tm_globs->cpos.mw_fl[column] = width;}void cpos_set_mnw_msg(GtkCList *clist, gint column, gint width, gpointer data) {	tm_globs->cpos.mw_msg[column] = width;}void cpos_set_mnw_mime(GtkCList *clist, gint column, gint width, gpointer data) {	tm_globs->cpos.mw_mime[column] = width;}void cpos_set_msgw(GtkCList *clist, gint column, gint width, gpointer data) {	tm_globs->cpos.msgw[column] = width;}void cpos_set_nmsgw(GtkCList *clist, gint column, gint width, gpointer data) {	tm_globs->cpos.nmsgw[column] = width;}void cpos_set_ab(GtkCList *clist, gint column, gint width, gpointer data) {	tm_globs->cpos.ab[column] = width;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -