[jitsi-dev] [jitsi-commits] master: Optional button to open a custom application from the call panel (02aa358)


#1

I suppose we must have discussed this but I have no recollection of
it, so a reminder would be great. I can guess what the point here is
but what I don't understand is:

1. How does this button server a purpose when someone decides to show
it? Is that a pending commit?
2. Wouldn't it be easier to just use the call notification parameters
to open the CRM page?

Emil

···

On Thu, Feb 6, 2014 at 4:47 PM, <ingo@jitsi.org> wrote:

Repository : ssh://lists.jitsi.org/jitsi

On branch : master
Link : https://github.com/jitsi/jitsi/compare/600410a57e474760c6d3197ddb286eeedd7cd221...02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec

---------------------------------------------------------------

commit 02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
Author: Ingo Bauersachs <ingo@jitsi.org>
Date: Thu Feb 6 16:45:22 2014 +0100

    Optional button to open a custom application from the call panel

---------------------------------------------------------------

02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
resources/images/images.properties | 1 +
resources/images/impl/gui/buttons/crm.png | Bin 0 -> 914 bytes
resources/languages/resources.properties | 1 +
.../communicator/impl/gui/main/call/CallPanel.java | 63 +++++++++++++++++++-
.../communicator/impl/gui/utils/ImageLoader.java | 6 ++
5 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/resources/images/images.properties b/resources/images/images.properties
index a862b98..1b05f48 100644
--- a/resources/images/images.properties
+++ b/resources/images/images.properties
@@ -267,6 +267,7 @@ service.gui.buttons.CONTACT_LIST_DIAL_BUTTON=resources/images/impl/gui/buttons/c
service.gui.buttons.DIAL_PAD_CALL_BUTTON_BG=resources/images/impl/gui/buttons/dialPadCallButtonBg.png
service.gui.buttons.CALL_INFO=resources/images/impl/gui/buttons/callInfo.png
service.gui.buttons.ZRTP_ID_BUTTON=resources/images/impl/gui/buttons/zrtpEditId.png
+service.gui.buttons.CRM=resources/images/impl/gui/buttons/crm.png
service.gui.icons.LEAVE_ICON_BUTTON=resources/images/impl/gui/buttons/leaveRoom.png
service.gui.icons.LEAVE_ICON_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/leaveRoomOver.png
service.gui.icons.LEAVE_ICON_PRESSED_BUTTON=resources/images/impl/gui/buttons/leaveRoomPressed.png
diff --git a/resources/images/impl/gui/buttons/crm.png b/resources/images/impl/gui/buttons/crm.png
new file mode 100644
index 0000000..490cf6b
Binary files /dev/null and b/resources/images/impl/gui/buttons/crm.png differ
diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties
index 5944f8b..bc366b9 100644
--- a/resources/languages/resources.properties
+++ b/resources/languages/resources.properties
@@ -423,6 +423,7 @@ service.gui.PREFIX=Prefix
service.gui.PRESENCE=Presence
service.gui.PRESS_ENTER_FOR_SUGGESTIONS='Enter' for suggestions
service.gui.PRESS_FOR_CALL_INFO=Press for call info
+service.gui.PRESS_TO_OPEN_CRM=Press to open CRM application
service.gui.PREVIOUS=Previous
service.gui.PREVIOUS_TOOLTIP=Browse older conversations
service.gui.PRINT=&Print
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index 5a8b99b..bbe1e99 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -10,6 +10,7 @@ import java.awt.*;
import java.awt.Container;
import java.awt.event.*;
import java.beans.*;
+import java.io.*;
import java.util.*;
import java.util.List;

@@ -92,6 +93,11 @@ public class CallPanel
     private static final String INFO_BUTTON = "INFO_BUTTON";

     /**
+ * The info button name.
+ */
+ private static final String CRM_BUTTON = "CRM_BUTTON";
+
+ /**
      * The logger for this class.
      */
     private static final Logger logger = Logger.getLogger(CallDialog.class);
@@ -113,6 +119,12 @@ public class CallPanel
         = "net.java.sip.communicator.impl.gui.main.call.HIDE_CALL_INFO_BUTTON";

     /**
+ * Property to enable the CRM button.
+ */
+ private static final String SHOW_CRM_BUTON_PROP
+ = "net.java.sip.communicator.impl.gui.main.call.SHOW_CRM_BUTTON";
+
+ /**
      * Property to disable the conference "add to call" button.
      */
     private static final String HIDE_CONFERENCE_BUTON_PROP
@@ -304,6 +316,11 @@ public class CallPanel
     private SIPCommButton infoButton;

     /**
+ * CRM button.
+ */
+ private CallToolBarButton crmButton;
+
+ /**
      * Indicates if the call timer has been started.
      */
     private boolean isCallTimerStarted = false;
@@ -572,6 +589,34 @@ public class CallPanel
             callInfoFrame.setVisible(
                     callInfoFrame.hasCallInfo() && !callInfoFrame.isVisible());
         }
+ else if (buttonName.equals(CRM_BUTTON))
+ {
+ String command =
+ GuiActivator.getConfigurationService().getString(
+ "net.java.sip.communicator.impl.gui.main.call.CRM_COMMAND");
+ if (command == null)
+ {
+ return;
+ }
+
+ List<CallPeer> callPeers = callConference.getCallPeers();
+ if (callPeers.isEmpty())
+ {
+ logger.info("No CallPeer for CRM application found.");
+ return;
+ }
+
+ command = String.format(command, callPeers.get(0).getAddress());
+ try
+ {
+ logger.info("Launching CRM application: " + command);
+ Runtime.getRuntime().exec(command);
+ }
+ catch (IOException e)
+ {
+ logger.error("Unable launch CRM application", e);
+ }
+ }
     }

     /**
@@ -1381,8 +1426,10 @@ public class CallPanel

         chatButton.setIndex(19);

+ if (crmButton != null)
+ crmButton.setIndex(30);
         if (infoButton != null)
- infoButton.setIndex(20);
+ infoButton.setIndex(50);

         hangupButton.setIndex(100);
     }
@@ -1521,6 +1568,16 @@ public class CallPanel
                                 "service.gui.PRESS_FOR_CALL_INFO"));
         }

+ if(!isButtonEnabled(SHOW_CRM_BUTON_PROP))
+ {
+ crmButton
+ = new CallToolBarButton(
+ ImageLoader.getImage(ImageLoader.CRM),
+ CRM_BUTTON,
+ GuiActivator.getResources().getI18NString(
+ "service.gui.PRESS_TO_OPEN_CRM"));
+ }
+
         if(isButtonEnabled(HIDE_CALL_MERGE_BUTON_PROP))
         {
             mergeButton
@@ -1586,6 +1643,8 @@ public class CallPanel
             conferenceButton.addActionListener(this);
         if (dialButton != null)
             dialButton.addActionListener(this);
+ if (crmButton != null)
+ crmButton.addActionListener(this);
         if (infoButton != null)
             infoButton.addActionListener(this);
         if (mergeButton != null)
@@ -1605,6 +1664,8 @@ public class CallPanel

         if (holdButton != null)
             settingsPanel.add(holdButton);
+ if (crmButton != null)
+ settingsPanel.add(crmButton);
         if (infoButton != null)
             settingsPanel.add(infoButton);
         if (mergeButton != null)
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
index 77edeed..152c3a5 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
@@ -891,6 +891,12 @@ public class ImageLoader
         new ImageID("service.gui.buttons.CALL_INFO");

     /**
+ * The call information button icon used in the call panel.
+ */
+ public static final ImageID CRM =
+ new ImageID("service.gui.buttons.CRM");
+
+ /**
      * The image used, when a contact has no photo specified.
      */
     public static final ImageID DEFAULT_USER_PHOTO

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31


#2

I suppose we must have discussed this but I have no recollection of
it, so a reminder would be great. I can guess what the point here is
but what I don't understand is:

I think I've mentioned it on the way to Fosdem, but I could be mistaken.

1. How does this button server a purpose when someone decides to show
it? Is that a pending commit?

There is a property that defines which command should be executed when clicked. %s in that property is replaced with the address of the first call participant.

2. Wouldn't it be easier to just use the call notification parameters
to open the CRM page?

This would either open the CRM automatically or when the popup is clicked. Opening automatically is undesirable because it would open it for all agents receiving a call from a queue or ring group. Clicking on the popup is only possible while it is shown - which is too short.

Emil

Ingo

···

On 06.02.2014, at 18:26, "Emil Ivov" <emcho@jitsi.org> wrote:

On Thu, Feb 6, 2014 at 4:47 PM, <ingo@jitsi.org> wrote:
Repository : ssh://lists.jitsi.org/jitsi

On branch : master
Link : https://github.com/jitsi/jitsi/compare/600410a57e474760c6d3197ddb286eeedd7cd221...02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec

---------------------------------------------------------------

commit 02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
Author: Ingo Bauersachs <ingo@jitsi.org>
Date: Thu Feb 6 16:45:22 2014 +0100

   Optional button to open a custom application from the call panel

---------------------------------------------------------------

02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
resources/images/images.properties | 1 +
resources/images/impl/gui/buttons/crm.png | Bin 0 -> 914 bytes
resources/languages/resources.properties | 1 +
.../communicator/impl/gui/main/call/CallPanel.java | 63 +++++++++++++++++++-
.../communicator/impl/gui/utils/ImageLoader.java | 6 ++
5 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/resources/images/images.properties b/resources/images/images.properties
index a862b98..1b05f48 100644
--- a/resources/images/images.properties
+++ b/resources/images/images.properties
@@ -267,6 +267,7 @@ service.gui.buttons.CONTACT_LIST_DIAL_BUTTON=resources/images/impl/gui/buttons/c
service.gui.buttons.DIAL_PAD_CALL_BUTTON_BG=resources/images/impl/gui/buttons/dialPadCallButtonBg.png
service.gui.buttons.CALL_INFO=resources/images/impl/gui/buttons/callInfo.png
service.gui.buttons.ZRTP_ID_BUTTON=resources/images/impl/gui/buttons/zrtpEditId.png
+service.gui.buttons.CRM=resources/images/impl/gui/buttons/crm.png
service.gui.icons.LEAVE_ICON_BUTTON=resources/images/impl/gui/buttons/leaveRoom.png
service.gui.icons.LEAVE_ICON_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/leaveRoomOver.png
service.gui.icons.LEAVE_ICON_PRESSED_BUTTON=resources/images/impl/gui/buttons/leaveRoomPressed.png
diff --git a/resources/images/impl/gui/buttons/crm.png b/resources/images/impl/gui/buttons/crm.png
new file mode 100644
index 0000000..490cf6b
Binary files /dev/null and b/resources/images/impl/gui/buttons/crm.png differ
diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties
index 5944f8b..bc366b9 100644
--- a/resources/languages/resources.properties
+++ b/resources/languages/resources.properties
@@ -423,6 +423,7 @@ service.gui.PREFIX=Prefix
service.gui.PRESENCE=Presence
service.gui.PRESS_ENTER_FOR_SUGGESTIONS='Enter' for suggestions
service.gui.PRESS_FOR_CALL_INFO=Press for call info
+service.gui.PRESS_TO_OPEN_CRM=Press to open CRM application
service.gui.PREVIOUS=Previous
service.gui.PREVIOUS_TOOLTIP=Browse older conversations
service.gui.PRINT=&Print
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index 5a8b99b..bbe1e99 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -10,6 +10,7 @@ import java.awt.*;
import java.awt.Container;
import java.awt.event.*;
import java.beans.*;
+import java.io.*;
import java.util.*;
import java.util.List;

@@ -92,6 +93,11 @@ public class CallPanel
    private static final String INFO_BUTTON = "INFO_BUTTON";

    /**
+ * The info button name.
+ */
+ private static final String CRM_BUTTON = "CRM_BUTTON";
+
+ /**
     * The logger for this class.
     */
    private static final Logger logger = Logger.getLogger(CallDialog.class);
@@ -113,6 +119,12 @@ public class CallPanel
        = "net.java.sip.communicator.impl.gui.main.call.HIDE_CALL_INFO_BUTTON";

    /**
+ * Property to enable the CRM button.
+ */
+ private static final String SHOW_CRM_BUTON_PROP
+ = "net.java.sip.communicator.impl.gui.main.call.SHOW_CRM_BUTTON";
+
+ /**
     * Property to disable the conference "add to call" button.
     */
    private static final String HIDE_CONFERENCE_BUTON_PROP
@@ -304,6 +316,11 @@ public class CallPanel
    private SIPCommButton infoButton;

    /**
+ * CRM button.
+ */
+ private CallToolBarButton crmButton;
+
+ /**
     * Indicates if the call timer has been started.
     */
    private boolean isCallTimerStarted = false;
@@ -572,6 +589,34 @@ public class CallPanel
            callInfoFrame.setVisible(
                    callInfoFrame.hasCallInfo() && !callInfoFrame.isVisible());
        }
+ else if (buttonName.equals(CRM_BUTTON))
+ {
+ String command =
+ GuiActivator.getConfigurationService().getString(
+ "net.java.sip.communicator.impl.gui.main.call.CRM_COMMAND");
+ if (command == null)
+ {
+ return;
+ }
+
+ List<CallPeer> callPeers = callConference.getCallPeers();
+ if (callPeers.isEmpty())
+ {
+ logger.info("No CallPeer for CRM application found.");
+ return;
+ }
+
+ command = String.format(command, callPeers.get(0).getAddress());
+ try
+ {
+ logger.info("Launching CRM application: " + command);
+ Runtime.getRuntime().exec(command);
+ }
+ catch (IOException e)
+ {
+ logger.error("Unable launch CRM application", e);
+ }
+ }
    }

    /**
@@ -1381,8 +1426,10 @@ public class CallPanel

        chatButton.setIndex(19);

+ if (crmButton != null)
+ crmButton.setIndex(30);
        if (infoButton != null)
- infoButton.setIndex(20);
+ infoButton.setIndex(50);

        hangupButton.setIndex(100);
    }
@@ -1521,6 +1568,16 @@ public class CallPanel
                                "service.gui.PRESS_FOR_CALL_INFO"));
        }

+ if(!isButtonEnabled(SHOW_CRM_BUTON_PROP))
+ {
+ crmButton
+ = new CallToolBarButton(
+ ImageLoader.getImage(ImageLoader.CRM),
+ CRM_BUTTON,
+ GuiActivator.getResources().getI18NString(
+ "service.gui.PRESS_TO_OPEN_CRM"));
+ }
+
        if(isButtonEnabled(HIDE_CALL_MERGE_BUTON_PROP))
        {
            mergeButton
@@ -1586,6 +1643,8 @@ public class CallPanel
            conferenceButton.addActionListener(this);
        if (dialButton != null)
            dialButton.addActionListener(this);
+ if (crmButton != null)
+ crmButton.addActionListener(this);
        if (infoButton != null)
            infoButton.addActionListener(this);
        if (mergeButton != null)
@@ -1605,6 +1664,8 @@ public class CallPanel

        if (holdButton != null)
            settingsPanel.add(holdButton);
+ if (crmButton != null)
+ settingsPanel.add(crmButton);
        if (infoButton != null)
            settingsPanel.add(infoButton);
        if (mergeButton != null)
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
index 77edeed..152c3a5 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
@@ -891,6 +891,12 @@ public class ImageLoader
        new ImageID("service.gui.buttons.CALL_INFO");

    /**
+ * The call information button icon used in the call panel.
+ */
+ public static final ImageID CRM =
+ new ImageID("service.gui.buttons.CRM");
+
+ /**
     * The image used, when a contact has no photo specified.
     */
    public static final ImageID DEFAULT_USER_PHOTO

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

Your unsubscribe procedure does not work, please fix it and remove my e-mail
Thanks

יפתח בן צבי

אינטק טכנולוגיות בע"מ
052-2798065

www.tiviclick.com
שיחות ווידאו בכל אתר

Ivov

···

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of Emil
Sent: Thursday, February 06, 2014 7:25 PM
To: Jitsi Mailman
Subject: Re: [jitsi-dev] [jitsi-commits] master: Optional button to open a
custom application from the call panel (02aa358)

I suppose we must have discussed this but I have no recollection of it, so a
reminder would be great. I can guess what the point here is but what I don't
understand is:

1. How does this button server a purpose when someone decides to show it? Is
that a pending commit?
2. Wouldn't it be easier to just use the call notification parameters to
open the CRM page?

Emil

On Thu, Feb 6, 2014 at 4:47 PM, <ingo@jitsi.org> wrote:

Repository : ssh://lists.jitsi.org/jitsi

On branch : master
Link :

https://github.com/jitsi/jitsi/compare/600410a57e474760c6d3197ddb286eeedd7cd
221...02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec

---------------------------------------------------------------

commit 02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
Author: Ingo Bauersachs <ingo@jitsi.org>
Date: Thu Feb 6 16:45:22 2014 +0100

    Optional button to open a custom application from the call panel

---------------------------------------------------------------

02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
resources/images/images.properties | 1 +
resources/images/impl/gui/buttons/crm.png | Bin 0 -> 914 bytes
resources/languages/resources.properties | 1 +
.../communicator/impl/gui/main/call/CallPanel.java | 63

+++++++++++++++++++-

.../communicator/impl/gui/utils/ImageLoader.java | 6 ++
5 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/resources/images/images.properties
b/resources/images/images.properties
index a862b98..1b05f48 100644
--- a/resources/images/images.properties
+++ b/resources/images/images.properties
@@ -267,6 +267,7 @@
service.gui.buttons.CONTACT_LIST_DIAL_BUTTON=resources/images/impl/gui
/buttons/c
service.gui.buttons.DIAL_PAD_CALL_BUTTON_BG=resources/images/impl/gui/
buttons/dialPadCallButtonBg.png
service.gui.buttons.CALL_INFO=resources/images/impl/gui/buttons/callIn
fo.png
service.gui.buttons.ZRTP_ID_BUTTON=resources/images/impl/gui/buttons/z
rtpEditId.png
+service.gui.buttons.CRM=resources/images/impl/gui/buttons/crm.png

service.gui.icons.LEAVE_ICON_BUTTON=resources/images/impl/gui/buttons/
leaveRoom.png
service.gui.icons.LEAVE_ICON_ROLLOVER_BUTTON=resources/images/impl/gui
/buttons/leaveRoomOver.png
service.gui.icons.LEAVE_ICON_PRESSED_BUTTON=resources/images/impl/gui/
buttons/leaveRoomPressed.png diff --git
a/resources/images/impl/gui/buttons/crm.png
b/resources/images/impl/gui/buttons/crm.png
new file mode 100644
index 0000000..490cf6b
Binary files /dev/null and b/resources/images/impl/gui/buttons/crm.png
differ diff --git a/resources/languages/resources.properties
b/resources/languages/resources.properties
index 5944f8b..bc366b9 100644
--- a/resources/languages/resources.properties
+++ b/resources/languages/resources.properties
@@ -423,6 +423,7 @@ service.gui.PREFIX=Prefix
service.gui.PRESENCE=Presence
service.gui.PRESS_ENTER_FOR_SUGGESTIONS='Enter' for suggestions
service.gui.PRESS_FOR_CALL_INFO=Press for call info
+service.gui.PRESS_TO_OPEN_CRM=Press to open CRM application
service.gui.PREVIOUS=Previous
service.gui.PREVIOUS_TOOLTIP=Browse older conversations
service.gui.PRINT=&Print diff --git
a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index 5a8b99b..bbe1e99 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -10,6 +10,7 @@ import java.awt.*;
import java.awt.Container;
import java.awt.event.*;
import java.beans.*;
+import java.io.*;
import java.util.*;
import java.util.List;

@@ -92,6 +93,11 @@ public class CallPanel
     private static final String INFO_BUTTON = "INFO_BUTTON";

     /**
+ * The info button name.
+ */
+ private static final String CRM_BUTTON = "CRM_BUTTON";
+
+ /**
      * The logger for this class.
      */
     private static final Logger logger =
Logger.getLogger(CallDialog.class);
@@ -113,6 +119,12 @@ public class CallPanel
         =
"net.java.sip.communicator.impl.gui.main.call.HIDE_CALL_INFO_BUTTON";

     /**
+ * Property to enable the CRM button.
+ */
+ private static final String SHOW_CRM_BUTON_PROP
+ =
+ "net.java.sip.communicator.impl.gui.main.call.SHOW_CRM_BUTTON";
+
+ /**
      * Property to disable the conference "add to call" button.
      */
     private static final String HIDE_CONFERENCE_BUTON_PROP @@ -304,6
+316,11 @@ public class CallPanel
     private SIPCommButton infoButton;

     /**
+ * CRM button.
+ */
+ private CallToolBarButton crmButton;
+
+ /**
      * Indicates if the call timer has been started.
      */
     private boolean isCallTimerStarted = false; @@ -572,6 +589,34 @@
public class CallPanel
             callInfoFrame.setVisible(
                     callInfoFrame.hasCallInfo() &&

!callInfoFrame.isVisible());

         }
+ else if (buttonName.equals(CRM_BUTTON))
+ {
+ String command =
+ GuiActivator.getConfigurationService().getString(
+

"net.java.sip.communicator.impl.gui.main.call.CRM_COMMAND");

+ if (command == null)
+ {
+ return;
+ }
+
+ List<CallPeer> callPeers = callConference.getCallPeers();
+ if (callPeers.isEmpty())
+ {
+ logger.info("No CallPeer for CRM application found.");
+ return;
+ }
+
+ command = String.format(command,

callPeers.get(0).getAddress());

+ try
+ {
+ logger.info("Launching CRM application: " + command);
+ Runtime.getRuntime().exec(command);
+ }
+ catch (IOException e)
+ {
+ logger.error("Unable launch CRM application", e);
+ }
+ }
     }

     /**
@@ -1381,8 +1426,10 @@ public class CallPanel

         chatButton.setIndex(19);

+ if (crmButton != null)
+ crmButton.setIndex(30);
         if (infoButton != null)
- infoButton.setIndex(20);
+ infoButton.setIndex(50);

         hangupButton.setIndex(100);
     }
@@ -1521,6 +1568,16 @@ public class CallPanel
                                 "service.gui.PRESS_FOR_CALL_INFO"));
         }

+ if(!isButtonEnabled(SHOW_CRM_BUTON_PROP))
+ {
+ crmButton
+ = new CallToolBarButton(
+ ImageLoader.getImage(ImageLoader.CRM),
+ CRM_BUTTON,
+ GuiActivator.getResources().getI18NString(
+ "service.gui.PRESS_TO_OPEN_CRM"));
+ }
+
         if(isButtonEnabled(HIDE_CALL_MERGE_BUTON_PROP))
         {
             mergeButton
@@ -1586,6 +1643,8 @@ public class CallPanel
             conferenceButton.addActionListener(this);
         if (dialButton != null)
             dialButton.addActionListener(this);
+ if (crmButton != null)
+ crmButton.addActionListener(this);
         if (infoButton != null)
             infoButton.addActionListener(this);
         if (mergeButton != null)
@@ -1605,6 +1664,8 @@ public class CallPanel

         if (holdButton != null)
             settingsPanel.add(holdButton);
+ if (crmButton != null)
+ settingsPanel.add(crmButton);
         if (infoButton != null)
             settingsPanel.add(infoButton);
         if (mergeButton != null)
diff --git
a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
index 77edeed..152c3a5 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
@@ -891,6 +891,12 @@ public class ImageLoader
         new ImageID("service.gui.buttons.CALL_INFO");

     /**
+ * The call information button icon used in the call panel.
+ */
+ public static final ImageID CRM =
+ new ImageID("service.gui.buttons.CRM");
+
+ /**
      * The image used, when a contact has no photo specified.
      */
     public static final ImageID DEFAULT_USER_PHOTO

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#4

Your unsubscribe procedure does not work,

In what way? Are you not getting the confirmation mail? Checked in spam?

please fix it and remove my e-mail

Sure.

Emil

···

On Thu, Feb 6, 2014 at 6:28 PM, Intech <Intech@012.net.il> wrote:

Thanks

יפתח בן צבי

אינטק טכנולוגיות בע"מ
052-2798065

www.tiviclick.com
שיחות ווידאו בכל אתר

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of Emil
Ivov
Sent: Thursday, February 06, 2014 7:25 PM
To: Jitsi Mailman
Subject: Re: [jitsi-dev] [jitsi-commits] master: Optional button to open a
custom application from the call panel (02aa358)

I suppose we must have discussed this but I have no recollection of it, so a
reminder would be great. I can guess what the point here is but what I don't
understand is:

1. How does this button server a purpose when someone decides to show it? Is
that a pending commit?
2. Wouldn't it be easier to just use the call notification parameters to
open the CRM page?

Emil

On Thu, Feb 6, 2014 at 4:47 PM, <ingo@jitsi.org> wrote:

Repository : ssh://lists.jitsi.org/jitsi

On branch : master
Link :

https://github.com/jitsi/jitsi/compare/600410a57e474760c6d3197ddb286eeedd7cd
221...02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec

---------------------------------------------------------------

commit 02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
Author: Ingo Bauersachs <ingo@jitsi.org>
Date: Thu Feb 6 16:45:22 2014 +0100

    Optional button to open a custom application from the call panel

---------------------------------------------------------------

02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
resources/images/images.properties | 1 +
resources/images/impl/gui/buttons/crm.png | Bin 0 -> 914 bytes
resources/languages/resources.properties | 1 +
.../communicator/impl/gui/main/call/CallPanel.java | 63

+++++++++++++++++++-

.../communicator/impl/gui/utils/ImageLoader.java | 6 ++
5 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/resources/images/images.properties
b/resources/images/images.properties
index a862b98..1b05f48 100644
--- a/resources/images/images.properties
+++ b/resources/images/images.properties
@@ -267,6 +267,7 @@
service.gui.buttons.CONTACT_LIST_DIAL_BUTTON=resources/images/impl/gui
/buttons/c
service.gui.buttons.DIAL_PAD_CALL_BUTTON_BG=resources/images/impl/gui/
buttons/dialPadCallButtonBg.png
service.gui.buttons.CALL_INFO=resources/images/impl/gui/buttons/callIn
fo.png
service.gui.buttons.ZRTP_ID_BUTTON=resources/images/impl/gui/buttons/z
rtpEditId.png
+service.gui.buttons.CRM=resources/images/impl/gui/buttons/crm.png

service.gui.icons.LEAVE_ICON_BUTTON=resources/images/impl/gui/buttons/
leaveRoom.png
service.gui.icons.LEAVE_ICON_ROLLOVER_BUTTON=resources/images/impl/gui
/buttons/leaveRoomOver.png
service.gui.icons.LEAVE_ICON_PRESSED_BUTTON=resources/images/impl/gui/
buttons/leaveRoomPressed.png diff --git
a/resources/images/impl/gui/buttons/crm.png
b/resources/images/impl/gui/buttons/crm.png
new file mode 100644
index 0000000..490cf6b
Binary files /dev/null and b/resources/images/impl/gui/buttons/crm.png
differ diff --git a/resources/languages/resources.properties
b/resources/languages/resources.properties
index 5944f8b..bc366b9 100644
--- a/resources/languages/resources.properties
+++ b/resources/languages/resources.properties
@@ -423,6 +423,7 @@ service.gui.PREFIX=Prefix
service.gui.PRESENCE=Presence
service.gui.PRESS_ENTER_FOR_SUGGESTIONS='Enter' for suggestions
service.gui.PRESS_FOR_CALL_INFO=Press for call info
+service.gui.PRESS_TO_OPEN_CRM=Press to open CRM application
service.gui.PREVIOUS=Previous
service.gui.PREVIOUS_TOOLTIP=Browse older conversations
service.gui.PRINT=&Print diff --git
a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index 5a8b99b..bbe1e99 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -10,6 +10,7 @@ import java.awt.*;
import java.awt.Container;
import java.awt.event.*;
import java.beans.*;
+import java.io.*;
import java.util.*;
import java.util.List;

@@ -92,6 +93,11 @@ public class CallPanel
     private static final String INFO_BUTTON = "INFO_BUTTON";

     /**
+ * The info button name.
+ */
+ private static final String CRM_BUTTON = "CRM_BUTTON";
+
+ /**
      * The logger for this class.
      */
     private static final Logger logger =
Logger.getLogger(CallDialog.class);
@@ -113,6 +119,12 @@ public class CallPanel
         =
"net.java.sip.communicator.impl.gui.main.call.HIDE_CALL_INFO_BUTTON";

     /**
+ * Property to enable the CRM button.
+ */
+ private static final String SHOW_CRM_BUTON_PROP
+ =
+ "net.java.sip.communicator.impl.gui.main.call.SHOW_CRM_BUTTON";
+
+ /**
      * Property to disable the conference "add to call" button.
      */
     private static final String HIDE_CONFERENCE_BUTON_PROP @@ -304,6
+316,11 @@ public class CallPanel
     private SIPCommButton infoButton;

     /**
+ * CRM button.
+ */
+ private CallToolBarButton crmButton;
+
+ /**
      * Indicates if the call timer has been started.
      */
     private boolean isCallTimerStarted = false; @@ -572,6 +589,34 @@
public class CallPanel
             callInfoFrame.setVisible(
                     callInfoFrame.hasCallInfo() &&

!callInfoFrame.isVisible());

         }
+ else if (buttonName.equals(CRM_BUTTON))
+ {
+ String command =
+ GuiActivator.getConfigurationService().getString(
+

"net.java.sip.communicator.impl.gui.main.call.CRM_COMMAND");

+ if (command == null)
+ {
+ return;
+ }
+
+ List<CallPeer> callPeers = callConference.getCallPeers();
+ if (callPeers.isEmpty())
+ {
+ logger.info("No CallPeer for CRM application found.");
+ return;
+ }
+
+ command = String.format(command,

callPeers.get(0).getAddress());

+ try
+ {
+ logger.info("Launching CRM application: " + command);
+ Runtime.getRuntime().exec(command);
+ }
+ catch (IOException e)
+ {
+ logger.error("Unable launch CRM application", e);
+ }
+ }
     }

     /**
@@ -1381,8 +1426,10 @@ public class CallPanel

         chatButton.setIndex(19);

+ if (crmButton != null)
+ crmButton.setIndex(30);
         if (infoButton != null)
- infoButton.setIndex(20);
+ infoButton.setIndex(50);

         hangupButton.setIndex(100);
     }
@@ -1521,6 +1568,16 @@ public class CallPanel
                                 "service.gui.PRESS_FOR_CALL_INFO"));
         }

+ if(!isButtonEnabled(SHOW_CRM_BUTON_PROP))
+ {
+ crmButton
+ = new CallToolBarButton(
+ ImageLoader.getImage(ImageLoader.CRM),
+ CRM_BUTTON,
+ GuiActivator.getResources().getI18NString(
+ "service.gui.PRESS_TO_OPEN_CRM"));
+ }
+
         if(isButtonEnabled(HIDE_CALL_MERGE_BUTON_PROP))
         {
             mergeButton
@@ -1586,6 +1643,8 @@ public class CallPanel
             conferenceButton.addActionListener(this);
         if (dialButton != null)
             dialButton.addActionListener(this);
+ if (crmButton != null)
+ crmButton.addActionListener(this);
         if (infoButton != null)
             infoButton.addActionListener(this);
         if (mergeButton != null)
@@ -1605,6 +1664,8 @@ public class CallPanel

         if (holdButton != null)
             settingsPanel.add(holdButton);
+ if (crmButton != null)
+ settingsPanel.add(crmButton);
         if (infoButton != null)
             settingsPanel.add(infoButton);
         if (mergeButton != null)
diff --git
a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
index 77edeed..152c3a5 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
@@ -891,6 +891,12 @@ public class ImageLoader
         new ImageID("service.gui.buttons.CALL_INFO");

     /**
+ * The call information button icon used in the call panel.
+ */
+ public static final ImageID CRM =
+ new ImageID("service.gui.buttons.CRM");
+
+ /**
      * The image used, when a contact has no photo specified.
      */
     public static final ImageID DEFAULT_USER_PHOTO

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31


#5

I suppose we must have discussed this but I have no recollection of
it, so a reminder would be great. I can guess what the point here is
but what I don't understand is:

I think I've mentioned it on the way to Fosdem, but I could be mistaken.

I remember having a discussion on things that I felt were not suited
for commit to master.

I don't believe this was one of them and I don't remember discussing
it at another point.

1. How does this button server a purpose when someone decides to show
it? Is that a pending commit?

There is a property that defines which command should be executed when clicked. %s in that property is replaced with the address of the first call participant.

OK.

Emil

···

On Thu, Feb 6, 2014 at 6:45 PM, Ingo Bauersachs <ingo@jitsi.org> wrote:

On 06.02.2014, at 18:26, "Emil Ivov" <emcho@jitsi.org> wrote:

2. Wouldn't it be easier to just use the call notification parameters
to open the CRM page?

This would either open the CRM automatically or when the popup is clicked. Opening automatically is undesirable because it would open it for all agents receiving a call from a queue or ring group. Clicking on the popup is only possible while it is shown - which is too short.

Emil

Ingo

On Thu, Feb 6, 2014 at 4:47 PM, <ingo@jitsi.org> wrote:
Repository : ssh://lists.jitsi.org/jitsi

On branch : master
Link : https://github.com/jitsi/jitsi/compare/600410a57e474760c6d3197ddb286eeedd7cd221...02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec

---------------------------------------------------------------

commit 02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
Author: Ingo Bauersachs <ingo@jitsi.org>
Date: Thu Feb 6 16:45:22 2014 +0100

   Optional button to open a custom application from the call panel

---------------------------------------------------------------

02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec
resources/images/images.properties | 1 +
resources/images/impl/gui/buttons/crm.png | Bin 0 -> 914 bytes
resources/languages/resources.properties | 1 +
.../communicator/impl/gui/main/call/CallPanel.java | 63 +++++++++++++++++++-
.../communicator/impl/gui/utils/ImageLoader.java | 6 ++
5 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/resources/images/images.properties b/resources/images/images.properties
index a862b98..1b05f48 100644
--- a/resources/images/images.properties
+++ b/resources/images/images.properties
@@ -267,6 +267,7 @@ service.gui.buttons.CONTACT_LIST_DIAL_BUTTON=resources/images/impl/gui/buttons/c
service.gui.buttons.DIAL_PAD_CALL_BUTTON_BG=resources/images/impl/gui/buttons/dialPadCallButtonBg.png
service.gui.buttons.CALL_INFO=resources/images/impl/gui/buttons/callInfo.png
service.gui.buttons.ZRTP_ID_BUTTON=resources/images/impl/gui/buttons/zrtpEditId.png
+service.gui.buttons.CRM=resources/images/impl/gui/buttons/crm.png
service.gui.icons.LEAVE_ICON_BUTTON=resources/images/impl/gui/buttons/leaveRoom.png
service.gui.icons.LEAVE_ICON_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/leaveRoomOver.png
service.gui.icons.LEAVE_ICON_PRESSED_BUTTON=resources/images/impl/gui/buttons/leaveRoomPressed.png
diff --git a/resources/images/impl/gui/buttons/crm.png b/resources/images/impl/gui/buttons/crm.png
new file mode 100644
index 0000000..490cf6b
Binary files /dev/null and b/resources/images/impl/gui/buttons/crm.png differ
diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties
index 5944f8b..bc366b9 100644
--- a/resources/languages/resources.properties
+++ b/resources/languages/resources.properties
@@ -423,6 +423,7 @@ service.gui.PREFIX=Prefix
service.gui.PRESENCE=Presence
service.gui.PRESS_ENTER_FOR_SUGGESTIONS='Enter' for suggestions
service.gui.PRESS_FOR_CALL_INFO=Press for call info
+service.gui.PRESS_TO_OPEN_CRM=Press to open CRM application
service.gui.PREVIOUS=Previous
service.gui.PREVIOUS_TOOLTIP=Browse older conversations
service.gui.PRINT=&Print
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index 5a8b99b..bbe1e99 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -10,6 +10,7 @@ import java.awt.*;
import java.awt.Container;
import java.awt.event.*;
import java.beans.*;
+import java.io.*;
import java.util.*;
import java.util.List;

@@ -92,6 +93,11 @@ public class CallPanel
    private static final String INFO_BUTTON = "INFO_BUTTON";

    /**
+ * The info button name.
+ */
+ private static final String CRM_BUTTON = "CRM_BUTTON";
+
+ /**
     * The logger for this class.
     */
    private static final Logger logger = Logger.getLogger(CallDialog.class);
@@ -113,6 +119,12 @@ public class CallPanel
        = "net.java.sip.communicator.impl.gui.main.call.HIDE_CALL_INFO_BUTTON";

    /**
+ * Property to enable the CRM button.
+ */
+ private static final String SHOW_CRM_BUTON_PROP
+ = "net.java.sip.communicator.impl.gui.main.call.SHOW_CRM_BUTTON";
+
+ /**
     * Property to disable the conference "add to call" button.
     */
    private static final String HIDE_CONFERENCE_BUTON_PROP
@@ -304,6 +316,11 @@ public class CallPanel
    private SIPCommButton infoButton;

    /**
+ * CRM button.
+ */
+ private CallToolBarButton crmButton;
+
+ /**
     * Indicates if the call timer has been started.
     */
    private boolean isCallTimerStarted = false;
@@ -572,6 +589,34 @@ public class CallPanel
            callInfoFrame.setVisible(
                    callInfoFrame.hasCallInfo() && !callInfoFrame.isVisible());
        }
+ else if (buttonName.equals(CRM_BUTTON))
+ {
+ String command =
+ GuiActivator.getConfigurationService().getString(
+ "net.java.sip.communicator.impl.gui.main.call.CRM_COMMAND");
+ if (command == null)
+ {
+ return;
+ }
+
+ List<CallPeer> callPeers = callConference.getCallPeers();
+ if (callPeers.isEmpty())
+ {
+ logger.info("No CallPeer for CRM application found.");
+ return;
+ }
+
+ command = String.format(command, callPeers.get(0).getAddress());
+ try
+ {
+ logger.info("Launching CRM application: " + command);
+ Runtime.getRuntime().exec(command);
+ }
+ catch (IOException e)
+ {
+ logger.error("Unable launch CRM application", e);
+ }
+ }
    }

    /**
@@ -1381,8 +1426,10 @@ public class CallPanel

        chatButton.setIndex(19);

+ if (crmButton != null)
+ crmButton.setIndex(30);
        if (infoButton != null)
- infoButton.setIndex(20);
+ infoButton.setIndex(50);

        hangupButton.setIndex(100);
    }
@@ -1521,6 +1568,16 @@ public class CallPanel
                                "service.gui.PRESS_FOR_CALL_INFO"));
        }

+ if(!isButtonEnabled(SHOW_CRM_BUTON_PROP))
+ {
+ crmButton
+ = new CallToolBarButton(
+ ImageLoader.getImage(ImageLoader.CRM),
+ CRM_BUTTON,
+ GuiActivator.getResources().getI18NString(
+ "service.gui.PRESS_TO_OPEN_CRM"));
+ }
+
        if(isButtonEnabled(HIDE_CALL_MERGE_BUTON_PROP))
        {
            mergeButton
@@ -1586,6 +1643,8 @@ public class CallPanel
            conferenceButton.addActionListener(this);
        if (dialButton != null)
            dialButton.addActionListener(this);
+ if (crmButton != null)
+ crmButton.addActionListener(this);
        if (infoButton != null)
            infoButton.addActionListener(this);
        if (mergeButton != null)
@@ -1605,6 +1664,8 @@ public class CallPanel

        if (holdButton != null)
            settingsPanel.add(holdButton);
+ if (crmButton != null)
+ settingsPanel.add(crmButton);
        if (infoButton != null)
            settingsPanel.add(infoButton);
        if (mergeButton != null)
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
index 77edeed..152c3a5 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
@@ -891,6 +891,12 @@ public class ImageLoader
        new ImageID("service.gui.buttons.CALL_INFO");

    /**
+ * The call information button icon used in the call panel.
+ */
+ public static final ImageID CRM =
+ new ImageID("service.gui.buttons.CRM");
+
+ /**
     * The image used, when a contact has no photo specified.
     */
    public static final ImageID DEFAULT_USER_PHOTO

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31