incubator-bluesky-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r885392 [24/25] - in /incubator/bluesky/trunk/RealClass: Student/src/ Teacher/ Teacher/autom4te.cache/ Teacher/src/ Teacher/src/.deps/ Teacher/src/pic/
Date Mon, 30 Nov 2009 12:01:26 GMT
Added: incubator/bluesky/trunk/RealClass/Teacher/src/interface.cc
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/interface.cc?rev=885392&view=auto
==============================================================================
--- incubator/bluesky/trunk/RealClass/Teacher/src/interface.cc (added)
+++ incubator/bluesky/trunk/RealClass/Teacher/src/interface.cc Mon Nov 30 12:01:23 2009
@@ -0,0 +1,2019 @@
+/** \file interface.cc implemantaion for GUI gadgets
+*
+*
+*Licensed to the Apache Software Foundation (ASF) under one
+*or more contributor license agreements.  See the NOTICE file
+*distributed with this work for additional information
+*regarding copyright ownership.  The ASF licenses this file
+*to you under the Apache License, Version 2.0 (the
+*"License"); you may not use this file except in compliance
+*with the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+*Unless required by applicable law or agreed to in writing,
+*software distributed under the License is distributed on an
+*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*KIND, either express or implied.  See the License for the
+*specific language governing permissions and limitations
+*under the License. 
+*/
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+#include <stdlib.h>
+#include <iostream.h> 
+
+#include "callbacks.hh"
+#include "interface.hh"
+#include "support.hh"
+#include "trcclient.hh"
+
+#include "languagechoose.h" 
+#include "en_de_audio.h"
+#include "en_de_video.h"
+#include "en_de_screen.h"
+
+#include "errorinfo.h"
+
+#include <gdk/gdkx.h> 
+
+extern CVideoReceiver g_studet_videoreceiver;
+extern CAudioReceiver g_student_audioreceiver;
+
+extern struct entry_setpara ncteacher_get_para;
+extern struct entry_usepara ncteacher_get_user;
+
+struct CRCLTeacherLogin teachlogin;
+
+GtkWidget *file_entry;//check
+GtkWidget *enlocalip;//localIP
+
+GtkWidget *enserverip;//serverIP
+GtkWidget *enserverport;//serverPort
+GtkWidget *username;
+GtkWidget *passport;
+GtkWidget *creatclass;
+GtkWidget *stopclass;
+GtkWidget *login;
+GtkWidget *exitsys;
+GtkWidget *set_item;
+GtkWidget *classEntry;
+GtkWidget *audioEntry;
+GtkWidget *videoEntry;
+GtkWidget *modetech;
+GtkWidget *modecomu;
+
+GtkWidget *set_toolbutton;
+GtkWidget *join_toolbutton;
+GtkWidget *exit_toolbutton;
+GtkWidget *creat_toolbutton;
+GtkWidget *cancel_toolbutton;
+GtkWidget *tech_toolbutton;
+GtkWidget *commu_toolbutton;
+GtkWidget *allow_chat_toolbutton;
+GtkWidget *rec_toolbutton;
+GtkWidget *student_list_label;
+GtkWidget *student_clist;
+
+GtkWidget *concentrate_add_button;
+GtkWidget *concentrate_concel_button;
+
+GtkTextBuffer *commu_buffer;
+GtkTextIter commu_end;
+GtkTextIter commu_start;
+GtkWidget *chat_button;
+
+GtkWidget *studentimage;
+GtkWidget *teacherimage;
+
+GtkWidget *chat_entry;
+GtkAdjustment *adj;
+GtkWidget *commu_textview;
+
+GtkWidget *review_image;
+GtkWidget *combobox4;
+GtkWidget *combobox5;
+GtkWidget *rec_delay_set_dialog;
+extern int g_work_mode;
+extern int g_video_mode;
+extern int g_VideoDevCount;
+extern char g_DevName[10][32];
+const char *classcenterIP;
+const char *classcenterport;
+int v4l_dev_num = 0;
+CRCLCreateGroup CreateGroup;
+
+GtkWidget*
+create_window1(void)
+{
+
+	GtkWidget *window1;
+	GtkWidget *vbox20;
+	GtkWidget *main_menubar;
+	GtkWidget *system;
+	GtkWidget *system_menu;
+	GtkWidget *_________1;
+	GtkWidget *modechge;
+	GtkWidget *modechge_menu;
+	GtkWidget *see;
+	GtkWidget *see_menu;
+	GtkWidget *stuimg;
+	GtkWidget *techimg;
+	GtkWidget *vbox21;
+	GtkWidget *main_toolbar;
+	GtkIconSize tmp_toolbar_icon_size;
+	GtkWidget *toolitem1;
+	GtkWidget *toolbar_label1;
+	GtkWidget *tmp_image;
+	GtkWidget *toolitem2;
+	GtkWidget *toolbar_label2;
+	GtkWidget *toolitem3;
+	GtkWidget *toolbar_label3;
+	GtkWidget *toolitem4;
+	GtkWidget *toolbar_label4;
+	GtkWidget *toolitem5;
+	GtkWidget *toolbar_label5;
+	GtkWidget *toolitem6;
+	GtkWidget *toolbar_label6;
+	GtkWidget *toolitem7;
+	GtkWidget *toolbar_label7;
+	GtkWidget *toolitem8;
+	GtkWidget *toolbar_label8;
+	GtkWidget *vbox22;
+	GtkWidget *hbox37;
+	GtkWidget *vbox25;
+	GtkWidget *student_frame;
+	GtkWidget *alignment14;
+	GtkWidget *scrolledwindow8;
+	GtkWidget *student_id_label;
+	GtkWidget *student_name_label;
+	GtkWidget *commu_status_label;
+	GtkWidget *vbox28;
+	GtkWidget *vbox29;
+	GtkWidget *vbox30;
+	GtkWidget *vbox31;
+	GtkWidget *vbox32;
+	GtkWidget *concentrate_label3;
+	GtkWidget *vbox33;
+	GtkWidget *hbox43;
+	GtkWidget *concentrate_label1;
+	GtkWidget *concentrate_label2;
+	GtkWidget *concentrate_label4;
+	GtkWidget *vbox24;
+	GtkWidget *text_frame;
+	GtkWidget *alignment13;
+	GtkWidget *scrolledwindow7;
+	GtkWidget *clearitem;
+	GtkWidget *clearitem_menu;
+	GtkWidget *clearchat_item;
+	GtkWidget *commu_text_label;
+	GtkWidget *hbox38;
+	GtkWidget *hbox39;
+	GtkWidget *commun_label1;
+	GtkWidget *hbox40;
+	GtkWidget *hbox41;
+	GtkWidget *commu_label2;
+	GtkWidget *vbox27;
+	GtkWidget *commu_label3;
+	GtkWidget *label61;
+	GtkWidget *vbox23;
+	GtkWidget *statusbar1;
+
+	GtkTooltips *tooltips;
+	GtkWidget *choose;
+	GtkWidget *choose_menu;
+	GtkWidget *choose_item;
+	GtkWidget *toolitem9;
+	GtkWidget *label87;
+	GtkWidget *work_mode;
+	GdkScreen *ServerScreen;
+	int iHeight;
+	int iWidth;
+	ServerScreen = gdk_screen_get_default();
+	iHeight = gdk_screen_get_height(ServerScreen);
+	iWidth = gdk_screen_get_width(ServerScreen);
+	if (iHeight > 600 || iWidth > 800)
+	{
+		printf("Error:screen's resolution is big!\n");
+		Error_dia(ERROR023, ERROR_S023);
+
+	}
+	if (iHeight < 600 || iWidth < 800)
+	{
+		printf("Error:screen's resolution is small!\n");
+		Error_dia(ERROR024, ERROR_S024);
+		return NULL;
+	}
+
+	tooltips = gtk_tooltips_new();
+
+	window1 = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gtk_widget_set_size_request(window1, 770, 520);
+	gtk_window_set_title(GTK_WINDOW(window1), ptitle);
+	gtk_window_set_resizable(GTK_WINDOW(window1), FALSE);
+
+	vbox20 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox20);
+	gtk_container_add(GTK_CONTAINER(window1), vbox20);
+
+	main_menubar = gtk_menu_bar_new();
+	gtk_widget_show(main_menubar);
+	gtk_box_pack_start(GTK_BOX(vbox20), main_menubar, FALSE, FALSE, 0);
+
+	system = gtk_menu_item_new_with_mnemonic(psys);
+	gtk_widget_show(system);
+	gtk_container_add(GTK_CONTAINER(main_menubar), system);
+
+	system_menu = gtk_menu_new();
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(system), system_menu);
+
+	creatclass = gtk_menu_item_new_with_mnemonic(pcreat);
+	gtk_widget_show(creatclass);
+	gtk_container_add(GTK_CONTAINER(system_menu), creatclass);
+	gtk_widget_set_sensitive(creatclass, FALSE);
+
+	stopclass = gtk_menu_item_new_with_mnemonic(pstop);
+	gtk_widget_show(stopclass);
+	gtk_container_add(GTK_CONTAINER(system_menu), stopclass);
+	gtk_widget_set_sensitive(stopclass, FALSE);
+
+	set_item = gtk_menu_item_new_with_mnemonic(pset);
+	gtk_widget_show(set_item);
+	gtk_container_add(GTK_CONTAINER(system_menu), set_item);
+
+	login = gtk_menu_item_new_with_mnemonic(plogin);
+	gtk_widget_show(login);
+	gtk_container_add(GTK_CONTAINER(system_menu), login);
+	gtk_widget_set_sensitive(login, FALSE);
+
+	_________1 = gtk_separator_menu_item_new();
+	gtk_widget_show(_________1);
+	gtk_container_add(GTK_CONTAINER(system_menu), _________1);
+	gtk_widget_set_sensitive(_________1, FALSE);
+
+	exitsys = gtk_menu_item_new_with_mnemonic(pquit);
+	gtk_widget_show(exitsys);
+	gtk_container_add(GTK_CONTAINER(system_menu), exitsys);
+
+	modechge = gtk_menu_item_new_with_mnemonic(pmodechge);
+	gtk_widget_show(modechge);
+	gtk_container_add(GTK_CONTAINER(main_menubar), modechge);
+
+	modechge_menu = gtk_menu_new();
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(modechge), modechge_menu);
+
+	modetech = gtk_menu_item_new_with_mnemonic(pmodetech);
+	gtk_widget_show(modetech);
+	gtk_container_add(GTK_CONTAINER(modechge_menu), modetech);
+	gtk_widget_set_sensitive(modetech, FALSE);
+
+	modecomu = gtk_menu_item_new_with_mnemonic(pmodecomu);
+	gtk_widget_show(modecomu);
+	gtk_container_add(GTK_CONTAINER(modechge_menu), modecomu);
+	gtk_widget_set_sensitive(modecomu, FALSE);
+
+	see = gtk_menu_item_new_with_mnemonic(pview);
+	gtk_widget_show(see);
+	gtk_container_add(GTK_CONTAINER(main_menubar), see);
+
+	see_menu = gtk_menu_new();
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(see), see_menu);
+
+	stuimg = gtk_menu_item_new_with_mnemonic(pstuimg);
+	gtk_widget_show(stuimg);
+	gtk_container_add(GTK_CONTAINER(see_menu), stuimg);
+
+	techimg = gtk_menu_item_new_with_mnemonic(ptechimg);
+	gtk_widget_show(techimg);
+	gtk_container_add(GTK_CONTAINER(see_menu), techimg);
+
+	vbox21 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox21);
+	gtk_box_pack_start(GTK_BOX(vbox20), vbox21, TRUE, TRUE, 0);
+
+	main_toolbar = gtk_toolbar_new();
+	gtk_widget_show(main_toolbar);
+	gtk_box_pack_start(GTK_BOX(vbox21), main_toolbar, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(main_toolbar, -1, 48);
+	gtk_toolbar_set_style(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_BOTH);
+	tmp_toolbar_icon_size
+			= gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar));
+
+	toolitem1 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem1);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem1);
+
+	toolbar_label1 = gtk_label_new("");
+	gtk_widget_show(toolbar_label1);
+	gtk_container_add(GTK_CONTAINER(toolitem1), toolbar_label1);
+	gtk_widget_set_size_request(toolbar_label1, 8, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-properties",
+			tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+	set_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, pstatrib);
+	gtk_widget_show(set_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), set_toolbutton);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(set_toolbutton), tooltips, p, NULL);
+
+	toolitem2 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem2);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem2);
+
+	toolbar_label2 = gtk_label_new("");
+	gtk_widget_show(toolbar_label2);
+	gtk_container_add(GTK_CONTAINER(toolitem2), toolbar_label2);
+	gtk_widget_set_size_request(toolbar_label2, 30, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-go-forward",
+			tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+
+	join_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, pjoin);
+	gtk_widget_show(join_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), join_toolbutton);
+	gtk_widget_set_sensitive(join_toolbutton, FALSE);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(join_toolbutton), tooltips, pgtk,
+			NULL);
+	gtk_widget_set_sensitive(join_toolbutton, FALSE);
+
+	toolitem3 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem3);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem3);
+
+	toolbar_label3 = gtk_label_new("");
+	gtk_widget_show(toolbar_label3);
+	gtk_container_add(GTK_CONTAINER(toolitem3), toolbar_label3);
+	gtk_widget_set_size_request(toolbar_label3, 5, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-quit", tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+
+	exit_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, pexit);
+	gtk_widget_show(exit_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), exit_toolbutton);
+	gtk_widget_set_sensitive(exit_toolbutton, FALSE);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(exit_toolbutton), tooltips, pgtk1,
+			NULL);
+	gtk_widget_set_sensitive(exit_toolbutton, FALSE);
+
+	toolitem4 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem4);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem4);
+
+	toolbar_label4 = gtk_label_new("");
+	gtk_widget_show(toolbar_label4);
+	gtk_container_add(GTK_CONTAINER(toolitem4), toolbar_label4);
+	gtk_widget_set_size_request(toolbar_label4, 30, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-yes", tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+
+	creat_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, pcrt);
+	gtk_widget_show(creat_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), creat_toolbutton);
+	gtk_widget_set_sensitive(creat_toolbutton, FALSE);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(creat_toolbutton), tooltips, pgtk2,
+			NULL);
+	gtk_widget_set_sensitive(creat_toolbutton, FALSE);
+
+	toolitem5 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem5);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem5);
+
+	toolbar_label5 = gtk_label_new("");
+	gtk_widget_show(toolbar_label5);
+	gtk_container_add(GTK_CONTAINER(toolitem5), toolbar_label5);
+	gtk_widget_set_size_request(toolbar_label5, 5, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-stop", tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+
+	cancel_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, pcancle);
+	gtk_widget_show(cancel_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), cancel_toolbutton);
+	gtk_widget_set_sensitive(cancel_toolbutton, FALSE);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(cancel_toolbutton), tooltips,
+			pgtk3, NULL);
+	gtk_widget_set_sensitive(cancel_toolbutton, FALSE);
+
+	toolitem6 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem6);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem6);
+
+	toolbar_label6 = gtk_label_new("");
+	gtk_widget_show(toolbar_label6);
+	gtk_container_add(GTK_CONTAINER(toolitem6), toolbar_label6);
+	gtk_widget_set_size_request(toolbar_label6, 30, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-edit", tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+
+	tech_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, pteach);
+	gtk_widget_show(tech_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), tech_toolbutton);
+	gtk_widget_set_sensitive(tech_toolbutton, FALSE);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(tech_toolbutton), tooltips, pgtk4,
+			NULL);
+	gtk_widget_set_sensitive(tech_toolbutton, FALSE);
+
+	toolitem7 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem7);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem7);
+
+	toolbar_label7 = gtk_label_new("");
+	gtk_widget_show(toolbar_label7);
+	gtk_container_add(GTK_CONTAINER(toolitem7), toolbar_label7);
+	gtk_widget_set_size_request(toolbar_label7, 5, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-network", tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+
+	commu_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, pcomu);
+	gtk_widget_show(commu_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), commu_toolbutton);
+	gtk_widget_set_sensitive(commu_toolbutton, FALSE);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(commu_toolbutton), tooltips, pgtk5,
+			NULL);
+	gtk_widget_set_sensitive(commu_toolbutton, FALSE);
+
+	toolitem8 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem8);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem8);
+
+	toolbar_label8 = gtk_label_new("");
+	gtk_widget_show(toolbar_label8);
+	gtk_container_add(GTK_CONTAINER(toolitem8), toolbar_label8);
+	gtk_widget_set_size_request(toolbar_label8, 9, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-dialog-warning",
+			tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+	allow_chat_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image,
+			pmodeswich);
+	gtk_widget_show(allow_chat_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), allow_chat_toolbutton);
+	gtk_widget_set_sensitive(allow_chat_toolbutton, FALSE);
+	gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(allow_chat_toolbutton), tooltips,
+			_(pchatchge), NULL);
+
+	vbox22 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox22);
+	gtk_box_pack_start(GTK_BOX(vbox21), vbox22, TRUE, TRUE, 0);
+
+	hbox37 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox37);
+	gtk_box_pack_start(GTK_BOX(vbox22), hbox37, TRUE, TRUE, 0);
+
+	vbox25 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox25);
+	gtk_box_pack_start(GTK_BOX(hbox37), vbox25, TRUE, TRUE, 0);
+
+	student_frame = gtk_frame_new(NULL);
+	gtk_widget_show(student_frame);
+	gtk_box_pack_start(GTK_BOX(vbox25), student_frame, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(student_frame, 112, 384);
+	gtk_container_set_border_width(GTK_CONTAINER(student_frame), 4);
+
+	alignment14 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment14);
+	gtk_container_add(GTK_CONTAINER(student_frame), alignment14);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment14), 0, 0, 12, 0);
+
+	scrolledwindow8 = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow8);
+	gtk_container_add(GTK_CONTAINER(alignment14), scrolledwindow8);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow8),
+			GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow8),
+			GTK_SHADOW_IN);
+
+	student_clist = gtk_clist_new(3);
+	gtk_widget_show(student_clist);
+	gtk_container_add(GTK_CONTAINER(scrolledwindow8), student_clist);
+	gtk_clist_set_column_width(GTK_CLIST(student_clist), 0, 18);
+	gtk_clist_set_column_width(GTK_CLIST(student_clist), 1, 58);
+	gtk_clist_set_column_width(GTK_CLIST(student_clist), 2, 56);
+	gtk_clist_column_titles_show(GTK_CLIST(student_clist));
+
+	student_id_label = gtk_label_new(_("ID"));
+	gtk_widget_show(student_id_label);
+	gtk_clist_set_column_widget(GTK_CLIST(student_clist), 0, student_id_label);
+
+	student_name_label = gtk_label_new(pstuname);
+	gtk_widget_show(student_name_label);
+	gtk_clist_set_column_widget(GTK_CLIST(student_clist), 1, student_name_label);
+
+	commu_status_label = gtk_label_new(pcomustat);
+	gtk_widget_show(commu_status_label);
+	gtk_clist_set_column_widget(GTK_CLIST(student_clist), 2, commu_status_label);
+
+	student_list_label = gtk_label_new(pstulist);
+	gtk_widget_show(student_list_label);
+	gtk_frame_set_label_widget(GTK_FRAME(student_frame), student_list_label);
+	gtk_label_set_use_markup(GTK_LABEL(student_list_label), TRUE);
+
+	vbox28 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox28);
+	gtk_box_pack_start(GTK_BOX(vbox25), vbox28, TRUE, TRUE, 0);
+
+	vbox29 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox29);
+	gtk_box_pack_start(GTK_BOX(vbox28), vbox29, TRUE, TRUE, 0);
+
+	vbox30 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox30);
+	gtk_box_pack_start(GTK_BOX(vbox29), vbox30, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(vbox30, 100, -1);
+
+	vbox31 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox31);
+	gtk_box_pack_start(GTK_BOX(vbox30), vbox31, TRUE, TRUE, 0);
+
+	vbox32 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox32);
+	gtk_box_pack_start(GTK_BOX(vbox31), vbox32, TRUE, TRUE, 0);
+
+	concentrate_label3 = gtk_label_new("");
+	gtk_widget_show(concentrate_label3);
+	gtk_box_pack_start(GTK_BOX(vbox32), concentrate_label3, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(concentrate_label3, -1, 9);
+
+	vbox33 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox33);
+	gtk_box_pack_start(GTK_BOX(vbox32), vbox33, TRUE, TRUE, 0);
+
+	hbox43 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox43);
+	gtk_box_pack_start(GTK_BOX(vbox33), hbox43, TRUE, TRUE, 0);
+
+	concentrate_label1 = gtk_label_new("");
+	gtk_widget_show(concentrate_label1);
+	gtk_box_pack_start(GTK_BOX(hbox43), concentrate_label1, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(concentrate_label1, 49, -1);
+
+	concentrate_add_button = gtk_button_new_with_mnemonic(padd);
+	gtk_widget_show(concentrate_add_button);
+	gtk_box_pack_start(GTK_BOX(hbox43), concentrate_add_button, FALSE, FALSE, 0);
+	gtk_widget_set_sensitive(concentrate_add_button, FALSE);
+
+	concentrate_label2 = gtk_label_new("");
+	gtk_widget_show(concentrate_label2);
+	gtk_box_pack_start(GTK_BOX(hbox43), concentrate_label2, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(concentrate_label2, 10, -1);
+
+	concentrate_concel_button = gtk_button_new_with_mnemonic(pgtk11);
+	gtk_widget_show(concentrate_concel_button);
+	gtk_box_pack_start(GTK_BOX(hbox43), concentrate_concel_button, FALSE,
+			FALSE, 0);
+	gtk_widget_set_sensitive(concentrate_concel_button, FALSE);
+
+	concentrate_label4 = gtk_label_new("");
+	gtk_widget_show(concentrate_label4);
+	gtk_box_pack_start(GTK_BOX(vbox33), concentrate_label4, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(concentrate_label4, -1, 9);
+
+	vbox24 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox24);
+	gtk_box_pack_start(GTK_BOX(hbox37), vbox24, TRUE, TRUE, 0);
+
+	text_frame = gtk_frame_new(NULL);
+	gtk_widget_show(text_frame);
+	gtk_box_pack_start(GTK_BOX(vbox24), text_frame, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(text_frame, 141, 380);
+	gtk_container_set_border_width(GTK_CONTAINER(text_frame), 4);
+
+	alignment13 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment13);
+	gtk_container_add(GTK_CONTAINER(text_frame), alignment13);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment13), 0, 0, 12, 0);
+
+	scrolledwindow7 = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow7);
+	gtk_container_add(GTK_CONTAINER(alignment13), scrolledwindow7);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow7),
+			GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow7),
+			GTK_SHADOW_IN);
+
+	adj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(
+			scrolledwindow7));
+
+	commu_textview = gtk_text_view_new();
+	gtk_widget_show(commu_textview);
+	gtk_container_add(GTK_CONTAINER(scrolledwindow7), commu_textview);
+	gtk_text_view_set_editable(GTK_TEXT_VIEW(commu_textview), FALSE);
+
+	commu_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(commu_textview));
+	gtk_text_buffer_get_end_iter(commu_buffer, &commu_end);
+
+	commu_text_label = gtk_label_new(pcommu);
+	gtk_widget_show(commu_text_label);
+	gtk_frame_set_label_widget(GTK_FRAME(text_frame), commu_text_label);
+	gtk_label_set_use_markup(GTK_LABEL(commu_text_label), TRUE);
+
+	hbox38 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox38);
+	gtk_box_pack_start(GTK_BOX(vbox24), hbox38, TRUE, TRUE, 0);
+
+	hbox39 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox39);
+	gtk_box_pack_start(GTK_BOX(hbox38), hbox39, TRUE, TRUE, 0);
+
+	commun_label1 = gtk_label_new("");
+	gtk_widget_show(commun_label1);
+	gtk_box_pack_start(GTK_BOX(hbox39), commun_label1, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(commun_label1, 12, -1);
+
+	hbox40 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox40);
+	gtk_box_pack_start(GTK_BOX(hbox39), hbox40, TRUE, TRUE, 0);
+
+	hbox41 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox41);
+	gtk_box_pack_start(GTK_BOX(hbox40), hbox41, TRUE, TRUE, 0);
+
+	chat_entry = gtk_entry_new();
+	gtk_widget_show(chat_entry);
+	gtk_box_pack_start(GTK_BOX(hbox41), chat_entry, TRUE, TRUE, 0);
+
+	commu_label2 = gtk_label_new("");
+	gtk_widget_show(commu_label2);
+	gtk_box_pack_start(GTK_BOX(hbox41), commu_label2, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(commu_label2, 5, -1);
+
+	vbox27 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox27);
+	gtk_box_pack_start(GTK_BOX(hbox40), vbox27, FALSE, FALSE, 0);
+
+	commu_label3 = gtk_label_new("");
+	gtk_widget_show(commu_label3);
+	gtk_box_pack_start(GTK_BOX(vbox27), commu_label3, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(commu_label3, -1, 12);
+
+	chat_button = gtk_button_new_with_mnemonic(pchat);
+	gtk_widget_show(chat_button);
+	gtk_box_pack_start(GTK_BOX(vbox27), chat_button, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(chat_button, 50, 26);
+	gtk_widget_set_sensitive(chat_button, FALSE);
+
+	label61 = gtk_label_new("");
+	gtk_widget_show(label61);
+	gtk_box_pack_start(GTK_BOX(hbox40), label61, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label61, 6, -1);
+
+	vbox23 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox23);
+	gtk_box_pack_start(GTK_BOX(hbox37), vbox23, TRUE, TRUE, 0);
+
+	studentimage = create_pixmap(window1, NULL);
+	gtk_widget_show(studentimage);
+	gtk_box_pack_start(GTK_BOX(vbox23), studentimage, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(studentimage, 170, -1);
+
+	teacherimage = create_pixmap(window1, NULL);
+	gtk_widget_show(teacherimage);
+	gtk_box_pack_start(GTK_BOX(vbox23), teacherimage, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(teacherimage, 170, -1);
+
+	statusbar1 = gtk_statusbar_new();
+	gtk_widget_show(statusbar1);
+	gtk_box_pack_start(GTK_BOX(vbox22), statusbar1, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(statusbar1, -1, 3);
+
+	choose = gtk_menu_item_new_with_mnemonic(pchoose);
+	gtk_widget_show(choose);
+	gtk_container_add(GTK_CONTAINER(main_menubar), choose);
+
+	choose_menu = gtk_menu_new();
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(choose), choose_menu);
+
+	choose_item = gtk_menu_item_new_with_mnemonic(pchositm);
+	gtk_widget_show(choose_item);
+	gtk_container_add(GTK_CONTAINER(choose_menu), choose_item);
+
+	work_mode = gtk_menu_item_new_with_mnemonic(pwkmode);
+	gtk_widget_show(work_mode);
+	gtk_container_add(GTK_CONTAINER(choose_menu), work_mode);
+
+	clearitem = gtk_menu_item_new_with_mnemonic(pclear);
+	gtk_widget_show(clearitem);
+	gtk_container_add(GTK_CONTAINER(main_menubar), clearitem);
+
+	clearitem_menu = gtk_menu_new();
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(clearitem), clearitem_menu);
+
+	clearchat_item = gtk_menu_item_new_with_mnemonic(pclrchat);
+	gtk_widget_show(clearchat_item);
+	gtk_container_add(GTK_CONTAINER(clearitem_menu), clearchat_item);
+
+	toolitem9 = (GtkWidget*) gtk_tool_item_new();
+	gtk_widget_show(toolitem9);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), toolitem9);
+
+	label87 = gtk_label_new("");
+	gtk_widget_show(label87);
+	gtk_container_add(GTK_CONTAINER(toolitem9), label87);
+	gtk_widget_set_size_request(label87, 10, -1);
+
+	tmp_image = gtk_image_new_from_stock("gtk-media-record",
+			tmp_toolbar_icon_size);
+	gtk_widget_show(tmp_image);
+	rec_toolbutton = (GtkWidget*) gtk_tool_button_new(tmp_image, prec);
+	gtk_widget_show(rec_toolbutton);
+	gtk_container_add(GTK_CONTAINER(main_toolbar), rec_toolbutton);
+	gtk_widget_set_sensitive(rec_toolbutton, FALSE);
+
+	g_signal_connect(G_OBJECT(window1), "destroy", G_CALLBACK(gtk_main_quit),
+			NULL);
+
+	g_signal_connect((gpointer) creatclass, "activate", G_CALLBACK(
+			on_creatclass_activate), NULL);
+	g_signal_connect((gpointer) stopclass, "activate", G_CALLBACK(
+			on_stopclass_activate), NULL);
+	g_signal_connect((gpointer) set_item, "activate", G_CALLBACK(
+			on_set_activate), NULL);
+	g_signal_connect((gpointer) login, "activate",
+			G_CALLBACK(on_login_activate), NULL);
+	g_signal_connect((gpointer) exitsys, "activate", G_CALLBACK(
+			on_exitsys_activate), window1);
+	g_signal_connect((gpointer) modetech, "activate", G_CALLBACK(
+			on_modetech_activate), NULL);
+	g_signal_connect((gpointer) modecomu, "activate", G_CALLBACK(
+			on_modecomu_activate), NULL);
+	g_signal_connect((gpointer) stuimg, "activate", G_CALLBACK(
+			on_stuimg_activate), NULL);
+	g_signal_connect((gpointer) techimg, "activate", G_CALLBACK(
+			on_techimg_activate), NULL);
+	g_signal_connect((gpointer) set_toolbutton, "clicked", G_CALLBACK(
+			on_set_toolbutton_clicked), NULL);
+	g_signal_connect((gpointer) join_toolbutton, "clicked", G_CALLBACK(
+			on_join_toolbutton_clicked), NULL);
+	g_signal_connect((gpointer) exit_toolbutton, "clicked", G_CALLBACK(
+			on_exit_toolbutton_clicked), window1);
+	g_signal_connect((gpointer) creat_toolbutton, "clicked", G_CALLBACK(
+			on_creat_toolbutton_clicked), NULL);
+	g_signal_connect((gpointer) cancel_toolbutton, "clicked", G_CALLBACK(
+			on_cancel_toolbutton_clicked), NULL);
+	g_signal_connect((gpointer) tech_toolbutton, "clicked", G_CALLBACK(
+			on_tech_toolbutton_clicked), NULL);
+	g_signal_connect((gpointer) commu_toolbutton, "clicked", G_CALLBACK(
+			on_commu_toolbutton_clicked), NULL);
+	g_signal_connect((gpointer) concentrate_add_button, "clicked", G_CALLBACK(
+			on_concentrate_add_button_clicked), NULL);
+	g_signal_connect((gpointer) concentrate_concel_button, "clicked",
+			G_CALLBACK(on_concentrate_concel_button_clicked), NULL);
+	g_signal_connect((gpointer) chat_button, "clicked", G_CALLBACK(
+			on_chat_button_clicked), chat_entry);
+
+	g_signal_connect((gpointer) chat_entry, "activate", G_CALLBACK(
+			on_chat_entry_activate), NULL);
+
+	g_signal_connect((gpointer) student_clist, "select_row", G_CALLBACK(
+			on_student_clist_select_row), NULL);
+
+	g_signal_connect((gpointer) allow_chat_toolbutton, "clicked", G_CALLBACK(
+			on_allow_chat_toolbutton_clicked), allow_chat_toolbutton);
+	g_signal_connect((gpointer) choose_item, "activate", G_CALLBACK(
+			on_choose_activate), NULL);
+	g_signal_connect((gpointer) work_mode, "activate", G_CALLBACK(
+			on_work_mode_activate), NULL);
+	g_signal_connect((gpointer) rec_toolbutton, "clicked", G_CALLBACK(
+			on_rec_toolbutton_clicked), rec_toolbutton);
+	g_signal_connect((gpointer) clearchat_item, "activate", G_CALLBACK(
+			on_clearchatitem_activate), NULL);
+	g_signal_connect(G_OBJECT(window1), "delete_event", G_CALLBACK(
+			window1_delete_event), window1);
+	return window1;
+
+}
+
+GtkWidget*
+create_para_dialog(void)
+{
+	GtkWidget *dialog1;
+	GtkWidget *dialog_vbox6;
+	GtkWidget *vbox39;
+	GtkWidget *frame12;
+	GtkWidget *alignment16;
+	GtkWidget *vbox40;
+	GtkWidget *hbox51;
+	GtkWidget *label71;
+	GtkWidget *hbox52;
+	GtkWidget *label72;
+	GtkWidget *label70;
+	GtkWidget *frame13;
+	GtkWidget *alignment17;
+	GtkWidget *vbox41;
+	GtkWidget *hbox53;
+	GtkWidget *label74;
+	GtkWidget *hbox54;
+	GtkWidget *label75;
+	GtkWidget *label73;
+	GtkWidget *hbox55;
+	GtkWidget *hbox57;
+	GtkWidget *advance_button;
+	GtkWidget *alignment20;
+	GtkWidget *hbox60;
+	GtkWidget *image5;
+	GtkWidget *label80;
+	GtkWidget *label79;
+	GtkWidget *networkcancelbutton;
+	GtkWidget *alignment18;
+	GtkWidget *hbox58;
+	GtkWidget *image3;
+	GtkWidget *label76;
+	GtkWidget *networkokbutton;
+	GtkWidget *alignment19;
+	GtkWidget *hbox59;
+	GtkWidget *image4;
+	GtkWidget *label77;
+	GtkWidget *dialog_action_area6;
+
+	dialog1 = gtk_dialog_new();
+	gtk_widget_set_size_request(dialog1, 300, 200);
+	gtk_window_set_title(GTK_WINDOW(dialog1), pgtitle);
+	gtk_window_set_modal(GTK_WINDOW(dialog1), TRUE);
+	gtk_window_set_resizable(GTK_WINDOW(dialog1), FALSE);
+	gtk_window_set_default_size(GTK_WINDOW(dialog1), 300, 200);
+	gtk_window_set_type_hint(GTK_WINDOW(dialog1), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox6 = GTK_DIALOG(dialog1)->vbox;
+	gtk_widget_show(dialog_vbox6);
+
+	vbox39 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox39);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox6), vbox39, TRUE, TRUE, 0);
+
+	frame12 = gtk_frame_new(NULL);
+	gtk_widget_show(frame12);
+	gtk_box_pack_start(GTK_BOX(vbox39), frame12, TRUE, TRUE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(frame12), 2);
+
+	alignment16 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment16);
+	gtk_container_add(GTK_CONTAINER(frame12), alignment16);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment16), 0, 0, 12, 0);
+
+	vbox40 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox40);
+	gtk_container_add(GTK_CONTAINER(alignment16), vbox40);
+
+	hbox51 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox51);
+	gtk_box_pack_start(GTK_BOX(vbox40), hbox51, TRUE, TRUE, 0);
+
+	label71 = gtk_label_new(plabe1);
+	gtk_widget_show(label71);
+	gtk_box_pack_start(GTK_BOX(hbox51), label71, FALSE, FALSE, 0);
+
+	enserverip = gtk_entry_new();
+	gtk_widget_show(enserverip);
+	gtk_box_pack_start(GTK_BOX(hbox51), enserverip, FALSE, TRUE, 0);
+	gtk_widget_set_size_request(enserverip, 120, -1);
+	gtk_entry_set_text(GTK_ENTRY(enserverip), ncteacher_get_para.serverip);
+
+	hbox52 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox52);
+	gtk_box_pack_start(GTK_BOX(vbox40), hbox52, TRUE, TRUE, 0);
+
+	label72 = gtk_label_new(plabe2);
+	gtk_widget_show(label72);
+	gtk_box_pack_start(GTK_BOX(hbox52), label72, FALSE, FALSE, 0);
+
+	enserverport = gtk_entry_new();
+	gtk_widget_show(enserverport);
+	gtk_box_pack_start(GTK_BOX(hbox52), enserverport, FALSE, TRUE, 0);
+	gtk_widget_set_size_request(enserverport, 118, -1);
+	gtk_widget_set_sensitive(enserverport, FALSE);
+	char port_tmp[50];
+	sprintf(port_tmp, "%d", ncteacher_get_para.serverport);
+	gtk_entry_set_text(GTK_ENTRY(enserverport), port_tmp);
+
+	label70 = gtk_label_new(plabe0);
+	gtk_widget_show(label70);
+	gtk_frame_set_label_widget(GTK_FRAME(frame12), label70);
+	gtk_label_set_use_markup(GTK_LABEL(label70), TRUE);
+
+	frame13 = gtk_frame_new(NULL);
+	gtk_widget_show(frame13);
+	gtk_box_pack_start(GTK_BOX(vbox39), frame13, TRUE, TRUE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(frame13), 2);
+
+	alignment17 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment17);
+	gtk_container_add(GTK_CONTAINER(frame13), alignment17);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment17), 0, 0, 12, 0);
+
+	vbox41 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox41);
+	gtk_container_add(GTK_CONTAINER(alignment17), vbox41);
+
+	hbox53 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox53);
+	gtk_box_pack_start(GTK_BOX(vbox41), hbox53, TRUE, TRUE, 0);
+
+	label74 = gtk_label_new(plabe4);
+	gtk_widget_show(label74);
+	gtk_box_pack_start(GTK_BOX(hbox53), label74, FALSE, FALSE, 0);
+
+	audioEntry = gtk_entry_new();
+	gtk_widget_show(audioEntry);
+	gtk_box_pack_start(GTK_BOX(hbox53), audioEntry, FALSE, TRUE, 0);
+	gtk_widget_set_size_request(audioEntry, 118, -1);
+	gtk_widget_set_sensitive(audioEntry, FALSE);
+	char caport_tmp[50];
+	sprintf(caport_tmp, "%d", ncteacher_get_para.audioport);
+	gtk_entry_set_text(GTK_ENTRY(audioEntry), caport_tmp);
+
+	hbox54 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox54);
+	gtk_box_pack_start(GTK_BOX(vbox41), hbox54, TRUE, TRUE, 0);
+
+	label75 = gtk_label_new(plabe5);
+	gtk_widget_show(label75);
+	gtk_box_pack_start(GTK_BOX(hbox54), label75, FALSE, FALSE, 0);
+
+	videoEntry = gtk_entry_new();
+	gtk_widget_show(videoEntry);
+	gtk_box_pack_start(GTK_BOX(hbox54), videoEntry, FALSE, TRUE, 0);
+	gtk_widget_set_size_request(videoEntry, 118, -1);
+	gtk_widget_set_sensitive(videoEntry, FALSE);
+	char cvport_tmp[50];
+	sprintf(cvport_tmp, "%d", ncteacher_get_para.videoport);
+	gtk_entry_set_text(GTK_ENTRY(videoEntry), cvport_tmp);
+
+	label73 = gtk_label_new(plabe3);
+	gtk_widget_show(label73);
+	gtk_frame_set_label_widget(GTK_FRAME(frame13), label73);
+	gtk_label_set_use_markup(GTK_LABEL(label73), TRUE);
+
+	hbox55 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox55);
+	gtk_box_pack_start(GTK_BOX(vbox39), hbox55, FALSE, FALSE, 0);
+
+	hbox57 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox57);
+	gtk_box_pack_start(GTK_BOX(hbox55), hbox57, TRUE, TRUE, 0);
+
+	advance_button = gtk_button_new();
+	gtk_widget_show(advance_button);
+	gtk_box_pack_start(GTK_BOX(hbox57), advance_button, TRUE, FALSE, 0);
+	gtk_widget_set_size_request(advance_button, 60, 25);
+
+	alignment20 = gtk_alignment_new(0.5, 0.5, 0, 0);
+	gtk_widget_show(alignment20);
+	gtk_container_add(GTK_CONTAINER(advance_button), alignment20);
+
+	hbox60 = gtk_hbox_new(FALSE, 2);
+	gtk_widget_show(hbox60);
+	gtk_container_add(GTK_CONTAINER(alignment20), hbox60);
+
+	image5 = gtk_image_new_from_stock("gtk-add", GTK_ICON_SIZE_BUTTON);
+	gtk_widget_show(image5);
+	gtk_box_pack_start(GTK_BOX(hbox60), image5, FALSE, FALSE, 0);
+
+	label80 = gtk_label_new_with_mnemonic(plabe10);
+	gtk_widget_show(label80);
+	gtk_box_pack_start(GTK_BOX(hbox60), label80, FALSE, FALSE, 0);
+
+	label79 = gtk_label_new("");
+	gtk_widget_show(label79);
+	gtk_box_pack_start(GTK_BOX(hbox57), label79, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label79, 108, -1);
+
+	networkcancelbutton = gtk_button_new();
+	gtk_widget_show(networkcancelbutton);
+	gtk_box_pack_start(GTK_BOX(hbox57), networkcancelbutton, TRUE, FALSE, 0);
+
+	alignment18 = gtk_alignment_new(0.5, 0.5, 0, 0);
+	gtk_widget_show(alignment18);
+	gtk_container_add(GTK_CONTAINER(networkcancelbutton), alignment18);
+
+	hbox58 = gtk_hbox_new(FALSE, 2);
+	gtk_widget_show(hbox58);
+	gtk_container_add(GTK_CONTAINER(alignment18), hbox58);
+
+	image3 = gtk_image_new_from_stock("gtk-cancel", GTK_ICON_SIZE_BUTTON);
+	gtk_widget_show(image3);
+	gtk_box_pack_start(GTK_BOX(hbox58), image3, FALSE, FALSE, 0);
+
+	label76 = gtk_label_new_with_mnemonic(plabe6);
+	gtk_widget_show(label76);
+	gtk_box_pack_start(GTK_BOX(hbox58), label76, FALSE, FALSE, 0);
+
+	networkokbutton = gtk_button_new();
+	gtk_widget_show(networkokbutton);
+	gtk_box_pack_start(GTK_BOX(hbox57), networkokbutton, TRUE, FALSE, 0);
+
+	alignment19 = gtk_alignment_new(0.5, 0.5, 0, 0);
+	gtk_widget_show(alignment19);
+	gtk_container_add(GTK_CONTAINER(networkokbutton), alignment19);
+
+	hbox59 = gtk_hbox_new(FALSE, 2);
+	gtk_widget_show(hbox59);
+	gtk_container_add(GTK_CONTAINER(alignment19), hbox59);
+
+	image4 = gtk_image_new_from_stock("gtk-ok", GTK_ICON_SIZE_BUTTON);
+	gtk_widget_show(image4);
+	gtk_box_pack_start(GTK_BOX(hbox59), image4, FALSE, FALSE, 0);
+
+	label77 = gtk_label_new_with_mnemonic(plabe7);
+	gtk_widget_show(label77);
+	gtk_box_pack_start(GTK_BOX(hbox59), label77, FALSE, FALSE, 0);
+
+	dialog_action_area6 = GTK_DIALOG(dialog1)->action_area;
+	gtk_widget_show(dialog_action_area6);
+	gtk_widget_set_size_request(dialog_action_area6, -1, 0);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area6),
+			GTK_BUTTONBOX_END);
+
+	g_signal_connect((gpointer) advance_button, "clicked", G_CALLBACK(
+			on_advance_button_clicked), NULL);
+	g_signal_connect((gpointer) networkcancelbutton, "clicked", G_CALLBACK(
+			on_networkcancelbutton_clicked), dialog1);
+	g_signal_connect((gpointer) networkokbutton, "clicked", G_CALLBACK(
+			on_networkokbutton_clicked), dialog1);
+
+	return dialog1;
+}
+
+GtkWidget* //login dialog
+create_login_dialog(void)
+{
+	GtkWidget *dialog2;
+	GtkWidget *dialog_vbox2;
+	GtkWidget *hbox29;
+	GtkWidget *frame10;
+	GtkWidget *alignment10;
+	GtkWidget *vbox18;
+	GtkWidget *hbox31;
+	GtkWidget *label55;
+	GtkWidget *hbox32;
+	GtkWidget *label56;
+	GtkWidget *label54;
+	GtkWidget *dialog_action_area2;
+	GtkWidget *loginokbutton;
+	GtkWidget *login_cancelbutton;
+
+	dialog2 = gtk_dialog_new();
+	gtk_widget_set_size_request(dialog2, -1, 227);
+	gtk_window_set_title(GTK_WINDOW(dialog2), ptitle1); //_("\347\231\273\345\275\225\347\252\227\345\217\243"));
+	gtk_window_set_default_size(GTK_WINDOW(dialog2), 249, 158);
+	gtk_window_set_modal(GTK_WINDOW(dialog2), TRUE);
+	gtk_window_set_resizable(GTK_WINDOW(dialog2), FALSE);
+	gtk_window_set_type_hint(GTK_WINDOW(dialog2), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox2 = GTK_DIALOG(dialog2)->vbox;
+	gtk_widget_show(dialog_vbox2);
+
+	hbox29 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox29);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox2), hbox29, TRUE, TRUE, 0);
+
+	frame10 = gtk_frame_new(NULL);
+	gtk_widget_show(frame10);
+	gtk_box_pack_start(GTK_BOX(hbox29), frame10, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(frame10, 301, 160);
+	gtk_container_set_border_width(GTK_CONTAINER(frame10), 20);
+
+	alignment10 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment10);
+	gtk_container_add(GTK_CONTAINER(frame10), alignment10);
+	gtk_container_set_border_width(GTK_CONTAINER(alignment10), 20);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment10), 0, 0, 12, 0);
+
+	vbox18 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox18);
+	gtk_container_add(GTK_CONTAINER(alignment10), vbox18);
+
+	hbox31 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox31);
+	gtk_box_pack_start(GTK_BOX(vbox18), hbox31, TRUE, TRUE, 0);
+
+	label55 = gtk_label_new(plabe05);
+	gtk_widget_show(label55);
+	gtk_box_pack_start(GTK_BOX(hbox31), label55, FALSE, FALSE, 0);
+
+	username = gtk_entry_new();
+	gtk_widget_show(username);
+	gtk_box_pack_start(GTK_BOX(hbox31), username, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(username, 150, -1);
+	gtk_entry_set_text(GTK_ENTRY(username), ncteacher_get_user.username);
+
+	hbox32 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox32);
+	gtk_box_pack_start(GTK_BOX(vbox18), hbox32, TRUE, TRUE, 0);
+
+	label56 = gtk_label_new(plabe06);
+	gtk_widget_show(label56);
+	gtk_box_pack_start(GTK_BOX(hbox32), label56, FALSE, FALSE, 0);
+
+	passport = gtk_entry_new();
+	gtk_widget_show(passport);
+	gtk_box_pack_start(GTK_BOX(hbox32), passport, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(passport, 150, -1);
+	gtk_entry_set_visibility(GTK_ENTRY(passport), FALSE);
+	gtk_entry_set_visibility(GTK_ENTRY(passport), FALSE);
+	gtk_entry_set_text(GTK_ENTRY(passport), ncteacher_get_user.password);
+
+	label54 = gtk_label_new(plabe04);
+	gtk_widget_show(label54);
+	gtk_frame_set_label_widget(GTK_FRAME(frame10), label54);
+	gtk_label_set_use_markup(GTK_LABEL(label54), TRUE);
+
+	dialog_action_area2 = GTK_DIALOG(dialog2)->action_area;
+	gtk_widget_show(dialog_action_area2);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area2),
+			GTK_BUTTONBOX_END);
+
+	login_cancelbutton = gtk_button_new_from_stock("gtk-cancel");
+	gtk_widget_show(login_cancelbutton);
+	gtk_dialog_add_action_widget(GTK_DIALOG(dialog2), login_cancelbutton,
+			GTK_RESPONSE_CANCEL);
+	gtk_widget_set_size_request(login_cancelbutton, 79, 32);
+	GTK_WIDGET_SET_FLAGS(login_cancelbutton, GTK_CAN_DEFAULT);
+
+	loginokbutton = gtk_button_new_from_stock("gtk-ok");
+	gtk_widget_show(loginokbutton);
+	gtk_dialog_add_action_widget(GTK_DIALOG(dialog2), loginokbutton,
+			GTK_RESPONSE_OK);
+	GTK_WIDGET_SET_FLAGS(loginokbutton, GTK_CAN_DEFAULT);
+
+	g_signal_connect((gpointer) login_cancelbutton, "clicked", G_CALLBACK(
+			on_login_cancelbutton_destroy), dialog2);
+
+	g_signal_connect((gpointer) loginokbutton, "clicked", G_CALLBACK(
+			on_loginokbutton_clicked), dialog2);
+
+	return dialog2;
+}
+
+GtkWidget*
+creat_class_dialog(void)
+{
+
+	GtkWidget *creat_class;
+	GtkWidget *dialog_vbox7;
+	GtkWidget *frame14;
+	GtkWidget *alignment21;
+	GtkWidget *hbox62;
+	GtkWidget *label82;
+	GtkWidget *label81;
+	GtkWidget *dialog_action_area7;
+	GtkWidget *create_cancelbut;
+	GtkWidget *alignment22;
+	GtkWidget *hbox63;
+	GtkWidget *image6;
+	GtkWidget *label83;
+	GtkWidget *create_okbutton;
+	GtkWidget *alignment23;
+	GtkWidget *hbox64;
+	GtkWidget *image7;
+	GtkWidget *label84;
+
+	creat_class = gtk_dialog_new();
+	gtk_widget_set_size_request(creat_class, 286, 188);
+	gtk_window_set_title(GTK_WINDOW(creat_class), psttitl);
+	gtk_window_set_resizable(GTK_WINDOW(creat_class), FALSE);
+	gtk_window_set_modal(GTK_WINDOW(creat_class), TRUE);
+	gtk_window_set_destroy_with_parent(GTK_WINDOW(creat_class), TRUE);
+	gtk_window_set_type_hint(GTK_WINDOW(creat_class),
+			GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox7 = GTK_DIALOG(creat_class)->vbox;
+	gtk_widget_show(dialog_vbox7);
+
+	frame14 = gtk_frame_new(NULL);
+	gtk_widget_show(frame14);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox7), frame14, TRUE, TRUE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(frame14), 10);
+
+	alignment21 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment21);
+	gtk_container_add(GTK_CONTAINER(frame14), alignment21);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment21), 0, 0, 12, 0);
+
+	hbox62 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox62);
+	gtk_container_add(GTK_CONTAINER(alignment21), hbox62);
+
+	label82 = gtk_label_new(plabe12);
+	gtk_widget_show(label82);
+	gtk_box_pack_start(GTK_BOX(hbox62), label82, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label82, 88, -1);
+
+	classEntry = gtk_entry_new();
+	gtk_widget_show(classEntry);
+	gtk_box_pack_start(GTK_BOX(hbox62), classEntry, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(classEntry, 142, -1);
+	gtk_entry_set_text(GTK_ENTRY(classEntry), _("class"));
+
+	label81 = gtk_label_new(_("<b></b>"));
+	gtk_widget_show(label81);
+	gtk_frame_set_label_widget(GTK_FRAME(frame14), label81);
+	gtk_label_set_use_markup(GTK_LABEL(label81), TRUE);
+
+	dialog_action_area7 = GTK_DIALOG(creat_class)->action_area;
+	gtk_widget_show(dialog_action_area7);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area7),
+			GTK_BUTTONBOX_END);
+
+	create_cancelbut = gtk_button_new();
+	gtk_widget_show(create_cancelbut);
+	gtk_dialog_add_action_widget(GTK_DIALOG(creat_class), create_cancelbut, 0);
+	gtk_widget_set_size_request(create_cancelbut, 44, -1);
+	GTK_WIDGET_SET_FLAGS(create_cancelbut, GTK_CAN_DEFAULT);
+
+	alignment22 = gtk_alignment_new(0.5, 0.5, 0, 0);
+	gtk_widget_show(alignment22);
+	gtk_container_add(GTK_CONTAINER(create_cancelbut), alignment22);
+
+	hbox63 = gtk_hbox_new(FALSE, 2);
+	gtk_widget_show(hbox63);
+	gtk_container_add(GTK_CONTAINER(alignment22), hbox63);
+
+	image6 = gtk_image_new_from_stock("gtk-cancel", GTK_ICON_SIZE_BUTTON);
+	gtk_widget_show(image6);
+	gtk_box_pack_start(GTK_BOX(hbox63), image6, FALSE, FALSE, 0);
+
+	label83 = gtk_label_new_with_mnemonic(plabe13);
+	gtk_widget_show(label83);
+	gtk_box_pack_start(GTK_BOX(hbox63), label83, FALSE, FALSE, 0);
+
+	create_okbutton = gtk_button_new();
+	gtk_widget_show(create_okbutton);
+	gtk_dialog_add_action_widget(GTK_DIALOG(creat_class), create_okbutton, 0);
+	GTK_WIDGET_SET_FLAGS(create_okbutton, GTK_CAN_DEFAULT);
+
+	alignment23 = gtk_alignment_new(0.5, 0.5, 0, 0);
+	gtk_widget_show(alignment23);
+	gtk_container_add(GTK_CONTAINER(create_okbutton), alignment23);
+
+	hbox64 = gtk_hbox_new(FALSE, 2);
+	gtk_widget_show(hbox64);
+	gtk_container_add(GTK_CONTAINER(alignment23), hbox64);
+
+	image7 = gtk_image_new_from_stock("gtk-ok", GTK_ICON_SIZE_BUTTON);
+	gtk_widget_show(image7);
+	gtk_box_pack_start(GTK_BOX(hbox64), image7, FALSE, FALSE, 0);
+
+	label84 = gtk_label_new_with_mnemonic(plabe14);
+	gtk_widget_show(label84);
+	gtk_box_pack_start(GTK_BOX(hbox64), label84, FALSE, FALSE, 0);
+
+	g_signal_connect((gpointer) create_cancelbut, "clicked", G_CALLBACK(
+			on_creat_cancelbut_clicked), creat_class);
+	g_signal_connect((gpointer) create_okbutton, "clicked", G_CALLBACK(
+			on_creat_okbutton_clicked), creat_class);
+
+	return creat_class;
+}
+
+GtkWidget*
+create_choose_dialog(void)
+{
+	GtkWidget *choose_dialog;
+	GtkWidget *dialog_vbox11;
+	GtkWidget *hbox68;
+	GtkWidget *vbox46;
+	GtkWidget *vbox48;
+	GtkWidget *hbox71;
+	GtkWidget *hbox72;
+	GtkWidget *label103;
+	GtkWidget *vbox49;
+	GtkWidget *vbox50;
+	GtkWidget *label104;
+	GtkWidget *hbox74;
+	GtkWidget *label109;
+	GtkWidget *label108;
+	GtkWidget *vbox51;
+	GtkWidget *label105;
+	GtkWidget *hbox75;
+	GtkWidget *label110;
+	GtkWidget *label111;
+	GtkWidget *vbox52;
+	GtkWidget *label106;
+	GtkWidget *hbox73;
+	GtkWidget *hbox76;
+	GtkWidget *view_but;
+	GtkWidget *label112;
+	GtkWidget *frame17;
+	GtkWidget *alignment27;
+	GtkWidget *label97;
+	GtkWidget *dialog_action_area11;
+	GtkWidget *choose_cancel_but;
+	GtkWidget *choose_ok_but;
+
+	choose_dialog = gtk_dialog_new();
+	gtk_window_set_title(GTK_WINDOW(choose_dialog), ptitle2);
+	gtk_window_set_modal(GTK_WINDOW(choose_dialog), TRUE);
+	gtk_window_set_resizable(GTK_WINDOW(choose_dialog), FALSE);
+	gtk_window_set_type_hint(GTK_WINDOW(choose_dialog),
+			GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox11 = GTK_DIALOG(choose_dialog)->vbox;
+	gtk_widget_show(dialog_vbox11);
+
+	hbox68 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox68);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox11), hbox68, TRUE, TRUE, 0);
+
+	vbox46 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox46);
+	gtk_box_pack_start(GTK_BOX(hbox68), vbox46, TRUE, TRUE, 0);
+
+	vbox48 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox48);
+	gtk_box_pack_start(GTK_BOX(vbox46), vbox48, FALSE, FALSE, 0);
+
+	hbox71 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox71);
+	gtk_box_pack_start(GTK_BOX(vbox48), hbox71, TRUE, TRUE, 0);
+
+	hbox72 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox72);
+	gtk_box_pack_start(GTK_BOX(hbox71), hbox72, TRUE, TRUE, 0);
+
+	label103 = gtk_label_new("");
+	gtk_widget_show(label103);
+	gtk_box_pack_start(GTK_BOX(hbox72), label103, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label103, 18, 8);
+
+	vbox49 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox49);
+	gtk_box_pack_start(GTK_BOX(hbox72), vbox49, TRUE, TRUE, 0);
+
+	vbox50 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox50);
+	gtk_box_pack_start(GTK_BOX(vbox49), vbox50, FALSE, FALSE, 0);
+
+	label104 = gtk_label_new("");
+	gtk_widget_show(label104);
+	gtk_box_pack_start(GTK_BOX(vbox50), label104, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(label104, 66, 22);
+
+	hbox74 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox74);
+	gtk_box_pack_start(GTK_BOX(vbox50), hbox74, FALSE, FALSE, 0);
+
+	label109 = gtk_label_new(plabe09);
+	gtk_widget_show(label109);
+	gtk_box_pack_start(GTK_BOX(hbox74), label109, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label109, 56, 37);
+
+	label108 = gtk_label_new("");
+	gtk_widget_show(label108);
+	gtk_box_pack_start(GTK_BOX(hbox74), label108, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label108, 54, -1);
+
+	combobox4 = gtk_combo_box_new_text();
+	gtk_widget_show(combobox4);
+	gtk_box_pack_start(GTK_BOX(vbox49), combobox4, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(combobox4, 137, 30);
+	gtk_combo_box_insert_text(GTK_COMBO_BOX(combobox4), 0, "v4l");
+
+	vbox51 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox51);
+	gtk_box_pack_start(GTK_BOX(vbox49), vbox51, FALSE, FALSE, 0);
+
+	label105 = gtk_label_new("");
+	gtk_widget_show(label105);
+	gtk_box_pack_start(GTK_BOX(vbox51), label105, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label105, -1, 56);
+
+	hbox75 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox75);
+	gtk_box_pack_start(GTK_BOX(vbox51), hbox75, FALSE, FALSE, 0);
+
+	label110 = gtk_label_new(plabe00);
+	gtk_widget_show(label110);
+	gtk_box_pack_start(GTK_BOX(hbox75), label110, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label110, 56, 37);
+
+	label111 = gtk_label_new("");
+	gtk_widget_show(label111);
+	gtk_box_pack_start(GTK_BOX(hbox75), label111, FALSE, FALSE, 0);
+
+	combobox5 = gtk_combo_box_new_text();
+	gtk_widget_show(combobox5);
+	gtk_box_pack_start(GTK_BOX(vbox49), combobox5, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(combobox5, 81, 30);
+
+	int i;
+	switch (g_video_mode)
+	{
+
+	case 1:
+
+	{
+		gtk_combo_box_set_active(GTK_COMBO_BOX(combobox4), 0);//v4l
+
+		for (i = 0; i < g_VideoDevCount; i++)
+			gtk_combo_box_insert_text(GTK_COMBO_BOX(combobox5), i, g_DevName[i]);
+
+		gtk_combo_box_set_active(GTK_COMBO_BOX(combobox5), v4l_dev_num);
+		break;
+	}
+	}
+
+	vbox52 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox52);
+	gtk_box_pack_start(GTK_BOX(vbox49), vbox52, TRUE, TRUE, 0);
+
+	label106 = gtk_label_new("");
+	gtk_widget_show(label106);
+	gtk_box_pack_start(GTK_BOX(vbox52), label106, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label106, -1, 41);
+
+	hbox73 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox73);
+	gtk_box_pack_start(GTK_BOX(vbox52), hbox73, FALSE, FALSE, 0);
+
+	hbox76 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox76);
+	gtk_box_pack_start(GTK_BOX(hbox73), hbox76, FALSE, FALSE, 0);
+
+	view_but = gtk_button_new_with_mnemonic(pviewbt); //(_("\351\242\204\350\247\210"));
+	gtk_widget_show(view_but);
+	gtk_box_pack_start(GTK_BOX(hbox76), view_but, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(view_but, 71, 30);
+
+	label112 = gtk_label_new("");
+	gtk_widget_show(label112);
+	gtk_box_pack_start(GTK_BOX(hbox76), label112, FALSE, FALSE, 0);
+
+	frame17 = gtk_frame_new(NULL);
+	gtk_widget_show(frame17);
+	gtk_box_pack_start(GTK_BOX(hbox68), frame17, TRUE, TRUE, 0);
+	gtk_widget_set_size_request(frame17, 347, 260);
+	gtk_container_set_border_width(GTK_CONTAINER(frame17), 10);
+
+	alignment27 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment27);
+	gtk_container_add(GTK_CONTAINER(frame17), alignment27);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment27), 0, 0, 12, 0);
+
+	review_image = create_pixmap(choose_dialog, NULL);
+	gtk_widget_show(review_image);
+	gtk_container_add(GTK_CONTAINER(alignment27), review_image);
+	gtk_widget_set_size_request(review_image, 320, 240);
+
+	label97 = gtk_label_new(plabe17);
+	gtk_widget_show(label97);
+	gtk_frame_set_label_widget(GTK_FRAME(frame17), label97);
+	gtk_label_set_use_markup(GTK_LABEL(label97), TRUE);
+
+	dialog_action_area11 = GTK_DIALOG(choose_dialog)->action_area;
+	gtk_widget_show(dialog_action_area11);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area11),
+			GTK_BUTTONBOX_END);
+
+	choose_cancel_but = gtk_button_new_from_stock("gtk-cancel");
+	gtk_widget_show(choose_cancel_but);
+	gtk_dialog_add_action_widget(GTK_DIALOG(choose_dialog), choose_cancel_but,
+			GTK_RESPONSE_CANCEL);
+	GTK_WIDGET_SET_FLAGS(choose_cancel_but, GTK_CAN_DEFAULT);
+
+	choose_ok_but = gtk_button_new_from_stock("gtk-ok");
+	gtk_widget_show(choose_ok_but);
+	gtk_dialog_add_action_widget(GTK_DIALOG(choose_dialog), choose_ok_but,
+			GTK_RESPONSE_OK);
+	GTK_WIDGET_SET_FLAGS(choose_ok_but, GTK_CAN_DEFAULT);
+
+	g_signal_connect((gpointer) GTK_COMBO_BOX(combobox4), "changed",
+			G_CALLBACK(on_combo_box_choose1), combobox4);
+	g_signal_connect(G_OBJECT(choose_dialog), "delete_event", G_CALLBACK(
+			choose_dialog_delete_event), choose_dialog);
+	g_signal_connect((gpointer) view_but, "clicked", G_CALLBACK(
+			on_view_but_clicked), choose_dialog);
+	g_signal_connect((gpointer) choose_cancel_but, "clicked", G_CALLBACK(
+			on_choose_cancel_but_clicked), choose_dialog);
+	g_signal_connect((gpointer) choose_ok_but, "clicked", G_CALLBACK(
+			on_choose_ok_but_clicked), choose_dialog);
+
+	return choose_dialog;
+}
+
+GtkWidget*
+create_work_mode_dialog(void)
+{
+	GtkWidget *work_mode_dialog;
+	GtkWidget *dialog_vbox9;
+	GtkWidget *vbox43;
+	GtkWidget *label88;
+	GtkWidget *hbox67;
+	GtkWidget *radiobutton_tech;
+	GSList *radiobutton_tech_group = NULL;
+	GtkWidget *radiobutton_rec;
+	GtkWidget *label89;
+	GtkWidget *dialog_action_area9;
+	GtkWidget *work_cancel_but;
+	GtkWidget *work_ok_but;
+
+	work_mode_dialog = gtk_dialog_new();
+	gtk_window_set_title(GTK_WINDOW(work_mode_dialog), ptitle3);
+	gtk_window_set_resizable(GTK_WINDOW(work_mode_dialog), FALSE);
+	gtk_window_set_modal(GTK_WINDOW(work_mode_dialog), TRUE);
+	gtk_window_set_type_hint(GTK_WINDOW(work_mode_dialog),
+			GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox9 = GTK_DIALOG(work_mode_dialog)->vbox;
+	gtk_widget_show(dialog_vbox9);
+
+	vbox43 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox43);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox9), vbox43, TRUE, TRUE, 0);
+
+	label88 = gtk_label_new("");
+	gtk_widget_show(label88);
+	gtk_box_pack_start(GTK_BOX(vbox43), label88, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label88, -1, 40);
+
+	hbox67 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox67);
+	gtk_box_pack_start(GTK_BOX(vbox43), hbox67, TRUE, TRUE, 0);
+
+	radiobutton_tech = gtk_radio_button_new_with_mnemonic(NULL, pradiobtnt);
+	gtk_widget_show(radiobutton_tech);
+	gtk_box_pack_start(GTK_BOX(hbox67), radiobutton_tech, FALSE, FALSE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(radiobutton_tech), 6);
+	gtk_radio_button_set_group(GTK_RADIO_BUTTON(radiobutton_tech),
+			radiobutton_tech_group);
+	radiobutton_tech_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(
+			radiobutton_tech));
+
+	radiobutton_rec = gtk_radio_button_new_with_mnemonic(NULL, pradiobtnr);
+	gtk_widget_show(radiobutton_rec);
+	gtk_box_pack_start(GTK_BOX(hbox67), radiobutton_rec, FALSE, FALSE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(radiobutton_rec), 6);
+	gtk_radio_button_set_group(GTK_RADIO_BUTTON(radiobutton_rec),
+			radiobutton_tech_group);
+	radiobutton_tech_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(
+			radiobutton_rec));
+
+	switch (g_work_mode)
+	{
+	case 0:
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radiobutton_tech), TRUE);
+		break;
+	case 1:
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radiobutton_rec), TRUE);
+		break;
+	}
+
+	label89 = gtk_label_new("");
+	gtk_widget_show(label89);
+	gtk_box_pack_start(GTK_BOX(vbox43), label89, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label89, -1, 40);
+
+	dialog_action_area9 = GTK_DIALOG(work_mode_dialog)->action_area;
+	gtk_widget_show(dialog_action_area9);
+	gtk_widget_set_size_request(dialog_action_area9, 158, -1);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area9),
+			GTK_BUTTONBOX_END);
+
+	work_cancel_but = gtk_button_new_with_mnemonic(pwkcancl);
+	gtk_widget_show(work_cancel_but);
+	gtk_dialog_add_action_widget(GTK_DIALOG(work_mode_dialog), work_cancel_but,
+			0);
+	GTK_WIDGET_SET_FLAGS(work_cancel_but, GTK_CAN_DEFAULT);
+
+	work_ok_but = gtk_button_new_with_mnemonic(pwkok);
+	gtk_widget_show(work_ok_but);
+	gtk_dialog_add_action_widget(GTK_DIALOG(work_mode_dialog), work_ok_but, 0);
+	GTK_WIDGET_SET_FLAGS(work_ok_but, GTK_CAN_DEFAULT);
+
+	g_signal_connect((gpointer) work_cancel_but, "clicked", G_CALLBACK(
+			on_work_cancel_but_clicked), work_mode_dialog);
+	g_signal_connect((gpointer) work_ok_but, "clicked", G_CALLBACK(
+			on_work_ok_but_clicked), work_mode_dialog);
+	g_signal_connect((gpointer) radiobutton_tech, "clicked", G_CALLBACK(
+			on_radiobutton_work_clicked), (gpointer) 0);
+	g_signal_connect((gpointer) radiobutton_rec, "clicked", G_CALLBACK(
+			on_radiobutton_work_clicked), (gpointer) 1);
+
+	return work_mode_dialog;
+}
+
+GtkWidget*
+create_exit_rec_dialog(void)
+{
+	GtkWidget *exit_rec_dialog;
+	GtkWidget *dialog_vbox10;
+	GtkWidget *vbox44;
+	GtkWidget *label90;
+	GtkWidget *label92;
+	GtkWidget *label91;
+	GtkWidget *dialog_action_area10;
+	GtkWidget *exit_rec_cancel;
+	GtkWidget *exit_rec_yes;
+
+	exit_rec_dialog = gtk_dialog_new();
+	gtk_window_set_title(GTK_WINDOW(exit_rec_dialog), _(""));
+
+	gtk_window_set_resizable(GTK_WINDOW(exit_rec_dialog), FALSE);
+	gtk_window_set_modal(GTK_WINDOW(exit_rec_dialog), TRUE);
+	gtk_window_set_position(GTK_WINDOW(exit_rec_dialog), GTK_WIN_POS_CENTER);
+	gtk_window_set_type_hint(GTK_WINDOW(exit_rec_dialog),
+			GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox10 = GTK_DIALOG(exit_rec_dialog)->vbox;
+	gtk_widget_show(dialog_vbox10);
+
+	vbox44 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox44);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox10), vbox44, FALSE, FALSE, 0);
+
+	label90 = gtk_label_new("");
+	gtk_widget_show(label90);
+	gtk_box_pack_start(GTK_BOX(vbox44), label90, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label90, 48, 24);
+
+	label92 = gtk_label_new(plabe22);
+	gtk_widget_show(label92);
+	gtk_box_pack_start(GTK_BOX(vbox44), label92, FALSE, FALSE, 0);
+
+	label91 = gtk_label_new("");
+	gtk_widget_show(label91);
+	gtk_box_pack_start(GTK_BOX(vbox44), label91, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label91, -1, 24);
+
+	dialog_action_area10 = GTK_DIALOG(exit_rec_dialog)->action_area;
+	gtk_widget_show(dialog_action_area10);
+	gtk_widget_set_size_request(dialog_action_area10, -1, 32);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area10),
+			GTK_BUTTONBOX_END);
+
+	exit_rec_cancel = gtk_button_new_with_mnemonic(pextcancl);
+	gtk_widget_show(exit_rec_cancel);
+	gtk_dialog_add_action_widget(GTK_DIALOG(exit_rec_dialog), exit_rec_cancel,
+			GTK_RESPONSE_CANCEL);
+	gtk_widget_set_size_request(exit_rec_cancel, -1, 20);
+	GTK_WIDGET_SET_FLAGS(exit_rec_cancel, GTK_CAN_DEFAULT);
+
+	exit_rec_yes = gtk_button_new_with_mnemonic(pextys);
+	gtk_widget_show(exit_rec_yes);
+	gtk_dialog_add_action_widget(GTK_DIALOG(exit_rec_dialog), exit_rec_yes,
+			GTK_RESPONSE_OK);
+	GTK_WIDGET_SET_FLAGS(exit_rec_yes, GTK_CAN_DEFAULT);
+
+	g_signal_connect((gpointer) exit_rec_cancel, "clicked", G_CALLBACK(
+			on_exit_rec_cancel_clicked), exit_rec_dialog);
+	g_signal_connect((gpointer) exit_rec_yes, "clicked", G_CALLBACK(
+			on_exit_rec_yes_clicked), exit_rec_dialog);
+
+	return exit_rec_dialog;
+}
+
+GtkWidget*
+create_cancle_class_dialog(void)
+{
+	GtkWidget *exit_class_dialog;
+	GtkWidget *dialog_vbox10;
+	GtkWidget *vbox44;
+	GtkWidget *label90;
+	GtkWidget *label92;
+	GtkWidget *label91;
+	GtkWidget *dialog_action_area10;
+	GtkWidget *exit_class_cancel;
+	GtkWidget *exit_class_yes;
+
+	exit_class_dialog = gtk_dialog_new();
+	gtk_window_set_title(GTK_WINDOW(exit_class_dialog), _(""));
+
+	gtk_window_set_resizable(GTK_WINDOW(exit_class_dialog), FALSE);
+	gtk_window_set_modal(GTK_WINDOW(exit_class_dialog), TRUE);
+	gtk_window_set_position(GTK_WINDOW(exit_class_dialog), GTK_WIN_POS_CENTER);
+	gtk_window_set_type_hint(GTK_WINDOW(exit_class_dialog),
+			GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox10 = GTK_DIALOG(exit_class_dialog)->vbox;
+	gtk_widget_show(dialog_vbox10);
+
+	vbox44 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox44);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox10), vbox44, FALSE, FALSE, 0);
+
+	label90 = gtk_label_new("");
+	gtk_widget_show(label90);
+	gtk_box_pack_start(GTK_BOX(vbox44), label90, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label90, 48, 24);
+
+	label92 = gtk_label_new(plabe32);
+	gtk_widget_show(label92);
+	gtk_box_pack_start(GTK_BOX(vbox44), label92, FALSE, FALSE, 0);
+
+	label91 = gtk_label_new("");
+	gtk_widget_show(label91);
+	gtk_box_pack_start(GTK_BOX(vbox44), label91, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label91, -1, 24);
+
+	dialog_action_area10 = GTK_DIALOG(exit_class_dialog)->action_area;
+	gtk_widget_show(dialog_action_area10);
+	gtk_widget_set_size_request(dialog_action_area10, -1, 32);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area10),
+			GTK_BUTTONBOX_END);
+
+	exit_class_cancel = gtk_button_new_with_mnemonic(pextclscancl);
+	gtk_widget_show(exit_class_cancel);
+	gtk_dialog_add_action_widget(GTK_DIALOG(exit_class_dialog),
+			exit_class_cancel, GTK_RESPONSE_CANCEL);
+	gtk_widget_set_size_request(exit_class_cancel, -1, 20);
+	GTK_WIDGET_SET_FLAGS(exit_class_cancel, GTK_CAN_DEFAULT);
+
+	exit_class_yes = gtk_button_new_with_mnemonic(pextclsys);
+	gtk_widget_show(exit_class_yes);
+	gtk_dialog_add_action_widget(GTK_DIALOG(exit_class_dialog), exit_class_yes,
+			GTK_RESPONSE_OK);
+	GTK_WIDGET_SET_FLAGS(exit_class_yes, GTK_CAN_DEFAULT);
+
+	g_signal_connect((gpointer) exit_class_cancel, "clicked", G_CALLBACK(
+			on_exit_class_cancel_clicked), exit_class_dialog);
+	g_signal_connect((gpointer) exit_class_yes, "clicked", G_CALLBACK(
+			on_exit_class_yes_clicked), exit_class_dialog);
+
+	return exit_class_dialog;
+}
+
+GtkWidget*
+create_exit_system_dialog(void)
+{
+	GtkWidget *exit_system_dialog;
+	GtkWidget *dialog_vbox10;
+	GtkWidget *vbox44;
+	GtkWidget *label90;
+	GtkWidget *label92;
+	GtkWidget *label91;
+	GtkWidget *dialog_action_area10;
+	GtkWidget *exit_system_cancel;
+	GtkWidget *exit_system_yes;
+
+	exit_system_dialog = gtk_dialog_new();
+	gtk_window_set_title(GTK_WINDOW(exit_system_dialog), _(""));
+
+	gtk_window_set_resizable(GTK_WINDOW(exit_system_dialog), FALSE);
+	gtk_window_set_modal(GTK_WINDOW(exit_system_dialog), TRUE);
+	gtk_window_set_position(GTK_WINDOW(exit_system_dialog), GTK_WIN_POS_CENTER);
+	gtk_window_set_type_hint(GTK_WINDOW(exit_system_dialog),
+			GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox10 = GTK_DIALOG(exit_system_dialog)->vbox;
+	gtk_widget_show(dialog_vbox10);
+
+	vbox44 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox44);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox10), vbox44, FALSE, FALSE, 0);
+
+	label90 = gtk_label_new("");
+	gtk_widget_show(label90);
+	gtk_box_pack_start(GTK_BOX(vbox44), label90, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label90, 48, 24);
+
+	label92 = gtk_label_new(plabe42);
+	gtk_widget_show(label92);
+	gtk_box_pack_start(GTK_BOX(vbox44), label92, FALSE, FALSE, 0);
+
+	label91 = gtk_label_new("");
+	gtk_widget_show(label91);
+	gtk_box_pack_start(GTK_BOX(vbox44), label91, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label91, -1, 24);
+
+	dialog_action_area10 = GTK_DIALOG(exit_system_dialog)->action_area;
+	gtk_widget_show(dialog_action_area10);
+	gtk_widget_set_size_request(dialog_action_area10, -1, 32);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area10),
+			GTK_BUTTONBOX_END);
+
+	exit_system_cancel = gtk_button_new_with_mnemonic(pextsyscancl);
+	gtk_widget_show(exit_system_cancel);
+	gtk_dialog_add_action_widget(GTK_DIALOG(exit_system_dialog),
+			exit_system_cancel, GTK_RESPONSE_CANCEL);
+	gtk_widget_set_size_request(exit_system_cancel, -1, 20);
+	GTK_WIDGET_SET_FLAGS(exit_system_cancel, GTK_CAN_DEFAULT);
+
+	exit_system_yes = gtk_button_new_with_mnemonic(pextsysys);
+	gtk_widget_show(exit_system_yes);
+	gtk_dialog_add_action_widget(GTK_DIALOG(exit_system_dialog),
+			exit_system_yes, GTK_RESPONSE_OK);
+	GTK_WIDGET_SET_FLAGS(exit_system_yes, GTK_CAN_DEFAULT);
+
+	g_signal_connect((gpointer) exit_system_cancel, "clicked", G_CALLBACK(
+			on_exit_system_cancel_clicked), exit_system_dialog);
+	g_signal_connect((gpointer) exit_system_yes, "clicked", G_CALLBACK(
+			on_exit_system_yes_clicked), exit_system_dialog);
+
+	return exit_system_dialog;
+}
+
+GtkWidget*
+create_rec_delay_set_dialog(void)
+{
+	GtkWidget *dialog_vbox1;
+	GtkWidget *frame1;
+	GtkWidget *alignment1;
+	GtkWidget *vbox2;
+	GtkWidget *label10;
+	GtkWidget *hbox2;
+	GtkWidget *label12;
+	GtkWidget *delay_combobox;
+	GtkWidget *label13;
+	GtkWidget *label9;
+	GtkWidget *label11;
+	GtkWidget *label7;
+	GtkWidget *dialog_action_area1;
+	GtkWidget *rec_delay_cancel;
+	GtkWidget *rec_delay_yes;
+
+	rec_delay_set_dialog = gtk_dialog_new();
+	gtk_window_set_title(GTK_WINDOW(rec_delay_set_dialog), ptitle4);
+	gtk_window_set_modal(GTK_WINDOW(rec_delay_set_dialog), TRUE);
+	gtk_window_set_type_hint(GTK_WINDOW(rec_delay_set_dialog),
+			GDK_WINDOW_TYPE_HINT_DIALOG);
+
+	dialog_vbox1 = GTK_DIALOG(rec_delay_set_dialog)->vbox;
+	gtk_widget_show(dialog_vbox1);
+
+	frame1 = gtk_frame_new(NULL);
+	gtk_widget_show(frame1);
+	gtk_box_pack_start(GTK_BOX(dialog_vbox1), frame1, TRUE, TRUE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(frame1), 5);
+
+	alignment1 = gtk_alignment_new(0.5, 0.5, 1, 1);
+	gtk_widget_show(alignment1);
+	gtk_container_add(GTK_CONTAINER(frame1), alignment1);
+	gtk_alignment_set_padding(GTK_ALIGNMENT(alignment1), 0, 0, 12, 0);
+
+	vbox2 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox2);
+	gtk_container_add(GTK_CONTAINER(alignment1), vbox2);
+
+	label10 = gtk_label_new("");
+	gtk_widget_show(label10);
+	gtk_box_pack_start(GTK_BOX(vbox2), label10, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label10, -1, 45);
+
+	hbox2 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox2);
+	gtk_box_pack_start(GTK_BOX(vbox2), hbox2, TRUE, TRUE, 0);
+
+	label12 = gtk_label_new(plabex);
+	gtk_widget_show(label12);
+	gtk_box_pack_start(GTK_BOX(hbox2), label12, FALSE, FALSE, 0);
+
+	delay_combobox = gtk_combo_box_new_text();
+	gtk_widget_show(delay_combobox);
+	gtk_box_pack_start(GTK_BOX(hbox2), delay_combobox, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(delay_combobox, 56, -1);
+	char delaytime_num[][3] =
+	{ "0", "3", "5", "10", "20", "30", "40", "50", "60" };
+	for (int i = 0; i < 9; i++)
+
+		gtk_combo_box_insert_text(GTK_COMBO_BOX(delay_combobox), i,
+				delaytime_num[i]);
+	gtk_combo_box_set_active(GTK_COMBO_BOX(delay_combobox), 2);
+
+	label13 = gtk_label_new(plabe013);
+	gtk_widget_show(label13);
+	gtk_box_pack_start(GTK_BOX(hbox2), label13, FALSE, FALSE, 0);
+
+	label9 = gtk_label_new("");
+	gtk_widget_show(label9);
+	gtk_box_pack_start(GTK_BOX(hbox2), label9, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label9, 18, -1);
+	gtk_misc_set_alignment(GTK_MISC(label9), 0.48, 0.49);
+
+	label11 = gtk_label_new("");
+	gtk_widget_show(label11);
+	gtk_box_pack_start(GTK_BOX(vbox2), label11, FALSE, FALSE, 0);
+	gtk_widget_set_size_request(label11, -1, 45);
+
+	label7 = gtk_label_new(plabe017);
+	gtk_widget_show(label7);
+	gtk_frame_set_label_widget(GTK_FRAME(frame1), label7);
+	gtk_label_set_use_markup(GTK_LABEL(label7), TRUE);
+
+	dialog_action_area1 = GTK_DIALOG(rec_delay_set_dialog)->action_area;
+	gtk_widget_show(dialog_action_area1);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area1),
+			GTK_BUTTONBOX_END);
+
+	rec_delay_cancel = gtk_button_new_from_stock("gtk-cancel");
+	gtk_widget_show(rec_delay_cancel);
+	gtk_dialog_add_action_widget(GTK_DIALOG(rec_delay_set_dialog),
+			rec_delay_cancel, GTK_RESPONSE_CANCEL);
+	GTK_WIDGET_SET_FLAGS(rec_delay_cancel, GTK_CAN_DEFAULT);
+
+	rec_delay_yes = gtk_button_new_from_stock("gtk-ok");
+	gtk_widget_show(rec_delay_yes);
+	gtk_dialog_add_action_widget(GTK_DIALOG(rec_delay_set_dialog),
+			rec_delay_yes, GTK_RESPONSE_OK);
+	GTK_WIDGET_SET_FLAGS(rec_delay_yes, GTK_CAN_DEFAULT);
+
+	g_signal_connect((gpointer) rec_delay_cancel, "clicked", G_CALLBACK(
+			on_rec_delay_cancel_clicked), rec_delay_set_dialog);
+	g_signal_connect((gpointer) rec_delay_yes, "clicked", G_CALLBACK(
+			on_rec_delay_yes_clicked), delay_combobox);
+
+	return rec_delay_set_dialog;
+}
+
+void Error_dia(gchar *input, gchar *solution)
+{
+	GtkWidget *Message_dia;
+
+	gchar *message = new gchar[strlen(input) + strlen(solution)];
+
+	strcpy(message, input);
+	strcat(message, solution);
+
+	Message_dia = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+			GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, message);
+
+	gtk_dialog_run(GTK_DIALOG(Message_dia));
+	gtk_widget_destroy(Message_dia);
+}
+
+void get_networkconfig()
+{
+
+	classcenterIP = gtk_entry_get_text(GTK_ENTRY(enserverip));
+	classcenterport = gtk_entry_get_text(GTK_ENTRY(enserverport));
+
+	strcpy(ncteacher_get_para.serverip, classcenterIP);
+	DWORD temp;
+	temp = atol(classcenterport);
+	ncteacher_get_para.serverport = temp;
+}
+
+int get_loadsys()
+{
+	const char *name = gtk_entry_get_text(GTK_ENTRY(username));
+	const char *psd = gtk_entry_get_text(GTK_ENTRY(passport));
+	strcpy(teachlogin.TeacherName, name);
+	strcpy(teachlogin.TeacherPass, psd);
+	if (strlen(teachlogin.TeacherName) == 0 | strlen(teachlogin.TeacherName)
+			> limitbit)
+	{
+		Error_dia(ERROR017, ERROR_S017);
+		return -1;
+	}
+	strcpy(ncteacher_get_user.username, name);
+	strcpy(ncteacher_get_user.password, psd);
+	return 1;
+}
+
+int get_classpara()
+{
+
+	//const char *classname=gtk_entry_get_text(GTK_ENTRY (classEntry));
+	const char *audio_port = gtk_entry_get_text(GTK_ENTRY(audioEntry));
+	const char *video_port = gtk_entry_get_text(GTK_ENTRY(videoEntry));
+	CreateGroup.CAPort = atol(audio_port);
+	CreateGroup.CVPort = atol(video_port);
+
+	if (CreateGroup.CAPort % 2 == 1)
+	{
+		Error_dia(ERROR014, ERROR_S014);
+		return -1;
+	}
+
+	if (CreateGroup.CVPort % 2 == 1)
+	{
+		Error_dia(ERROR015, ERROR_S015);
+		return -1;
+	}
+
+	if (CreateGroup.CAPort == CreateGroup.CVPort)
+	{
+		Error_dia(ERROR016, ERROR_S016);
+		return -1;
+	}
+	ncteacher_get_para.audioport = CreateGroup.CAPort;
+	ncteacher_get_para.videoport = CreateGroup.CVPort;
+
+	return 0;
+}
+
+int get_classname()
+{
+	const char *classname = gtk_entry_get_text(GTK_ENTRY(classEntry));
+	strcpy(CreateGroup.GroupName, classname);
+	printf("get group name is %s\n", CreateGroup.GroupName);
+	if (strlen(classname) == 0 | strlen(classname) > 128)
+	{
+		Error_dia(ERROR017, ERROR_S017);
+		return -1;
+	}
+	return 0;
+}

Added: incubator/bluesky/trunk/RealClass/Teacher/src/interface.hh
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/interface.hh?rev=885392&view=auto
==============================================================================
--- incubator/bluesky/trunk/RealClass/Teacher/src/interface.hh (added)
+++ incubator/bluesky/trunk/RealClass/Teacher/src/interface.hh Mon Nov 30 12:01:23 2009
@@ -0,0 +1,61 @@
+/** \file interface.hh define GUI gadgets
+*
+*
+*Licensed to the Apache Software Foundation (ASF) under one
+*or more contributor license agreements.  See the NOTICE file
+*distributed with this work for additional information
+*regarding copyright ownership.  The ASF licenses this file
+*to you under the Apache License, Version 2.0 (the
+*"License"); you may not use this file except in compliance
+*with the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+*Unless required by applicable law or agreed to in writing,
+*software distributed under the License is distributed on an
+*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*KIND, either express or implied.  See the License for the
+*specific language governing permissions and limitations
+*under the License. 
+*/
+
+#ifndef _INTERFACE_H
+#define _INTERFACE_H
+#include "stdafx.h"
+//!server settings params
+struct entry_setpara
+{
+	char serverip[16];
+	DWORD serverport;
+	DWORD audioport;
+	DWORD videoport;
+};
+//!user setting params
+struct entry_usepara
+{
+	char username[32];
+	char password[16];
+};
+
+GtkWidget* create_window1(void);
+GtkWidget* create_para_dialog(void);
+GtkWidget* create_login_dialog(void);
+GtkWidget* creat_class_dialog(void);
+GtkWidget* create_choose_dialog(void);
+GtkWidget* create_work_mode_dialog(void);
+GtkWidget* create_exit_rec_dialog(void);
+GtkWidget* create_cancle_class_dialog(void);
+GtkWidget* create_exit_system_dialog(void);
+GtkWidget*create_rec_delay_set_dialog(void);
+//!error output
+void Error_dia(gchar *, gchar *input);
+//!get network config
+void get_networkconfig();
+//!get load system
+int get_loadsys();
+//!get class params
+int get_classpara();
+//!get class name
+int get_classname();
+
+#endif

Added: incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.cpp
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.cpp?rev=885392&view=auto
==============================================================================
--- incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.cpp (added)
+++ incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.cpp Mon Nov 30 12:01:23 2009
@@ -0,0 +1,207 @@
+/** \file languagechoose.cpp define various strings
+*
+*
+*Licensed to the Apache Software Foundation (ASF) under one
+*or more contributor license agreements.  See the NOTICE file
+*distributed with this work for additional information
+*regarding copyright ownership.  The ASF licenses this file
+*to you under the Apache License, Version 2.0 (the
+*"License"); you may not use this file except in compliance
+*with the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+*Unless required by applicable law or agreed to in writing,
+*software distributed under the License is distributed on an
+*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*KIND, either express or implied.  See the License for the
+*specific language governing permissions and limitations
+*under the License. 
+*/
+#include "languagechoose.h"
+
+char *ptitle = "Teacher"; //teacher
+
+char *psys = "System";
+
+char *pcreat = "Creat Class"; //creatclass  addde by ChenChen 2007.11.07
+
+char *pstop = "Stop Class"; //stopclass
+
+char *pset = "Option"; //Parameter Setting
+
+char *plogin = "Longin"; //longin
+
+char *pquit = "Quit"; //exit system
+
+char *pmodechge = "Choose Mode"; //Choose Mode
+
+char *pmodetech = "Teach"; //Teaching Mode
+
+char *pmodecomu = "Communicate"; //Teaching Model
+
+char *pview = "View"; //Teaching Model
+
+char *pstuimg = "Student Image"; //Student Image
+
+char *ptechimg = "Teacher Image"; //Teacher Image
+
+char *pstatrib = "Option"; //option
+
+char *p = "Setting";
+
+char *pjoin = "Longin";
+
+char *pgtk = "Teacher Longin";
+
+char *pexit = "Exit"; //exit
+
+char *pgtk1 = "Exit System"; //exit
+
+char *pcrt = "Creat"; //creat class
+
+char *pgtk2 = "Creat Class"; //creat class
+
+char *pcancle = "Cancel"; //exit
+
+char *pgtk3 = "Cancel Current Class"; //creat class
+
+char *pteach = "Teach"; //teaching
+
+char *pgtk4 = "Change to Teaching Mode";
+
+char *pcomu = "Commu"; //teaching
+
+char *pgtk5 = "Change to Interactive Mode";
+
+char *pmodeswich = "ForbChat";
+
+char *pchatchge = "Mode Switching";
+
+char *pstuname = "StudentName"; //student name
+
+char *pcomustat = "Status"; //teaching
+
+char *pstulist = "<b>Status List</b>"; //teaching
+
+char *padd = "Choose";
+
+char *pgtk11 = "Cancel";
+
+char *pcommu = "<b>Text Exchanges</b>"; //teaching
+
+char *pchat = "Chat"; //teaching
+
+char *pchoose = "Choose"; //teaching
+
+char *pchositm = "ChooseItem"; //teaching
+
+char *pwkmode = "Work Mode"; //teaching
+
+char *pclear = "Clear"; //teaching
+
+char *pclrchat = "ClearChat"; //teaching
+
+char *prec = "Record"; //teaching
+
+char *pgtitle = "Option";
+
+char *plabe1 = "ServerIP      "; //teaching
+
+char *plabe2 = "Server Port  "; //teaching
+
+char *plabe0 = "<b>Server Setting</b>"; //teaching
+
+char *plabe4 = "StudentAudio Port ";
+
+char *plabe5 = "StudentVideo Port ";
+
+char *plabe3 = "<b>Local Setting</b>";
+
+char *plabe10 = "Adv";
+
+char *plabe6 = "Cancel"; //teaching
+
+char *plabe7 = "OK"; //teaching
+
+char *ptitle1 = "Login Window"; //teaching
+
+char *plabe05 = "UserName";
+
+char *plabe06 = "Password"; //teaching
+
+char *plabe04 = "<b>User Login</b>";
+
+char *psttitl = "Creat Class";
+
+char *plabe12 = "ClassName"; //teaching
+
+char *plabe13 = "Cancel"; //teaching
+
+char *plabe14 = "OK"; //teaching
+
+char *ptitle2 = "Equipment Selection"; //teaching
+
+char *plabe09 = "Video Plug"; //teaching
+
+char *plabe00 = "Video Equipment"; //teaching
+
+char *pcombox = "No equipment found!"; //"Video equipment has not been found";   //teaching
+
+char *pviewbt = "Preview"; //teaching
+
+char *plabe17 = "<b>Video Preview</b>"; //teaching
+
+char *ptitle3 = "Work Mode Select";
+
+char *pradiobtnt = "Remote Real-time Teaching";
+
+char *pradiobtnr = "Local Record";
+
+char *pwkcancl = "Cancel";
+
+char *pwkok = "OK";
+
+char *plabe22 = "Exit Recording?"; //teaching
+
+char *pextcancl = "NO";
+
+char *pextys = "YES";
+
+char *plabe32 = "Do you want to cancel the class?";
+
+char *pextclscancl = "NO";
+
+char *pextclsys = "YES";
+
+char *plabe42 = "Do you want to quit from the system?";
+
+char *pextsyscancl = "NO";
+
+char *pextsysys = "YES";
+
+char *ptitle4 = "Recording Courseware Settings Dialog "; //teaching
+
+char *plabex = "After    ";
+
+char *plabe013 = "  secondes,it will start to record courseware";
+
+char *plabe017 = "Delay settings of recording courseware";
+
+char *palwcht = "AlowChat";
+
+char *pextrcd = "ExitRecrd";
+
+char *plistpre = "Student List";
+
+char *pnumb = "n)";
+
+char *pYES = "YES";
+
+char *pNO = "NO";
+
+char *pteacher_chat = "Teacher: ";
+
+char *ptext01 = "\nThe focus student apply for cancel focus,and the ID is: ";
+
+char *ptext = "\nOne student apply for focus,and the ID is";

Added: incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.h
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.h?rev=885392&view=auto
==============================================================================
--- incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.h (added)
+++ incubator/bluesky/trunk/RealClass/Teacher/src/languagechoose.h Mon Nov 30 12:01:23 2009
@@ -0,0 +1,213 @@
+/** \file languagechoose.h define various strings
+*
+*
+*Licensed to the Apache Software Foundation (ASF) under one
+*or more contributor license agreements.  See the NOTICE file
+*distributed with this work for additional information
+*regarding copyright ownership.  The ASF licenses this file
+*to you under the Apache License, Version 2.0 (the
+*"License"); you may not use this file except in compliance
+*with the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+*Unless required by applicable law or agreed to in writing,
+*software distributed under the License is distributed on an
+*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*KIND, either express or implied.  See the License for the
+*specific language governing permissions and limitations
+*under the License. 
+*/
+
+
+#ifndef _SOURCE_NAME_H_
+#define _SOURCE_NAME_H_
+
+// window titile
+extern char *ptitle; //teacher
+
+extern char *psys;
+
+extern char *pcreat; //creatclass 
+
+extern char *pstop; //stopclass
+
+extern char *pset; //Parameter Setting
+
+extern char *plogin; //login
+
+extern char *pquit; //exit system
+
+extern char *pmodechge; //Choose Mode
+
+extern char *pmodetech; //Teaching Mode
+
+extern char *pmodecomu;
+
+extern char *pview; //Teaching Model
+
+extern char *pstuimg; //Student Image
+
+extern char *ptechimg; //Teacher Image
+
+extern char *pstatrib; //option
+
+extern char *p; //option
+
+extern char *pjoin; //option
+
+extern char *pgtk; //option
+
+extern char *pexit; //exit
+
+extern char *pgtk1; //exit
+
+extern char *pcrt; //creat class
+
+extern char *pgtk2; //creat class
+
+extern char *pcancle; //exit
+
+extern char *pgtk3; //creat class
+
+extern char *pteach; //teaching
+
+extern char *pgtk4; //creat class
+
+extern char *pcomu; //teaching
+
+extern char *pgtk5; //teaching
+
+extern char *pmodeswich; //teaching
+
+extern char *pchatchge;
+
+extern char *pstuname;
+
+extern char *pcomustat;
+
+extern char *pstulist;
+
+extern char *padd;
+
+extern char *pgtk11;
+
+extern char *pcommu;
+
+extern char *pchat;
+
+extern char *pchoose;
+
+extern char *pchositm;
+
+extern char *pwkmode;
+
+extern char *pclear;
+
+extern char *pclrchat;
+
+extern char *prec;
+
+extern char *pgtitle;
+
+extern char *plabe1;
+
+extern char *plabe2;
+
+extern char *plabe0;
+
+extern char *plabe4;
+
+extern char *plabe5;
+
+extern char *plabe05;
+
+extern char *plabe3;
+
+extern char *plabe10;
+
+extern char *plabe6;
+
+extern char *plabe7;
+
+extern char *ptitle1;
+
+extern char *plabe06;
+
+extern char *plabe04;
+
+extern char *psttitl;
+
+extern char *plabe12;
+
+extern char *plabe13;
+
+extern char *plabe14;
+
+extern char *ptitle2;
+
+extern char *plabe09;
+
+extern char *plabe00;
+
+extern char *pcombox;
+
+extern char *pviewbt;
+
+extern char *plabe17;
+
+extern char *ptitle3;
+
+extern char *pradiobtnt;
+
+extern char *pradiobtnr;
+
+extern char *pwkcancl;
+
+extern char *pwkok;
+
+extern char *plabe22;
+
+extern char *pextcancl;
+
+extern char *pextys;
+
+extern char *plabe32;
+
+extern char *pextclscancl;
+
+extern char *pextclsys;
+
+extern char *plabe42;
+
+extern char *pextsyscancl;
+
+extern char *pextsysys;
+
+extern char *ptitle4;
+
+extern char *plabex;
+
+extern char *plabe013;
+
+extern char *plabe017;
+
+extern char *palwcht;
+
+extern char *pextrcd;
+
+extern char *plistpre;
+
+extern char *pnumb;
+
+extern char *pYES;
+
+extern char *pNO;
+
+extern char *ptext;
+
+extern char *ptext01;
+
+extern char *pteacher_chat;
+
+#endif

Added: incubator/bluesky/trunk/RealClass/Teacher/src/pic/student.bmp
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/pic/student.bmp?rev=885392&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/bluesky/trunk/RealClass/Teacher/src/pic/student.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/bluesky/trunk/RealClass/Teacher/src/pic/teacher.bmp
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/pic/teacher.bmp?rev=885392&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/bluesky/trunk/RealClass/Teacher/src/pic/teacher.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.cpp
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.cpp?rev=885392&view=auto
==============================================================================
--- incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.cpp (added)
+++ incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.cpp Mon Nov 30 12:01:23 2009
@@ -0,0 +1,125 @@
+/** \file singlecomm.cpp interface for the CSingleComm class.
+*
+*
+*Licensed to the Apache Software Foundation (ASF) under one
+*or more contributor license agreements.  See the NOTICE file
+*distributed with this work for additional information
+*regarding copyright ownership.  The ASF licenses this file
+*to you under the Apache License, Version 2.0 (the
+*"License"); you may not use this file except in compliance
+*with the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+*Unless required by applicable law or agreed to in writing,
+*software distributed under the License is distributed on an
+*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*KIND, either express or implied.  See the License for the
+*specific language governing permissions and limitations
+*under the License. 
+*/ 
+
+#include "asyncsocketex.h"
+#include "singlecomm.h"
+
+#define SOCKETMUTEX_LOCK	{\
+							socketmutex.Lock();	\
+							}
+
+#define SOCKETMUTEX_UNLOCK	{	\
+							socketmutex.Unlock();}
+
+CSingleComm::CSingleComm()
+{
+
+	m_socket = 0;
+}
+
+CSingleComm::~CSingleComm()
+{
+
+	m_socket = 0;
+}
+
+bool CSingleComm::Init()
+{
+	if (!CTCPComm::Init())
+		return false;
+
+	if (!socketmutex.IsInitialized())
+	{
+		if (socketmutex.Init() < 0)
+			return false;
+	}
+
+	return true;
+}
+
+int CSingleComm::OnPollThreadError(int status)
+{
+
+	return -1;
+}
+
+int CSingleComm::Poll()
+{
+	int nRes;
+	SOCKETMUTEX_LOCK
+
+	if (m_socket == 0)
+	{
+		SOCKETMUTEX_UNLOCK
+		return 0;
+	}
+
+	nRes = m_socket->Poll();
+	if (nRes < 0)
+	{
+		SOCKETMUTEX_UNLOCK
+		return nRes;
+	}
+
+	m_socket->SetStatus(nRes);
+
+	SOCKETMUTEX_UNLOCK
+	return nRes;
+}
+
+int CSingleComm::PolledSocket()
+{
+
+	SOCKETMUTEX_LOCK
+
+	if (m_socket == 0)
+	{
+		SOCKETMUTEX_UNLOCK
+		return 0;
+	}
+
+	m_socket->OnEvent();
+
+	SOCKETMUTEX_UNLOCK
+	return 1;
+}
+
+void CSingleComm::Attach(CAsyncSocketEx* socket)
+{
+	SOCKETMUTEX_LOCK
+
+	m_socket = socket;
+	SOCKETMUTEX_UNLOCK
+}
+
+CAsyncSocketEx* CSingleComm::Detach()
+{
+	SOCKETMUTEX_LOCK
+	CAsyncSocketEx* p = m_socket;
+	m_socket = 0;
+	SOCKETMUTEX_UNLOCK
+	return p;
+}
+
+void CSingleComm::OnPollThreadStep()
+{
+	usleep(200000);
+}

Added: incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.h
URL: http://svn.apache.org/viewvc/incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.h?rev=885392&view=auto
==============================================================================
--- incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.h (added)
+++ incubator/bluesky/trunk/RealClass/Teacher/src/singlecomm.h Mon Nov 30 12:01:23 2009
@@ -0,0 +1,56 @@
+/** \file singlecomm.h interface for the CSingleComm class.
+*
+*
+*Licensed to the Apache Software Foundation (ASF) under one
+*or more contributor license agreements.  See the NOTICE file
+*distributed with this work for additional information
+*regarding copyright ownership.  The ASF licenses this file
+*to you under the Apache License, Version 2.0 (the
+*"License"); you may not use this file except in compliance
+*with the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+*Unless required by applicable law or agreed to in writing,
+*software distributed under the License is distributed on an
+*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*KIND, either express or implied.  See the License for the
+*specific language governing permissions and limitations
+*under the License. 
+*/ 
+
+#if !defined(SINGLECOMM_H)
+#define SINGLECOMM_H
+
+#include <jmutex.h>
+#include "tcpcomm.h"
+//!single communication
+class CSingleComm: public CTCPComm
+{
+public:	
+	//!Constructor
+	CSingleComm();
+	//!Destructor
+	virtual ~CSingleComm();
+	//!Detach socket
+	CAsyncSocketEx* Detach();
+	//Attach socket
+	void Attach(CAsyncSocketEx* socket);
+	//!Initialise the communication
+	virtual bool Init();
+
+protected:
+	//!time steps of polling
+	virtual void OnPollThreadStep();
+	//!if poll thread error return -1
+	virtual int OnPollThreadError(int status);
+	//!poll socket , return the status of socket
+	virtual int PolledSocket();
+	virtual int Poll();
+
+private:
+	JMutex socketmutex;
+	CAsyncSocketEx* m_socket;
+};
+
+#endif // !defined(SINGLECOMM_H)



Mime
View raw message