Permalink
Browse files

Add wireless (wireless over OpenWrt router) configure code

  • Loading branch information...
1 parent 6f21cf4 commit 260e2d0e6765e3335f55d28c240446c64f3ee4dc @xiangfu xiangfu committed May 14, 2012
Showing with 650 additions and 2 deletions.
  1. +3 −2 src/Makefile
  2. +9 −0 src/gui/sysettings.c
  3. +612 −0 src/gui/wireless.c
  4. +24 −0 src/gui/wireless.h
  5. +2 −0 src/main.c
View
@@ -42,7 +42,7 @@ LDFLAGS = -mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled \
-msign-extend-enabled -B$(RTEMS_MAKEFILE_PATH)/lib \
-specs bsp_specs -qrtems
LIBS = -lnfs -lftpd -ltelnetd -lyaffs2 -lmtk -llop -lfpvm -lpng -ljpeg \
- -lcurl -lexpat -lz -lm
+ -lcurl -lexpat -ljansson -lz -lm
OBJDIR = obj
BINDIR = bin
@@ -53,7 +53,8 @@ OBJS += $(addprefix pixbuf/,dither.o loaderjpeg.o loaderpng.o manager.o)
OBJS += $(addprefix gui/,messagebox.o filedialog.o resmgr.o guirender.o \
performance.o cp.o keyboard.o ir.o audio.o midi.o oscsettings.o \
dmxspy.o dmxdesk.o dmx.o videoin.o rsswall.o patcheditor.o monitor.o \
- firstpatch.o filemanager.o sysettings.o about.o flash.o shutdown.o)
+ firstpatch.o filemanager.o sysettings.o about.o flash.o shutdown.o \
+ wireless.o )
ifeq ($(WITH_PDF),1)
OBJS += $(addprefix gui/,pdfreader.o)
CFLAGS += -DWITH_PDF
@@ -24,6 +24,7 @@
#include "../sysconfig.h"
#include "filedialog.h"
#include "sysettings.h"
+#include "wireless.h"
static int appid;
static struct filedialog *browse_wallpaper_dlg;
@@ -68,6 +69,11 @@ static void dhcp_callback(mtk_event *e, void *arg)
update_network();
}
+static void wireless_callback(mtk_event *e, void *arg)
+{
+ open_wireless_window();
+}
+
static int current_asmode;
static void asmode_callback(mtk_event *e, void *arg)
@@ -206,8 +212,10 @@ void init_sysettings(void)
"g_network1 = new Grid()",
"l_dhcp = new Label(-text \"DHCP client:\")",
"b_dhcp = new Button(-text \"Enable\")",
+ "b_wireless = new Button(-text \"Wireless over Ethernet\")",
"g_network1.place(l_dhcp, -column 1 -row 1)",
"g_network1.place(b_dhcp, -column 2 -row 1)",
+ "g_network1.place(b_wireless, -column 3 -row 1)",
"g_network2 = new Grid()",
"l_ip = new Label(-text \"IP address:\")",
"e_ip = new Entry()",
@@ -314,6 +322,7 @@ void init_sysettings(void)
mtk_bind(appid, "b_kbd_german", "press", layout_callback, (void *)SC_KEYBOARD_LAYOUT_GERMAN);
mtk_bind(appid, "b_dhcp", "press", dhcp_callback, NULL);
+ mtk_bind(appid, "b_wireless", "press", wireless_callback, NULL);
mtk_bind(appid, "b_asmode_none", "press", asmode_callback, (void *)SC_AUTOSTART_NONE);
mtk_bind(appid, "b_asmode_simple", "press", asmode_callback, (void *)SC_AUTOSTART_SIMPLE);
Oops, something went wrong.

0 comments on commit 260e2d0

Please sign in to comment.