TBool CTraficStatisticWindow::DoPeriodTask() { if (iMultiText!=NULL) { RemoveControl(iMultiText); InitSelectGroup();//刷新流量显示数字 } return true; }
void CDownloadHistorySettingWindow::ConstructL() { ChangeButton(); TFileName path; path.Append(iMainEngine.GetAppPath()); path.Append(_L("systemManage.txt")); iRes=CFileReadByRow::NewL(); iRes->LoadItem(path); iMainEngine.ControlFactory().SetParentWindow(this); iMainEngine.ControlFactory().CreateDefaultTitleBarL((*iRes->iItem)[ESystemManageRes_DownloadHistory_Setting]); InitSelectGroup(); }
void CTraficStatisticWindow::ConstructL() { ChangeButton(); iTimer=CNotifyTimer::NewL(*this); i=0; TFileName path; path.Append(iMainEngine.GetAppPath()); path.Append(_L("systemManage.txt")); iRes=CFileReadByRow::NewL(); iRes->LoadItem(path); iMainEngine.ControlFactory().SetParentWindow(this); iMainEngine.ControlFactory().CreateDefaultTitleBarL((*iRes->iItem)[ESystemManageRes_Connecttion_Traffic]); InitSelectGroup(); }
void CSelectBoxView::DoActivateL() { InitSelectGroup(); }
/* ** GUI Handler: Called when "custom" mapedit widget should be created */ GtkWidget *mapedit_create_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { struct MCMap *mapeditmap; GtkWidget *mapwidget=NULL; GtkArg mapedarg[11], *args = mapedarg; errormsg(MAPDEBUG1,"mapedit_create_new: Entered"); if (int1!=MPEDIT) { mapeditmap = g_malloc0(sizeof(struct MCMap)); if (!mapeditmap) { printf("Could not allocate memory for mapeditmap\n"); CloseAll(); exit(20); } } #if DEBUGLEV > 2 errormsg(MAPDEBUG3,"mapedit_create_new: widget_name=%s=%x, int1=%d, " "mapeditmap=%x ",widget_name, widget_name, int1, mapeditmap); #endif mapedarg[0].type = MAPEDIT_MapPieces; GTK_VALUE_POINTER(mapedarg[0]) = mMapPieces; mapedarg[1].type = MAPEDIT_PWidth; GTK_VALUE_UINT(mapedarg[1]) = 37; mapedarg[2].type = MAPEDIT_PLength; GTK_VALUE_UINT(mapedarg[2]) = 13; mapedarg[3].type = MAPEDIT_Default; GTK_VALUE_POINTER(mapedarg[3]) = &mDefault; mapedarg[4].type = MAPEDIT_MapWidth; GTK_VALUE_UINT(mapedarg[4]) = SELXSIZE; mapedarg[5].type = MAPEDIT_MapLength; GTK_VALUE_UINT(mapedarg[5]) = SELYSIZE; mapedarg[6].type = MAPEDIT_MapLayer; GTK_VALUE_UCHAR(mapedarg[6]) = 1; mapedarg[7].type = MAPEDIT_Map; GTK_VALUE_POINTER(mapedarg[7]) = mapeditmap; mapedarg[8].type = MAPEDIT_GetPieces; GTK_VALUE_BOOL(mapedarg[8]) = TRUE; mapedarg[9].type = MAPEDIT_Frame; GTK_VALUE_BOOL(mapedarg[9]) = TRUE; mapedarg[10].type = MAPEDIT_FrameSpace; GTK_VALUE_UCHAR(mapedarg[10]) = 4; errormsg(MAPDEBUG3,"mapedit_create_new: args=%x, args[0]=%x, args[1].type=%d",args,args[2].type,MAPEDIT_PWidth); switch(int1) { case MPGR1: InitSelectGroup(mapeditmap,0); TestMEdWindowObjs[WO_MPGRP1]=MapEditClassNew(args, 11); mapwidget=TestMEdWindowObjs[WO_MPGRP1]; break; case MPGR2: InitSelectGroup(mapeditmap,SELXSIZE*SELYSIZE); TestMEdWindowObjs[WO_MPGRP2]=MapEditClassNew(args, 11); mapwidget=TestMEdWindowObjs[WO_MPGRP2]; break; case MPGR3: InitSelectGroup(mapeditmap,SELXSIZE*SELYSIZE*2); TestMEdWindowObjs[WO_MPGRP3]=MapEditClassNew(args, 11); mapwidget=TestMEdWindowObjs[WO_MPGRP3]; break; case MPEDIT: mapedarg[4].type = MAPEDIT_MapWidth; GTK_VALUE_UINT(mapedarg[4]) = 40; mapedarg[5].type = MAPEDIT_MapLength; GTK_VALUE_UINT(mapedarg[5]) = 80; GTK_VALUE_UCHAR(mapedarg[6]) = 2; // 2 Layers! TestMEdWindowObjs[WO_EDIT]=MapEditClassNew(args, 7); mapwidget=TestMEdWindowObjs[WO_EDIT]; break; } errormsg(MAPDEBUG3,"mapedit_create_new: mapwidget=%x",mapwidget); errormsg(MAPDEBUG1,"mapedit_create_new: Finished succesfully"); return mapwidget; }