[moserial] use different connectButton icons for connected/disconnected states



commit f650e02b35f1e53b41308edcc36550edcd0af877
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Tue Jan 26 09:48:13 2021 -0500

    use different connectButton icons for connected/disconnected states

 data/ui/mainwindow.ui | 2 +-
 src/MainWindow.vala   | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/data/ui/mainwindow.ui b/data/ui/mainwindow.ui
index 9395433..5a90439 100644
--- a/data/ui/mainwindow.ui
+++ b/data/ui/mainwindow.ui
@@ -207,7 +207,7 @@
                 <property name="is-important">True</property>
                 <property name="label" translatable="yes">Connect</property>
                 <property name="use-underline">True</property>
-                <property name="icon-name">network-transmit</property>
+                <property name="icon-name">network-offline</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index ba14613..71d6c92 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -894,6 +894,7 @@ font-weight:
         serialConnection.newData.connect (this.updateIncoming);
         serialConnection.onError.connect(this.connectionError);
         connectButton.set_label_widget (disconnectLabel);
+        connectButton.set_icon_name ("network-transmit-receive");
         return true;
     }
 
@@ -911,6 +912,7 @@ font-weight:
             statusbar.pop (statusbarContext);
             statusbar.push (statusbarContext, currentSettings.getStatusbarString (false));
             button.set_label_widget (connectLabel);
+            button.set_icon_name ("network-offline");
 
             serialStatusSignals[0].set_sensitive (false);
             serialStatusSignals[1].set_sensitive (false);
@@ -946,6 +948,7 @@ font-weight:
         statusbar.pop(statusbarContext);
         statusbar.push(statusbarContext, currentSettings.getStatusbarString(false));
         connectButton.set_label_widget(connectLabel);
+        connectButton.set_icon_name ("network-offline");
         connectButton.set_active(false);
 
         if (recordButton.get_active())


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]