static gint gs_editor_flow_box_sort_cb (GtkFlowBoxChild *row1, GtkFlowBoxChild *row2, gpointer user_data) { GsAppTile *tile1 = GS_APP_TILE (gtk_bin_get_child (GTK_BIN (row1))); GsAppTile *tile2 = GS_APP_TILE (gtk_bin_get_child (GTK_BIN (row2))); return g_strcmp0 (gs_app_get_name (gs_app_tile_get_app (tile1)), gs_app_get_name (gs_app_tile_get_app (tile2))); }
static void app_tile_clicked (GsAppTile *tile, gpointer data) { GsShellCategory *shell = GS_SHELL_CATEGORY (data); GsApp *app; app = gs_app_tile_get_app (tile); gs_shell_show_app (shell->priv->shell, app); }
static void gs_editor_app_tile_clicked_cb (GsAppTile *tile, GsEditor *self) { GsApp *app = gs_app_tile_get_app (tile); AsApp *item = as_store_get_app_by_id (self->store, gs_app_get_id (app)); if (item == NULL) { g_warning ("failed to find %s", gs_app_get_id (app)); return; } g_set_object (&self->selected_item, item); gs_editor_refresh_details (self); gs_editor_set_page (self, "details"); }