Update to v095r11 release.

byuu says:

Changelog:
- SFC: "uint8 read(uint addr)" -> "uint8 read(uint addr, uint8 data)"
- hiro: mHorizontalLayout::setGeometry() return value
- hiro/GTK: ListView,TreeView::setFocused() does not grab focus of first
  item

Notes:
- nall/windows/utf8.hpp needs using uint = unsigned; at the top to
  compile
- sfc/balanced, sfc/performance won't compile yet

Seems Cx4 games broke a while back. Not from this WIP, either. I'll go
back and find out what's wrong now.
This commit is contained in:
Tim Allen
2015-12-14 20:41:06 +11:00
parent 78d49d3873
commit f2a416aea9
97 changed files with 1104 additions and 1030 deletions

View File

@@ -119,7 +119,13 @@ auto pListView::setBordered(bool bordered) -> void {
}
auto pListView::setFocused() -> void {
//gtk_widget_grab_focus() will select the first item if nothing is currently selected
//this behavior is undesirable. detect selection state first, and restore if required
lock();
bool selected = gtk_tree_selection_get_selected(gtkTreeSelection, nullptr, nullptr);
gtk_widget_grab_focus(gtkWidgetChild);
if(!selected) gtk_tree_selection_unselect_all(gtkTreeSelection);
unlock();
}
auto pListView::setFont(const Font& font) -> void {

View File

@@ -79,6 +79,16 @@ auto pTreeView::setBackgroundColor(Color color) -> void {
gtk_widget_modify_base(gtkWidgetChild, GTK_STATE_NORMAL, color ? &gdkColor : nullptr);
}
auto pTreeView::setFocused() -> void {
//gtk_widget_grab_focus() will select the first item if nothing is currently selected
//this behavior is undesirable. detect selection state first, and restore if required
lock();
bool selected = gtk_tree_selection_get_selected(gtkTreeSelection, nullptr, nullptr);
gtk_widget_grab_focus(gtkWidgetChild);
if(!selected) gtk_tree_selection_unselect_all(gtkTreeSelection);
unlock();
}
auto pTreeView::setForegroundColor(Color color) -> void {
auto gdkColor = CreateColor(color);
gtk_widget_modify_text(gtkWidgetChild, GTK_STATE_NORMAL, color ? &gdkColor : nullptr);

View File

@@ -8,6 +8,7 @@ struct pTreeView : pWidget {
auto append(sTreeViewItem item) -> void;
auto remove(sTreeViewItem item) -> void;
auto setBackgroundColor(Color color) -> void;
auto setFocused() -> void override;
auto setForegroundColor(Color color) -> void;
auto _activatePath(GtkTreePath* gtkPath) -> void;