Skip to content

Commit

Permalink
macOS fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed May 10, 2024
1 parent 10deb78 commit ae1404a
Show file tree
Hide file tree
Showing 5 changed files with 927 additions and 887 deletions.
22 changes: 11 additions & 11 deletions mrv2/lib/mrvFLU/Flu_Entry.cpp
Expand Up @@ -14,6 +14,7 @@
#include "mrvUI/mrvAsk.h"

using namespace tl;
using namespace tl::ui;

Fl_Pixmap preview_img((char* const*)monalisa_xpm),
file_list_img((char* const*)filelist_xpm),
Expand Down Expand Up @@ -48,18 +49,18 @@ struct Flu_Entry::Private
struct Options
{
bool thumbnail = true;
int thumbnailHeight = 64;
int thumbnailHeight = 64;
};
Options options;

struct InfoData
{
bool init = true;
InfoRequest request;
std::unique_ptr<io::Info> info;
};
InfoData info;

struct ThumbnailData
{
bool init = true;
Expand All @@ -79,7 +80,7 @@ Flu_Entry::Flu_Entry(

// p.fileInfo = fileInfo;
p.thumbnailGenerator = thumbnailGenerator;

resize(0, 0, DEFAULT_ENTRY_WIDTH, 20);
textsize(12);
box(FL_BORDER_BOX);
Expand All @@ -105,7 +106,6 @@ Flu_Entry::Flu_Entry(
updateIcon();
}


void Flu_Entry::updateIcon()
{
Flu_File_Chooser::FileTypeInfo* tt = nullptr;
Expand Down Expand Up @@ -225,8 +225,8 @@ void Flu_Entry::set_colors()
int Flu_Entry::handle(int event)
{
TLRENDER_P();
switch(event)

switch (event)
{
case FL_SHOW:
{
Expand Down Expand Up @@ -552,7 +552,7 @@ void Flu_Entry::updateSize()
H = icon->h() + 4;
}
// if (delete_icon)
H += 24;
H += 24;
}
if (type == ENTRY_FAVORITE || chooser->fileListWideBtn->value())
{
Expand Down Expand Up @@ -643,14 +643,14 @@ void Flu_Entry::updateSize()
Flu_Entry::~Flu_Entry()
{
TLRENDER_P();

if (p.info.request.future.valid())
{
p.thumbnailGenerator->cancelRequests({ p.info.request.id });
p.thumbnailGenerator->cancelRequests({p.info.request.id});
}
if (p.thumbnail.request.future.valid())
{
p.thumbnailGenerator->cancelRequests({ p.thumbnail.request.id });
p.thumbnailGenerator->cancelRequests({p.thumbnail.request.id});
}
}

Expand Down
37 changes: 11 additions & 26 deletions mrv2/lib/mrvFLU/Flu_Entry.h
Expand Up @@ -6,36 +6,21 @@

#include <FL/Fl_Input.H>


extern Fl_Pixmap preview_img,
file_list_img,
file_listwide_img,
fileDetails,
desktop,
folder_closed,
default_file,
my_computer,
computer,
disk_drive,
cd_drive,
floppy_drive,
removable_drive,
ram_drive,
network_drive,
documents,
little_favorites,
little_desktop, reel, picture,
music;
extern Fl_Pixmap preview_img, file_list_img, file_listwide_img, fileDetails,
desktop, folder_closed, default_file, my_computer, computer, disk_drive,
cd_drive, floppy_drive, removable_drive, ram_drive, network_drive,
documents, little_favorites, little_desktop, reel, picture, music;

class Flu_File_Chooser;
using namespace tl::ui;
using namespace tl;

class Flu_Entry : public Fl_Input
{
public:
Flu_Entry(
const char* name, int t, bool d, Flu_File_Chooser* c,
const std::shared_ptr<ThumbnailGenerator> thumbnailGenerator = nullptr);
const std::shared_ptr<ui::ThumbnailGenerator> thumbnailGenerator =
nullptr);
~Flu_Entry();

int handle(int event);
Expand All @@ -47,9 +32,9 @@ class Flu_Entry : public Fl_Input
void updateIcon();

inline static void _inputCB(Fl_Widget* w, void* arg)
{
((Flu_Entry*)arg)->inputCB();
}
{
((Flu_Entry*)arg)->inputCB();
}
void inputCB();

inline static void _editCB(void* arg) { ((Flu_Entry*)arg)->editCB(); }
Expand All @@ -69,7 +54,7 @@ class Flu_Entry : public Fl_Input

//! Convert our internal information to a tlRender friendly filename.
std::string toTLRender();

bool details;
int nameW, typeW, sizeW, dateW;

Expand Down

0 comments on commit ae1404a

Please sign in to comment.