Fix search related issues
* Back button still visible after closing games search
* Search bar being insensitve after closing games search
* Search button still active after closing search with keybinding
vinszent
7 years ago
132 | 132 |
|
133 | 133 |
g_object_bind_property(self, "search-active",
|
134 | 134 |
priv->search_bar, "search-mode-enabled",
|
135 | |
G_BINDING_DEFAULT);
|
|
135 |
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
136 | 136 |
}
|
137 | 137 |
|
138 | 138 |
/* Should only be used by children */
|
46 | 46 |
g_assert(GTK_IS_STACK(container_stack));
|
47 | 47 |
|
48 | 48 |
if (gt_container_view_get_search_active(GT_CONTAINER_VIEW(self)))
|
|
49 |
gtk_stack_set_visible_child(GTK_STACK(container_stack), GTK_WIDGET(priv->search_container));
|
|
50 |
else
|
49 | 51 |
{
|
50 | 52 |
g_object_set(self, "show-back-button", FALSE, NULL);
|
51 | 53 |
|
52 | |
gtk_stack_set_visible_child(GTK_STACK(container_stack), GTK_WIDGET(priv->search_container));
|
|
54 |
gtk_stack_set_visible_child(GTK_STACK(container_stack), GTK_WIDGET(priv->top_container));
|
|
55 |
|
|
56 |
gtk_widget_set_sensitive(gt_container_view_get_search_bar(GT_CONTAINER_VIEW(self)), TRUE);
|
53 | 57 |
}
|
54 | |
else
|
55 | |
gtk_stack_set_visible_child(GTK_STACK(container_stack), GTK_WIDGET(priv->top_container));
|
56 | 58 |
}
|
57 | 59 |
|
58 | 60 |
static void
|
|
159 | 161 |
gtk_widget_set_sensitive(search_bar, FALSE);
|
160 | 162 |
}
|
161 | 163 |
|
162 | |
|
163 | 164 |
g_object_set(priv->game_container, "game", gt_game_get_name(game), NULL);
|
164 | 165 |
|
165 | 166 |
g_object_set(self, "show-back-button", TRUE, NULL);
|
119 | 119 |
NULL);
|
120 | 120 |
|
121 | 121 |
priv->search_binding = g_object_bind_property(priv->browse_header_bar, "search-active",
|
122 | |
current_view, "search-active", G_BINDING_DEFAULT);
|
|
122 |
current_view, "search-active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
123 | 123 |
|
124 | 124 |
priv->back_binding = g_object_bind_property(current_view, "show-back-button",
|
125 | |
priv->browse_header_bar, "show-back-button", G_BINDING_DEFAULT);
|
|
125 |
priv->browse_header_bar, "show-back-button", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
126 | 126 |
}
|
127 | 127 |
|
128 | 128 |
static void
|