* improved appended firmware detection [devinacker]
* added dynamic rate control support to ALSA and PulseAudio drivers [RedDwarf]
* added option to use native file dialogs
This commit is contained in:
byuu
2020-02-23 20:23:25 +09:00
parent c13745d753
commit d2211d8818
63 changed files with 1091 additions and 1154 deletions

View File

@@ -15,6 +15,11 @@ auto Log_Filter(const char* logDomain, GLogLevelFlags logLevel, const char* mess
print(terminal::color::yellow("hiro: "), logDomain, "::", message, "\n");
}
auto pApplication::exit() -> void {
quit();
::exit(EXIT_SUCCESS);
}
auto pApplication::modal() -> bool {
return Application::state().modal > 0;
}

View File

@@ -3,6 +3,7 @@
namespace hiro {
struct pApplication {
static auto exit() -> void;
static auto modal() -> bool;
static auto run() -> void;
static auto pendingEvents() -> bool;

View File

@@ -4,9 +4,12 @@ namespace hiro {
static auto BrowserWindow_addFilters(GtkWidget* dialog, vector<string> filters) -> void {
for(auto& filter : filters) {
auto part = filter.split("|", 1L);
if(part.size() != 2) continue;
GtkFileFilter* gtkFilter = gtk_file_filter_new();
gtk_file_filter_set_name(gtkFilter, filter);
auto patterns = filter.split("(", 1L)(1).trimRight(")", 1L).split(",").strip();
gtk_file_filter_set_name(gtkFilter, part[0]);
auto patterns = part[1].split(":");
for(auto& pattern : patterns) gtk_file_filter_add_pattern(gtkFilter, pattern);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), gtkFilter);
}

View File

@@ -32,6 +32,9 @@ auto pTableViewItem::setBackgroundColor(Color color) -> void {
auto pTableViewItem::setFocused() -> void {
if(auto parent = _parent()) {
//calling setSelected() and then setFocused() right after sometimes fails to set focus
Application::processEvents();
auto lock = parent->acquire();
GtkTreePath* path = gtk_tree_path_new_from_string(string{self().offset()});
gtk_tree_view_set_cursor(parent->gtkTreeView, path, nullptr, false);

View File

@@ -127,6 +127,8 @@ auto pWidget::setGeometry(Geometry geometry) -> void {
}
}
pSizable::setGeometry(geometry);
//this is needed to prevent some repainting issues (specifically with a Label which has a background color set for it)
gtk_widget_queue_draw(gtkWidget);
}
auto pWidget::setMouseCursor(const MouseCursor& mouseCursor) -> void {