Skip to content

Commit

Permalink
Add wireless (wireless over OpenWrt router) configure code
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangfu committed Jul 4, 2012
1 parent 6f21cf4 commit 260e2d0
Show file tree
Hide file tree
Showing 5 changed files with 650 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Makefile
Expand Up @@ -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

Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/gui/sysettings.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()",
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 260e2d0

Please sign in to comment.