Skip to content

Commit

Permalink
Rename DMX table to DMX desk
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Apr 10, 2011
1 parent 3db79dd commit 07aa3e8
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BINDIR=bin
OBJS=shellext.o sysconfig.o config.o fb.o input.o fbgrab.o shortcuts.o osc.o pngload.o flashvalid.o main.o

# GUI
OBJS+=messagebox.o filedialog.o resmgr.o guirender.o performance.o cp.o keyboard.o ir.o audio.o midi.o oscsettings.o dmxspy.o dmxtable.o dmx.o videoin.o patcheditor.o monitor.o firstpatch.o filemanager.o sysettings.o about.o flash.o shutdown.o
OBJS+=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 patcheditor.o monitor.o firstpatch.o filemanager.o sysettings.o about.o flash.o shutdown.o

# PDF
ifeq ($(WITH_PDF),1)
Expand Down
16 changes: 8 additions & 8 deletions src/dmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "resmgr.h"
#include "monitor.h"
#include "dmxspy.h"
#include "dmxtable.h"
#include "dmxdesk.h"
#include "dmx.h"

static int appid;
Expand Down Expand Up @@ -117,9 +117,9 @@ static void spy_callback(mtk_event *e, void *arg)
open_dmxspy_window();
}

static void table_callback(mtk_event *e, void *arg)
static void desk_callback(mtk_event *e, void *arg)
{
open_dmxtable_window();
open_dmxdesk_window();
}

static int w_open;
Expand All @@ -128,7 +128,7 @@ static void ok_callback(mtk_event *e, void *arg)
{
w_open = 0;
close_dmxspy_window();
close_dmxtable_window();
close_dmxdesk_window();
mtk_cmd(appid, "w.close()");
set_config();
}
Expand All @@ -137,7 +137,7 @@ static void close_callback(mtk_event *e, void *arg)
{
w_open = 0;
close_dmxspy_window();
close_dmxtable_window();
close_dmxdesk_window();
mtk_cmd(appid, "w.close()");
load_dmx_config();
}
Expand Down Expand Up @@ -170,15 +170,15 @@ void init_dmx()
"b_chain = new Button(-text \"Chain\")",
"sep1 = new Separator(-vertical yes)",
"b_spy = new Button(-text \"DMX spy\")",
"b_table = new Button(-text \"DMX table\")",
"b_desk = new Button(-text \"DMX desk\")",
"sep2 = new Separator(-vertical yes)",
"b_ok = new Button(-text \"OK\")",
"b_cancel = new Button(-text \"Cancel\")",
"g_btn.columnconfig(1, -size 20)",
"g_btn.place(b_chain, -column 2 -row 1)",
"g_btn.place(sep1, -column 3 -row 1)",
"g_btn.place(b_spy, -column 4 -row 1)",
"g_btn.place(b_table, -column 5 -row 1)",
"g_btn.place(b_desk, -column 5 -row 1)",
"g_btn.place(sep2, -column 6 -row 1)",
"g_btn.place(b_ok, -column 7 -row 1)",
"g_btn.place(b_cancel, -column 8 -row 1)",
Expand All @@ -203,7 +203,7 @@ void init_dmx()

mtk_bind(appid, "b_chain", "press", chain_callback, NULL);
mtk_bind(appid, "b_spy", "commit", spy_callback, NULL);
mtk_bind(appid, "b_table", "commit", table_callback, NULL);
mtk_bind(appid, "b_desk", "commit", desk_callback, NULL);

mtk_bind(appid, "b_ok", "commit", ok_callback, NULL);
mtk_bind(appid, "b_cancel", "commit", close_callback, NULL);
Expand Down
18 changes: 9 additions & 9 deletions src/dmxtable.c → src/dmxdesk.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Flickernoise
* Copyright (C) 2010 Sebastien Bourdeauducq
* Copyright (C) 2010, 2011 Sebastien Bourdeauducq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -26,7 +26,7 @@

#include "util.h"
#include "resmgr.h"
#include "dmxtable.h"
#include "dmxdesk.h"

static int appid;
static int dmx_fd;
Expand Down Expand Up @@ -79,14 +79,14 @@ static void slide_callback(mtk_event *e, void *arg)

static void close_callback(mtk_event *e, void *arg)
{
close_dmxtable_window();
close_dmxdesk_window();
}

void init_dmxtable()
void init_dmxdesk()
{
int i;

appid = mtk_init_app("DMX table");
appid = mtk_init_app("DMX desk");
mtk_cmd(appid, "g = new Grid()");

for(i=0;i<64;i++) {
Expand All @@ -105,7 +105,7 @@ void init_dmxtable()
mtk_cmd(appid, "chanbtn0.set(-state on)");

mtk_cmd(appid, "g.rowconfig(8, -size 150)");
mtk_cmd(appid, "w = new Window(-content g -title \"DMX table\" -workx 20 -worky 35)");
mtk_cmd(appid, "w = new Window(-content g -title \"DMX desk\" -workx 20 -worky 35)");

for(i=0;i<8;i++)
mtk_bindf(appid, "slide%d", "change", slide_callback, (void *)i, i);
Expand All @@ -115,11 +115,11 @@ void init_dmxtable()

static int w_open;

void open_dmxtable_window()
void open_dmxdesk_window()
{
if(w_open) return;
w_open = 1;
if(!resmgr_acquire("DMX table", RESOURCE_DMX_OUT))
if(!resmgr_acquire("DMX desk", RESOURCE_DMX_OUT))
return;
dmx_fd = open("/dev/dmx_out", O_RDWR);
if(dmx_fd == -1) {
Expand All @@ -131,7 +131,7 @@ void open_dmxtable_window()
mtk_cmd(appid, "w.open()");
}

void close_dmxtable_window()
void close_dmxdesk_window()
{
if(!w_open) return;
w_open = 0;
Expand Down
12 changes: 6 additions & 6 deletions src/dmxtable.h → src/dmxdesk.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Flickernoise
* Copyright (C) 2010 Sebastien Bourdeauducq
* Copyright (C) 2010, 2011 Sebastien Bourdeauducq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -15,11 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __DMXTABLE_H
#define __DMXTABLE_H
#ifndef __DMXDESK_H
#define __DMXDESK_H

void init_dmxtable();
void open_dmxtable_window();
void close_dmxtable_window();
void init_dmxdesk();
void open_dmxdesk_window();
void close_dmxdesk_window();

#endif /* __DMXTABLE_H */
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#include "midi.h"
#include "oscsettings.h"
#include "dmxspy.h"
#include "dmxtable.h"
#include "dmxdesk.h"
#include "dmx.h"
#include "videoin.h"
#include "patcheditor.h"
Expand Down Expand Up @@ -100,7 +100,7 @@ static rtems_task gui_task(rtems_task_argument argument)
init_midi();
init_oscsettings();
init_dmxspy();
init_dmxtable();
init_dmxdesk();
init_dmx();
init_videoin();
init_patcheditor();
Expand Down

0 comments on commit 07aa3e8

Please sign in to comment.