]> sigrok.org Git - sigrok-gtk.git/commitdiff
sr: s/config_set/dev_config_set/.
authorUwe Hermann <redacted>
Sat, 18 Feb 2012 11:11:15 +0000 (12:11 +0100)
committerUwe Hermann <redacted>
Sat, 18 Feb 2012 11:11:15 +0000 (12:11 +0100)
This functions is per-device-instance, so use dev_ as prefix as with
the other ones.

toolbar.c

index 8942743586aa8b5287f1f6efc935de277064f9d9..5a056ffe4949f6b7818b5a66a0fb2619a19cd827 100644 (file)
--- 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();