DEV_PROP_TYPE, &type, -1);
val = !gtk_cell_renderer_toggle_get_active(cel);
DEV_PROP_TYPE, &type, -1);
val = !gtk_cell_renderer_toggle_get_active(cel);
if (!ret)
gtk_list_store_set(props, &iter, DEV_PROP_BOOLVALUE, val, -1);
if (!ret)
gtk_list_store_set(props, &iter, DEV_PROP_BOOLVALUE, val, -1);
G_TYPE_BOOLEAN, G_TYPE_STRING,
G_TYPE_BOOLEAN);
gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(props));
G_TYPE_BOOLEAN, G_TYPE_STRING,
G_TYPE_BOOLEAN);
gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(props));
continue;
gtk_list_store_append(props, &iter);
gtk_list_store_set(props, &iter,
continue;
gtk_list_store_append(props, &iter);
gtk_list_store_set(props, &iter,
gtk_tree_model_get_iter_from_string(probes, &iter, path);
gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i,
PROBE_ENABLED, &en, -1);
gtk_tree_model_get_iter_from_string(probes, &iter, path);
gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i,
PROBE_ENABLED, &en, -1);
gtk_list_store_set(GTK_LIST_STORE(probes), &iter,
PROBE_ENABLED, probe->enabled, -1);
}
gtk_list_store_set(GTK_LIST_STORE(probes), &iter,
PROBE_ENABLED, probe->enabled, -1);
}
static void probe_named(GtkCellRendererText *cel, gchar *path, gchar *text,
GtkTreeModel *probes)
{
static void probe_named(GtkCellRendererText *cel, gchar *path, gchar *text,
GtkTreeModel *probes)
{
gtk_tree_model_get_iter_from_string(probes, &iter, path);
gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i, -1);
gtk_tree_model_get_iter_from_string(probes, &iter, path);
gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i, -1);
gtk_list_store_set(GTK_LIST_STORE(probes), &iter, PROBE_NAME, text, -1);
}
static void probe_trigger_set(GtkCellRendererText *cel, gchar *path,
gchar *text, GtkTreeModel *probes)
{
gtk_list_store_set(GTK_LIST_STORE(probes), &iter, PROBE_NAME, text, -1);
}
static void probe_trigger_set(GtkCellRendererText *cel, gchar *path,
gchar *text, GtkTreeModel *probes)
{
gtk_tree_model_get_iter_from_string(probes, &iter, path);
gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i, -1);
gtk_tree_model_get_iter_from_string(probes, &iter, path);
gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i, -1);
gtk_list_store_set(GTK_LIST_STORE(probes), &iter,
PROBE_TRIGGER, text, -1);
}
gtk_list_store_set(GTK_LIST_STORE(probes), &iter,
PROBE_TRIGGER, text, -1);
}
struct sr_probe *probe = p->data;
gtk_list_store_append(probes, &iter);
gtk_list_store_set(probes, &iter, PROBE_NUMBER, i,
struct sr_probe *probe = p->data;
gtk_list_store_append(probes, &iter);
gtk_list_store_set(probes, &iter, PROBE_NUMBER, i,
GtkEntry *timesamples = g_object_get_data(parent, "timesamples");
GtkComboBox *timeunit = g_object_get_data(parent, "timeunit");
gint i = gtk_combo_box_get_active(timeunit);
GtkEntry *timesamples = g_object_get_data(parent, "timesamples");
GtkComboBox *timeunit = g_object_get_data(parent, "timeunit");
gint i = gtk_combo_box_get_active(timeunit);
- if (sr_driver_hwcap_exists(dev->driver, SR_HWCAP_LIMIT_MSEC)) {
- if (dev->driver->dev_config_set(dev->driver_index,
- SR_HWCAP_LIMIT_MSEC,
+ if (sr_driver_hwcap_exists(sdi->driver, SR_HWCAP_LIMIT_MSEC)) {
+ if (sr_dev_config_set(sdi, SR_HWCAP_LIMIT_MSEC,
- tmp_u64 = *((uint64_t *)dev->driver->dev_info_get(
- dev->driver_index,
- SR_DI_CUR_SAMPLERATE));
+ sr_info_get(sdi->driver, SR_DI_CUR_SAMPLERATE,
+ (const void **)&tmp_u64, sdi);
- if (dev->driver->dev_config_set(dev->driver_index,
- SR_HWCAP_LIMIT_SAMPLES,
+ if (sr_dev_config_set(sdi, SR_HWCAP_LIMIT_SAMPLES,
- if (dev->driver->dev_config_set(dev->driver_index,
- SR_HWCAP_LIMIT_SAMPLES,
- &limit_samples) != SR_OK) {
+ if (sr_dev_config_set(sdi, SR_HWCAP_LIMIT_SAMPLES,
+ &limit_samples) != SR_OK) {
- if (dev->driver->dev_config_set(dev->driver_index,
- SR_HWCAP_PROBECONFIG, (char *)dev->probes) != SR_OK) {
+#if 0
+ if (sr_dev_config_set(sdi,
+ SR_HWCAP_PROBECONFIG, (char *)sdi->probes) != SR_OK) {