From: Uwe Hermann Date: Sat, 18 Feb 2012 11:11:15 +0000 (+0100) Subject: sr: s/config_set/dev_config_set/. X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=31345264014ea6f4a4bf278197567999f2b1d550;p=sigrok-gtk.git sr: s/config_set/dev_config_set/. This functions is per-device-instance, so use dev_ as prefix as with the other ones. --- diff --git a/toolbar.c b/toolbar.c index 8942743..5a056ff 100644 --- a/toolbar.c +++ b/toolbar.c @@ -59,10 +59,11 @@ static void prop_edited(GtkCellRendererText *cel, gchar *path, gchar *text, if (sr_parse_sizestring(text, &tmp_u64) != SR_OK) return; - ret = dev->plugin->config_set(dev->plugin_index, cap, &tmp_u64); + ret = dev->plugin->dev_config_set(dev->plugin_index, + cap, &tmp_u64); break; case SR_T_CHAR: - ret = dev->plugin->config_set(dev->plugin_index, cap, text); + ret = dev->plugin->dev_config_set(dev->plugin_index, cap, text); break; /* SR_T_BOOL will be handled by prop_toggled */ } @@ -85,8 +86,8 @@ static void prop_toggled(GtkCellRendererToggle *cel, gchar *path, DEV_PROP_TYPE, &type, -1); val = !gtk_cell_renderer_toggle_get_active(cel); - ret = dev->plugin->config_set(dev->plugin_index, cap, - GINT_TO_POINTER(val)); + ret = dev->plugin->dev_config_set(dev->plugin_index, cap, + GINT_TO_POINTER(val)); if (!ret) gtk_list_store_set(props, &iter, DEV_PROP_BOOLVALUE, val, -1); @@ -353,9 +354,9 @@ static void capture_run(GtkAction *action, GObject *parent) if (time_msec) { if (sr_hw_has_hwcap(dev->plugin, SR_HWCAP_LIMIT_MSEC)) { - if (dev->plugin->config_set(dev->plugin_index, - SR_HWCAP_LIMIT_MSEC, - &time_msec) != SR_OK) { + if (dev->plugin->dev_config_set(dev->plugin_index, + SR_HWCAP_LIMIT_MSEC, + &time_msec) != SR_OK) { g_critical("Failed to configure time limit."); sr_session_destroy(); return; @@ -377,24 +378,24 @@ static void capture_run(GtkAction *action, GObject *parent) return; } - if (dev->plugin->config_set(dev->plugin_index, - SR_HWCAP_LIMIT_SAMPLES, - &limit_samples) != SR_OK) { + if (dev->plugin->dev_config_set(dev->plugin_index, + SR_HWCAP_LIMIT_SAMPLES, + &limit_samples) != SR_OK) { g_critical("Failed to configure time-based sample limit."); return; } } } if (limit_samples) { - if (dev->plugin->config_set(dev->plugin_index, - SR_HWCAP_LIMIT_SAMPLES, - &limit_samples) != SR_OK) { + if (dev->plugin->dev_config_set(dev->plugin_index, + SR_HWCAP_LIMIT_SAMPLES, + &limit_samples) != SR_OK) { g_critical("Failed to configure sample limit."); return; } } - if (dev->plugin->config_set(dev->plugin_index, + if (dev->plugin->dev_config_set(dev->plugin_index, SR_HWCAP_PROBECONFIG, (char *)dev->probes) != SR_OK) { printf("Failed to configure probes.\n"); sr_session_destroy();