Skip to content

Commit

Permalink
cleaned up threads intercom, readded notifications and notification s…
Browse files Browse the repository at this point in the history
…ettings, added image metainfo and drag and drop
  • Loading branch information
fszontagh committed Feb 20, 2024
1 parent 2bfd7ce commit 20ad28f
Show file tree
Hide file tree
Showing 15 changed files with 1,279 additions and 418 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ find_package(nlohmann_json CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(unofficial-curlpp CONFIG REQUIRED)
find_package(imageinfo CONFIG REQUIRED)
find_package(PNG REQUIRED)
find_package(libjpeg-turbo CONFIG REQUIRED)

find_package(exiv2 CONFIG REQUIRED)


target_compile_definitions(${PROJECT_NAME} PRIVATE ${wxWidgets_DEFINITIONS} "$<$<CONFIG:DEBUG>:${wxWidgets_DEFINITIONS_DEBUG}>")
Expand All @@ -124,11 +122,11 @@ string(REPLACE " " ";" INSTALLED_GPU_CCS_3 "${INSTALLED_GPU_CCS_2}")
string(REPLACE "." "" CUDA_ARCH_LIST "${INSTALLED_GPU_CCS_3}")
SET(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCH_LIST})

target_link_libraries(${PROJECT_NAME} PRIVATE stable-diffusion ggml unofficial::curlpp::curlpp OpenSSL::Crypto CUDA::cudart CUDA::cublas CUDA::cublasLt CUDA::cuda_driver nlohmann_json::nlohmann_json fmt::fmt wx::core wx::base wx::xrc wx::adv wx::richtext wx::aui wx::propgrid wx::html imageinfo::imageinfo PNG::PNG $<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>)
target_link_libraries(${PROJECT_NAME} PRIVATE stable-diffusion ggml unofficial::curlpp::curlpp OpenSSL::Crypto CUDA::cudart CUDA::cublas CUDA::cublasLt CUDA::cuda_driver nlohmann_json::nlohmann_json fmt::fmt wx::core wx::base wx::xrc wx::adv wx::richtext wx::aui wx::propgrid wx::html imageinfo::imageinfo Exiv2::exiv2lib)

else()
set(CUDA_MODULES "")
target_link_libraries(${PROJECT_NAME} PRIVATE stable-diffusion ggml unofficial::curlpp::curlpp OpenSSL::Crypto nlohmann_json::nlohmann_json fmt::fmt wx::core wx::base wx::xrc wx::adv wx::richtext wx::aui wx::propgrid wx::html imageinfo::imageinfo PNG::PNG $<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>)
target_link_libraries(${PROJECT_NAME} PRIVATE stable-diffusion ggml unofficial::curlpp::curlpp OpenSSL::Crypto nlohmann_json::nlohmann_json fmt::fmt wx::core wx::base wx::xrc wx::adv wx::richtext wx::aui wx::propgrid wx::html imageinfo::imageinfo Exiv2::exiv2lib)
ENDIF()


Expand Down
65 changes: 53 additions & 12 deletions ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ UI::UI( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& p
bSizer17->Fit( m_jobs_panel );
m_notebook1302->AddPage( m_jobs_panel, wxT("Jobs and Images"), false );
m_text2img_panel = new wxPanel( m_notebook1302, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_text2img_panel->DragAcceptFiles( true );

wxBoxSizer* sizer0004;
sizer0004 = new wxBoxSizer( wxVERTICAL );

Expand Down Expand Up @@ -457,7 +459,7 @@ UI::UI( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& p

bSizer20->Add( bSizer63, 0, wxEXPAND|wxALL, 5 );

m_data_model_list = new wxDataViewListCtrl( m_models_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0|wxFULL_REPAINT_ON_RESIZE );
m_data_model_list = new wxDataViewListCtrl( m_models_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_SINGLE|wxFULL_REPAINT_ON_RESIZE );
bSizer20->Add( m_data_model_list, 1, wxALL|wxEXPAND, 5 );


Expand Down Expand Up @@ -563,6 +565,7 @@ UI::UI( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& p
m_delete_all_jobs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UI::onJobsDelete ), NULL, this );
m_joblist->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( UI::OnJobListItemActivated ), NULL, this );
m_joblist->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( UI::onContextMenu ), NULL, this );
m_text2img_panel->Connect( wxEVT_DROP_FILES, wxDropFilesEventHandler( UI::onTxt2ImgFileDrop ), NULL, this );
m_generate2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UI::onGenerate ), NULL, this );
m_controlnetImageOpen->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( UI::OnControlnetImageOpen ), NULL, this );
m_controlnetImagePreviewButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UI::OnControlnetImagePreviewButton ), NULL, this );
Expand Down Expand Up @@ -600,6 +603,7 @@ UI::~UI()
m_delete_all_jobs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UI::onJobsDelete ), NULL, this );
m_joblist->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( UI::OnJobListItemActivated ), NULL, this );
m_joblist->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( UI::onContextMenu ), NULL, this );
m_text2img_panel->Disconnect( wxEVT_DROP_FILES, wxDropFilesEventHandler( UI::onTxt2ImgFileDrop ), NULL, this );
m_generate2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UI::onGenerate ), NULL, this );
m_controlnetImageOpen->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( UI::OnControlnetImageOpen ), NULL, this );
m_controlnetImagePreviewButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UI::OnControlnetImagePreviewButton ), NULL, this );
Expand Down Expand Up @@ -828,13 +832,19 @@ Settings::Settings( wxWindow* parent, wxWindowID id, const wxString& title, cons

bSizer10->Add( m_staticText16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

wxString m_choice4Choices[] = { wxT(".png"), wxT(".jpg") };
int m_choice4NChoices = sizeof( m_choice4Choices ) / sizeof( wxString );
m_choice4 = new wxChoice( m_settings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choice4NChoices, m_choice4Choices, 0 );
m_choice4->SetSelection( 0 );
m_choice4->Enable( false );
wxString m_image_typeChoices[] = { wxT("JPG"), wxT("PNG") };
int m_image_typeNChoices = sizeof( m_image_typeChoices ) / sizeof( wxString );
m_image_type = new wxChoice( m_settings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_image_typeNChoices, m_image_typeChoices, 0 );
m_image_type->SetSelection( 0 );
bSizer10->Add( m_image_type, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

m_image_quality = new wxSlider( m_settings, wxID_ANY, 95, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
m_image_quality->SetToolTip( wxT("Image output quality, default: 90%") );

bSizer10->Add( m_image_quality, 0, wxALL, 5 );

bSizer10->Add( m_choice4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_image_quality_spin = new wxSpinCtrl( m_settings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 95 );
bSizer10->Add( m_image_quality_spin, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );


sizer2017->Add( bSizer10, 0, wxALL, 5 );
Expand All @@ -849,7 +859,7 @@ Settings::Settings( wxWindow* parent, wxWindowID id, const wxString& title, cons
bSizer22->Add( m_staticText191, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

m_threads = new wxSpinCtrl( m_settings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -1, 100, 2 );
bSizer22->Add( m_threads, 0, wxALL, 5 );
bSizer22->Add( m_threads, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );


sizer2017->Add( bSizer22, 0, wxALL, 5 );
Expand All @@ -864,11 +874,20 @@ Settings::Settings( wxWindow* parent, wxWindowID id, const wxString& title, cons
bSizer30 = new wxBoxSizer( wxHORIZONTAL );

wxBoxSizer* bSizer31;
bSizer31 = new wxBoxSizer( wxVERTICAL );
bSizer31 = new wxBoxSizer( wxHORIZONTAL );

m_show_notifications = new wxCheckBox( m_settings_ui, wxID_ANY, wxT("Show notifications"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_show_notifications->SetValue(true);
bSizer31->Add( m_show_notifications, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

m_staticText60 = new wxStaticText( m_settings_ui, wxID_ANY, wxT("Notification timeout:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText60->Wrap( -1 );
bSizer31->Add( m_staticText60, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

m_notification_timeout = new wxSpinCtrl( m_settings_ui, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 30, 120, 60 );
m_notification_timeout->SetToolTip( wxT("The timeout is depends on the OS and notification type") );

m_checkBox5 = new wxCheckBox( m_settings_ui, wxID_ANY, wxT("Show notifications"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_checkBox5->SetValue(true);
bSizer31->Add( m_checkBox5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bSizer31->Add( m_notification_timeout, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );


bSizer30->Add( bSizer31, 1, wxALL, 5 );
Expand All @@ -893,12 +912,34 @@ Settings::Settings( wxWindow* parent, wxWindowID id, const wxString& title, cons
this->Centre( wxBOTH );

// Connect Events
m_image_quality->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality_spin->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( Settings::OnImgQualitySpin ), NULL, this );
m_show_notifications->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( Settings::onShowNotificationCheck ), NULL, this );
m_save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Settings::onSave ), NULL, this );
}

Settings::~Settings()
{
// Disconnect Events
m_image_quality->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( Settings::OnImgQualityScroll ), NULL, this );
m_image_quality_spin->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( Settings::OnImgQualitySpin ), NULL, this );
m_show_notifications->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( Settings::onShowNotificationCheck ), NULL, this );
m_save->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Settings::onSave ), NULL, this );

}
Expand Down
13 changes: 11 additions & 2 deletions ui/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <wx/notebook.h>
#include <wx/statusbr.h>
#include <wx/frame.h>
#include <wx/slider.h>
#include <wx/scrolwin.h>
#include <wx/splitter.h>
#include <wx/dialog.h>
Expand Down Expand Up @@ -138,6 +139,7 @@ class UI : public wxFrame
virtual void onJobsDelete( wxCommandEvent& event ) { event.Skip(); }
virtual void OnJobListItemActivated( wxDataViewEvent& event ) { event.Skip(); }
virtual void onContextMenu( wxDataViewEvent& event ) { event.Skip(); }
virtual void onTxt2ImgFileDrop( wxDropFilesEvent& event ) { event.Skip(); }
virtual void onGenerate( wxCommandEvent& event ) { event.Skip(); }
virtual void OnControlnetImageOpen( wxFileDirPickerEvent& event ) { event.Skip(); }
virtual void OnControlnetImagePreviewButton( wxCommandEvent& event ) { event.Skip(); }
Expand Down Expand Up @@ -198,14 +200,21 @@ class Settings : public wxFrame
wxCheckBox* m_keep_model_in_memory;
wxCheckBox* m_save_all_image;
wxStaticText* m_staticText16;
wxChoice* m_choice4;
wxChoice* m_image_type;
wxSlider* m_image_quality;
wxSpinCtrl* m_image_quality_spin;
wxStaticText* m_staticText191;
wxSpinCtrl* m_threads;
wxPanel* m_settings_ui;
wxCheckBox* m_checkBox5;
wxCheckBox* m_show_notifications;
wxStaticText* m_staticText60;
wxSpinCtrl* m_notification_timeout;
wxButton* m_save;

// Virtual event handlers, override them in your derived class
virtual void OnImgQualityScroll( wxScrollEvent& event ) { event.Skip(); }
virtual void OnImgQualitySpin( wxSpinEvent& event ) { event.Skip(); }
virtual void onShowNotificationCheck( wxCommandEvent& event ) { event.Skip(); }
virtual void onSave( wxCommandEvent& event ) { event.Skip(); }


Expand Down
2 changes: 2 additions & 0 deletions ui/MainWindowImageViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ void MainWindowImageViewer::SetData(QM::QueueItem item)
this->m_bitmap6->Center();
this->m_bitmap6->Refresh();
this->Refresh();
this->Layout();
}
}
}
Expand Down Expand Up @@ -75,6 +76,7 @@ void MainWindowImageViewer::SetData(QM::QueueItem item)
this->m_scrolledWindow2->Refresh();
this->m_bitmap6->Refresh();
this->Refresh();
this->Layout();
this->m_static_id->SetLabel(wxString::Format("%d", item.id));
this->m_static_type->SetLabel(sd_gui_utils::modes_str[item.mode]);

Expand Down
79 changes: 62 additions & 17 deletions ui/MainWindowSettings.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "MainWindowSettings.h"

MainWindowSettings::MainWindowSettings( wxWindow* parent )
:
Settings( parent )
MainWindowSettings::MainWindowSettings(wxWindow *parent)
: Settings(parent)
{
this->ini_path = wxStandardPaths::Get().GetUserConfigDir() + wxFileName::GetPathSeparator() + "sd.ui.config.ini";

Expand All @@ -12,23 +11,48 @@ Settings( parent )
this->InitConfig();
}

void MainWindowSettings::onSave( wxCommandEvent& event )
void MainWindowSettings::OnImgQualityScroll(wxScrollEvent &event)
{
this->fileConfig->Write("/paths/lora", this->m_lora_dir->GetPath());
this->fileConfig->Write("/paths/model", this->m_model_dir->GetPath());
this->fileConfig->Write("/paths/vae", this->m_vae_dir->GetPath());
this->fileConfig->Write("/paths/embedding", this->m_embedding_dir->GetPath());
this->fileConfig->Write("/paths/taesd", this->m_taesd_dir->GetPath());
this->fileConfig->Write("/paths/controlnet", this->m_controlnet_dir->GetPath());
this->fileConfig->Write("/paths/presets", this->m_presets_dir->GetPath());
this->fileConfig->Write("/keep_model_in_memory", this->m_keep_model_in_memory->GetValue());
this->fileConfig->Write("/save_all_image", this->m_save_all_image->GetValue());
this->fileConfig->Write("/n_threads", this->m_threads->GetValue());
this->fileConfig->Write("/paths/output", this->m_images_output->GetPath());
this->fileConfig->Flush();
this->Close();
// TODO: Implement OnImgQualityScroll
this->m_image_quality_spin->SetValue(this->m_image_quality->GetValue());
}

void MainWindowSettings::OnImgQualitySpin(wxSpinEvent &event)
{
// TODO: Implement OnImgQualitySpin
this->m_image_quality->SetValue(this->m_image_quality_spin->GetValue());
}

void MainWindowSettings::onShowNotificationCheck(wxCommandEvent &event)
{
// TODO: Implement onShowNotificationCheck
if (!this->m_show_notifications->IsChecked())
{
this->m_notification_timeout->Disable();
this->cfg->notification_timeout = 60;
}
}

void MainWindowSettings::onSave(wxCommandEvent &event)
{
this->fileConfig->Write("/paths/lora", this->m_lora_dir->GetPath());
this->fileConfig->Write("/paths/model", this->m_model_dir->GetPath());
this->fileConfig->Write("/paths/vae", this->m_vae_dir->GetPath());
this->fileConfig->Write("/paths/embedding", this->m_embedding_dir->GetPath());
this->fileConfig->Write("/paths/taesd", this->m_taesd_dir->GetPath());
this->fileConfig->Write("/paths/controlnet", this->m_controlnet_dir->GetPath());
this->fileConfig->Write("/paths/presets", this->m_presets_dir->GetPath());
this->fileConfig->Write("/keep_model_in_memory", this->m_keep_model_in_memory->GetValue());
this->fileConfig->Write("/save_all_image", this->m_save_all_image->GetValue());
this->fileConfig->Write("/n_threads", this->m_threads->GetValue());
this->fileConfig->Write("/paths/output", this->m_images_output->GetPath());
this->fileConfig->Write("/image_quality", this->m_image_quality->GetValue());
this->fileConfig->Write("/image_type", sd_gui_utils::image_types_str[this->m_image_type->GetSelection()]);
this->fileConfig->Write("/show_notification", this->m_show_notifications->GetValue());
this->fileConfig->Write("/notification_timeout", this->m_notification_timeout->GetValue());
this->fileConfig->Flush();
this->Close();
}

void MainWindowSettings::InitConfig()
{
Expand Down Expand Up @@ -67,6 +91,23 @@ void MainWindowSettings::InitConfig()
this->cfg->keep_model_in_memory = this->fileConfig->Read("/keep_model_in_memory", this->cfg->keep_model_in_memory);
this->cfg->save_all_image = this->fileConfig->Read("/save_all_image", this->cfg->save_all_image);
this->cfg->n_threads = this->fileConfig->Read("/n_threads", cores());
this->cfg->image_quality = this->fileConfig->Read("/image_quality", this->cfg->image_quality);
this->cfg->show_notifications = this->fileConfig->ReadBool("/show_notification", this->cfg->show_notifications);
this->cfg->notification_timeout = this->fileConfig->Read("/notification_timeout", this->cfg->notification_timeout);

int idx = 0;
auto saved_image_type = this->fileConfig->Read("/image_type", "JPG");

for (auto type : sd_gui_utils::image_types_str)
{
if (saved_image_type == type)
{
this->m_image_type->Select(idx);
this->cfg->image_type = (sd_gui_utils::imageTypes)idx;
break;
}
idx++;
}

this->m_lora_dir->SetPath(this->cfg->lora);
this->m_model_dir->SetPath(this->cfg->model);
Expand All @@ -79,4 +120,8 @@ void MainWindowSettings::InitConfig()
this->m_keep_model_in_memory->SetValue(this->cfg->keep_model_in_memory);
this->m_save_all_image->SetValue(this->cfg->save_all_image);
this->m_threads->SetValue(this->cfg->n_threads);
this->m_image_quality->SetValue(this->cfg->image_quality);
this->m_image_type->Select((int)this->cfg->image_type);
this->m_show_notifications->SetValue(this->cfg->show_notifications);
this->m_notification_timeout->SetValue(this->cfg->notification_timeout);
}
6 changes: 6 additions & 0 deletions ui/MainWindowSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class MainWindowSettings : public Settings
{
protected:
// Handlers for Settings events.
void OnImgQualityScroll( wxScrollEvent& event );
void OnImgQualitySpin( wxSpinEvent& event );
void onShowNotificationCheck( wxCommandEvent& event );
void onSave( wxCommandEvent& event );
public:
/** Constructor */
Expand All @@ -41,6 +44,9 @@ class MainWindowSettings : public Settings






};

#endif // __MainWindowSettings__
Loading

0 comments on commit 20ad28f

Please sign in to comment.