Exemplo n.º 1
0
void
gt_games_view_refresh(GtGamesView* self)
{
    GtGamesViewPrivate* priv = gt_games_view_get_instance_private(self);

    if (GT_IS_CHANNELS_CONTAINER(VISIBLE_CHILD))
        gt_channels_container_refresh(GT_CHANNELS_CONTAINER(VISIBLE_CHILD));
    else
        gt_games_container_refresh(VISIBLE_CONTAINER);
}
Exemplo n.º 2
0
static void
search_changed_cb(GtkEditable* edit,
                  gpointer udata)
{
    GtFavouritesView* self = GT_FAVOURITES_VIEW(udata);
    GtFavouritesViewPrivate* priv = gt_favourites_view_get_instance_private(self);

    const gchar* query = gtk_entry_get_text(GTK_ENTRY(edit));

    gt_channels_container_set_filter_query(GT_CHANNELS_CONTAINER(priv->favourite_container), query);
}
Exemplo n.º 3
0
static void
game_activated_cb(GtGamesContainer* container,
                  GtGame* game,
                  gpointer udata)
{
    GtGamesView* self = GT_GAMES_VIEW(udata);
    GtGamesViewPrivate* priv = gt_games_view_get_instance_private(self);
    gchar* name;

    g_object_get(game, "name", &name, NULL);

    gt_channels_container_set_filter_query(GT_CHANNELS_CONTAINER(priv->game_container), name);

    gt_games_view_show_type(self, GT_CHANNELS_CONTAINER_TYPE_GAME);
    
    g_signal_handlers_block_by_func(self, search_active_cb, self);
    g_object_set(self, "search-active", FALSE, NULL);
    g_signal_handlers_unblock_by_func(self, search_active_cb, self);

    g_free(name);
}
Exemplo n.º 4
0
static void
game_activated_cb(GtGamesContainer* container,
                  GtGame* game,
                  gpointer udata)
{
    GtGamesView* self = GT_GAMES_VIEW(udata);
    GtGamesViewPrivate* priv = gt_games_view_get_instance_private(self);
    gchar* name;

    g_object_get(game, "name", &name, NULL);

    gt_channels_container_set_filter_query(GT_CHANNELS_CONTAINER(priv->game_container), name);

    gtk_stack_set_visible_child(GTK_STACK(priv->games_stack), priv->game_container);
    
    g_object_notify_by_pspec(G_OBJECT(self), props[PROP_SHOWING_TOP_GAMES]);
    g_object_notify_by_pspec(G_OBJECT(self), props[PROP_SHOWING_GAME_CHANNELS]);

    g_signal_handlers_block_by_func(self, search_active_cb, self);
    g_object_set(self, "search-active", FALSE, NULL);
    g_signal_handlers_unblock_by_func(self, search_active_cb, self);

    g_free(name);
}