-- Added folders in fonts
This commit is contained in:
parent
13eb54a29d
commit
8ba0c751cb
5 changed files with 100 additions and 100 deletions
|
@ -131,7 +131,35 @@ static void fileselector_output(t_fileselector* x)
|
|||
if((x->x_type > 74) && (x->x_type<100)) // Make the fonts path
|
||||
{
|
||||
strncat(path,"/fonts/*",8);
|
||||
}
|
||||
switch(glob(path, GLOB_TILDE, NULL, &glob_buffer))
|
||||
{
|
||||
case GLOB_NOSPACE:
|
||||
pd_error(x,"[fileselector] out of memory for \"%s\"",path);
|
||||
break;
|
||||
# ifdef GLOB_ABORTED
|
||||
case GLOB_ABORTED:
|
||||
pd_error(x,"[fileselector] aborted \"%s\"",path);
|
||||
break;
|
||||
# endif
|
||||
# ifdef GLOB_NOMATCH
|
||||
case GLOB_NOMATCH:
|
||||
pd_error(x,"[fileselector] nothing found for %s ",path);
|
||||
break;
|
||||
# endif
|
||||
}
|
||||
i = x->x_folder;
|
||||
if (i < glob_buffer.gl_pathc)
|
||||
{
|
||||
strncpy(path, glob_buffer.gl_pathv[i],strnlen(glob_buffer.gl_pathv[i],FILENAME_MAX));
|
||||
strncat(path, "/*", 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
post("fileselector: folder is greater than the number of folders");
|
||||
globfree(&glob_buffer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(x->x_type == 256) // Make the path sound
|
||||
{
|
||||
strncat(path,"/sound/*",8);
|
||||
|
@ -233,7 +261,6 @@ void fileselector_setup(void)
|
|||
fileselector_class = class_new(gensym("fileselector"),(t_newmethod)fileselector_new,0,sizeof(t_fileselector),0,A_DEFSYMBOL,A_DEFFLOAT,A_DEFFLOAT,A_DEFFLOAT, 0);
|
||||
/* add inlet datatype methods */
|
||||
class_addbang(fileselector_class,(t_method) fileselector_output);
|
||||
// class_addsymbol(fileselector_class,(t_method) fileselector_symbol);
|
||||
/* add inlet message methods */
|
||||
class_addmethod(fileselector_class,(t_method)fileselector_set,gensym("set"),A_DEFSYMBOL, 0);
|
||||
// add inlet folder
|
||||
|
|
|
@ -88,11 +88,10 @@ quint8 universe_audio;
|
|||
bool audioCheck;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Constructor
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
libreMediaServer::libreMediaServer(QStringList args, QWidget *parent)
|
||||
: QMainWindow(parent),
|
||||
m_startvideo(0),
|
||||
|
@ -850,9 +849,7 @@ void libreMediaServer::on_video_stateChanged(int state)
|
|||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Pure Data Video
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
// Start the PD Process, open the ports and connects stdout de Pure Data.
|
||||
|
@ -1362,9 +1359,7 @@ void libreMediaServer::on_audio_stateChanged(int state)
|
|||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Pure Data Audio
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
// Start the PD Process, open the ports and connects stdout de Pure Data.
|
||||
|
@ -1550,9 +1545,7 @@ void libreMediaServer::errorsending_audio() {
|
|||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Previews
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
// GUI
|
||||
|
@ -1561,6 +1554,7 @@ void libreMediaServer::previewMaster()
|
|||
QPixmap preview = QPixmap::grabWindow(QApplication::desktop()->winId(), ui.winpositionx->value() , ui.winpositiony->value(),ui.winsizex->value(),ui.winsizey->value());
|
||||
ui.masterPreview->setPixmap(preview);
|
||||
}
|
||||
|
||||
// CITP/MSEx 1.0
|
||||
void libreMediaServer::sendFrame()
|
||||
{
|
||||
|
@ -1651,12 +1645,9 @@ void libreMediaServer::on_previewLayer_stateChanged (int state)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Terminal and Log
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Sacamos la salida de Pure Data Audio en la terminal
|
||||
void libreMediaServer::stdout_audio() {
|
||||
|
@ -1735,11 +1726,7 @@ void libreMediaServer::stdout() {
|
|||
break;
|
||||
case '9':
|
||||
out.remove(0,9);
|
||||
qDebug() <<out;
|
||||
bool ok;
|
||||
int fps;
|
||||
fps = out.toInt(&ok,10);
|
||||
ui.fpsCounter->display(fps);
|
||||
ui.fpsCounter->display(out.toInt());
|
||||
break;
|
||||
default:
|
||||
qDebug()<<"stdout:Invalid cookie received"<<out;
|
||||
|
|
|
@ -689,10 +689,10 @@
|
|||
<widget class="QLCDNumber" name="fpsCounter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>493</x>
|
||||
<y>320</y>
|
||||
<x>483</x>
|
||||
<y>322</y>
|
||||
<width>61</width>
|
||||
<height>23</height>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="numDigits">
|
||||
|
@ -702,8 +702,8 @@
|
|||
<widget class="QLabel" name="fpsLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>350</y>
|
||||
<x>550</x>
|
||||
<y>340</y>
|
||||
<width>31</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue