- now the mess with threads has gone away
- we have a class BaseThread -- this is a base class -- we can inherit from it when creating a new thread - others treads are correctly stopped (when signal comes) -- pthread_join - we have a special thread only for signals git-svn-id: svn://ttmath.org/publicrep/winix/trunk@685 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "dirs.h"
|
||||
#include "error.h"
|
||||
#include "log.h"
|
||||
#include "notify.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +25,12 @@ void Dirs::SetRequest(Request * prequest)
|
||||
}
|
||||
|
||||
|
||||
void Dirs::SetNotify(Notify * pnotify)
|
||||
{
|
||||
notify = pnotify;
|
||||
}
|
||||
|
||||
|
||||
void Dirs::Clear()
|
||||
{
|
||||
dir_tab.Clear();
|
||||
@@ -422,7 +427,7 @@ bool Dirs::DelDir(long dir_id)
|
||||
}
|
||||
|
||||
|
||||
Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir)
|
||||
Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir, int notify_code)
|
||||
{
|
||||
if( pdir )
|
||||
*pdir = 0;
|
||||
@@ -434,7 +439,6 @@ Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir)
|
||||
|
||||
if( status == WINIX_ERR_OK )
|
||||
{
|
||||
request->notify_code |= WINIX_NOTIFY_DIR_ADD;
|
||||
Item * d = AddDir(item);
|
||||
|
||||
if( add_to_dir_tab && !request->dir_tab.empty() && request->dir_tab.back()->id == item.parent_id )
|
||||
@@ -442,6 +446,9 @@ Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir)
|
||||
|
||||
if( pdir )
|
||||
*pdir = d;
|
||||
|
||||
if( notify_code )
|
||||
notify->ItemChanged(notify_code, item);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
Reference in New Issue
Block a user