]> sigrok.org Git - sigrok-gtk.git/commitdiff
sr/cli/gtk/qt/: s/plugin/driver/.
authorUwe Hermann <redacted>
Tue, 28 Feb 2012 22:52:30 +0000 (23:52 +0100)
committerUwe Hermann <redacted>
Tue, 28 Feb 2012 22:52:30 +0000 (23:52 +0100)
devselect.c
toolbar.c

index 633ef95501e8b00ca346ad032b1ecc2d34b5818c..acdad5ce7abbe4c462c08d9af74a84635760de37 100644 (file)
@@ -66,7 +66,7 @@ static void dev_menuitem_toggled(GtkMenuItem *item, GtkComboBox *combo)
 }
 
 #define GET_DEV_INST(dev) \
-       (dev)->plugin->dev_info_get((dev)->plugin_index, SR_DI_INST);
+       (dev)->driver->dev_info_get((dev)->driver_index, SR_DI_INST);
 
 void dev_select_rescan(GtkAction *action, GtkWindow *parent)
 {
@@ -91,8 +91,8 @@ void dev_select_rescan(GtkAction *action, GtkWindow *parent)
         */
        if (gtk_combo_box_get_active_iter(devbox, &iter)) {
                gtk_tree_model_get(GTK_TREE_MODEL(devlist), &iter, 1, &dev, -1);
-               /* FIXME: Use something other than dev->plugin->name */
-               sdevname = g_strdup(dev->plugin->name);
+               /* FIXME: Use something other than dev->driver->name */
+               sdevname = g_strdup(dev->driver->name);
        }
 
        /* Destroy the old menu items */
@@ -131,7 +131,7 @@ void dev_select_rescan(GtkAction *action, GtkWindow *parent)
                                2, menuitem,
                                -1);
 
-               if (sdevname && g_str_equal(sdevname, dev->plugin->name))
+               if (sdevname && g_str_equal(sdevname, dev->driver->name))
                        gtk_combo_box_set_active_iter(devbox, &iter);
        }
        if (sdevname)
index 5a056ffe4949f6b7818b5a66a0fb2619a19cd827..0d7c6faba264c720bde03d61c8640fcd87a46cf5 100644 (file)
--- a/toolbar.c
+++ b/toolbar.c
@@ -59,11 +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->dev_config_set(dev->plugin_index,
+               ret = dev->driver->dev_config_set(dev->driver_index,
                                                  cap, &tmp_u64);
                break;
        case SR_T_CHAR:
-               ret = dev->plugin->dev_config_set(dev->plugin_index, cap, text);
+               ret = dev->driver->dev_config_set(dev->driver_index, cap, text);
                break;
        /* SR_T_BOOL will be handled by prop_toggled */
        }
@@ -86,7 +86,7 @@ static void prop_toggled(GtkCellRendererToggle *cel, gchar *path,
                                        DEV_PROP_TYPE, &type, -1);
 
        val = !gtk_cell_renderer_toggle_get_active(cel);
-       ret = dev->plugin->dev_config_set(dev->plugin_index, cap, 
+       ret = dev->driver->dev_config_set(dev->driver_index, cap, 
                                          GINT_TO_POINTER(val));
 
        if (!ret)
@@ -137,7 +137,7 @@ static void dev_set_options(GtkAction *action, GtkWindow *parent)
                                        G_TYPE_BOOLEAN, G_TYPE_STRING,
                                        G_TYPE_BOOLEAN);
        gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(props));
-       int *hwcaps = dev->plugin->hwcap_get_all();
+       int *hwcaps = dev->driver->hwcap_get_all();
        int cap;
        GtkTreeIter iter;
        for (cap = 0; hwcaps[cap]; cap++) {
@@ -353,8 +353,8 @@ 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->dev_config_set(dev->plugin_index,
+               if (sr_hw_has_hwcap(dev->driver, SR_HWCAP_LIMIT_MSEC)) {
+                       if (dev->driver->dev_config_set(dev->driver_index,
                                                        SR_HWCAP_LIMIT_MSEC,
                                                        &time_msec) != SR_OK) {
                                g_critical("Failed to configure time limit.");
@@ -368,8 +368,8 @@ static void capture_run(GtkAction *action, GObject *parent)
                        limit_samples = 0;
                        if (sr_dev_has_hwcap(dev, SR_HWCAP_SAMPLERATE)) {
                                guint64 tmp_u64;
-                               tmp_u64 = *((uint64_t *)dev->plugin->dev_info_get(
-                                                       dev->plugin_index,
+                               tmp_u64 = *((uint64_t *)dev->driver->dev_info_get(
+                                                       dev->driver_index,
                                                        SR_DI_CUR_SAMPLERATE));
                                limit_samples = tmp_u64 * time_msec / (uint64_t) 1000;
                        }
@@ -378,7 +378,7 @@ static void capture_run(GtkAction *action, GObject *parent)
                                return;
                        }
 
-                       if (dev->plugin->dev_config_set(dev->plugin_index,
+                       if (dev->driver->dev_config_set(dev->driver_index,
                                                SR_HWCAP_LIMIT_SAMPLES,
                                                &limit_samples) != SR_OK) {
                                g_critical("Failed to configure time-based sample limit.");
@@ -387,7 +387,7 @@ static void capture_run(GtkAction *action, GObject *parent)
                }
        }
        if (limit_samples) {
-               if (dev->plugin->dev_config_set(dev->plugin_index,
+               if (dev->driver->dev_config_set(dev->driver_index,
                                                SR_HWCAP_LIMIT_SAMPLES,
                                                &limit_samples) != SR_OK) {
                        g_critical("Failed to configure sample limit.");
@@ -395,7 +395,7 @@ static void capture_run(GtkAction *action, GObject *parent)
                }
        }
 
-       if (dev->plugin->dev_config_set(dev->plugin_index,
+       if (dev->driver->dev_config_set(dev->driver_index,
            SR_HWCAP_PROBECONFIG, (char *)dev->probes) != SR_OK) {
                printf("Failed to configure probes.\n");
                sr_session_destroy();