[ekiga] Devices: Improved notifications.



commit 9d3ce2eeed315c5863b117d986751b58da7666ec
Author: Damien Sandras <dsandras seconix com>
Date:   Sat Oct 31 18:36:44 2015 +0100

    Devices: Improved notifications.
    
    - We need to know if the added device is a capture or playback device.
    - We do not need to know when a device has been removed. There is no
      associated action anyway.

 lib/engine/audioinput/audioinput-core.cpp   |    8 ++------
 lib/engine/audiooutput/audiooutput-core.cpp |    7 ++-----
 lib/engine/videoinput/videoinput-core.cpp   |    5 +----
 3 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/lib/engine/audioinput/audioinput-core.cpp b/lib/engine/audioinput/audioinput-core.cpp
index b071f1a..75ec048 100644
--- a/lib/engine/audioinput/audioinput-core.cpp
+++ b/lib/engine/audioinput/audioinput-core.cpp
@@ -272,8 +272,8 @@ AudioInputCore::add_device (const std::string& source,
       device_added (device);
 
       boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Info,
-                                                                            _("New device detected"),
-                                                                            device.GetString (), _("Use it"),
+                                                                            _("New Audio Input Device"),
+                                                                            device.GetString (), _("Use It"),
                                                                             boost::bind 
(&AudioInputCore::on_set_device, (AudioInputCore*) this, device)));
       notification_core->push_notification (notif);
     }
@@ -305,10 +305,6 @@ AudioInputCore::remove_device (const std::string& source,
             internal_set_device( new_device);
        }
 
-       boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Info,
-                                                                             _("Device removed"),
-                                                                             device.GetString ()));
-       notification_core->push_notification (notif);
        device_removed (device,  current_device == device);
      }
   }
diff --git a/lib/engine/audiooutput/audiooutput-core.cpp b/lib/engine/audiooutput/audiooutput-core.cpp
index 29982c8..ae7d541 100644
--- a/lib/engine/audiooutput/audiooutput-core.cpp
+++ b/lib/engine/audiooutput/audiooutput-core.cpp
@@ -446,9 +446,9 @@ AudioOutputCore::add_device (const std::string& sink,
        device_added(device);
 
        boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Info,
-                                                                             _("New device detected"),
+                                                                             _("New Audio Output Device"),
                                                                              device.GetString (),
-                                                                             _("Use it"),
+                                                                             _("Use It"),
                                                                              boost::bind 
(&AudioOutputCore::on_set_device, (AudioOutputCore*) this, device)));
        notification_core->push_notification (notif);
      }
@@ -481,9 +481,6 @@ AudioOutputCore::remove_device (const std::string& sink,
          internal_set_primary_device(new_device);
        }
 
-       boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Info, 
_("Device removed"), device.GetString ()));
-       notification_core->push_notification (notif);
-
        device_removed(device, device == current_device[primary]);
      }
   }
diff --git a/lib/engine/videoinput/videoinput-core.cpp b/lib/engine/videoinput/videoinput-core.cpp
index 5016f4b..0b62123 100644
--- a/lib/engine/videoinput/videoinput-core.cpp
+++ b/lib/engine/videoinput/videoinput-core.cpp
@@ -374,7 +374,7 @@ void VideoInputCore::add_device (const std::string & source, const std::string &
 
       device_added (device);
 
-      boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Info, 
_("New device detected"), device.GetString (), _("Use it"), boost::bind (&VideoInputCore::on_set_device, 
(VideoInputCore*) this, device)));
+      boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Info, 
_("New Video Input Device"), device.GetString (), _("Use It"), boost::bind (&VideoInputCore::on_set_device, 
(VideoInputCore*) this, device)));
       notification_core->push_notification (notif);
     }
   }
@@ -400,9 +400,6 @@ void VideoInputCore::remove_device (const std::string & source, const std::strin
        }
 
        device_removed(device, current_device == device);
-
-       boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Info, 
_("Device removed"), device.GetString ()));
-       notification_core->push_notification (notif);
      }
   }
 }


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