Browse Source

Link click events are now stoppable

Fixes issue 3899

Change-Id: I948f67286c8af6538d387a00b957607bae31fc76
Depends-On: I9935284edc82d868d6e2991401ae0d908f3f398b
Reviewed-on: http://gerrit.dmdirc.com/997
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4
Chris Smith 14 years ago
parent
commit
68ab29c8f9
1 changed files with 14 additions and 11 deletions
  1. 14
    11
      src/com/dmdirc/addons/ui_swing/components/frames/TextFrame.java

+ 14
- 11
src/com/dmdirc/addons/ui_swing/components/frames/TextFrame.java View File

906
                 if (type == MouseClickType.CLICKED) {
906
                 if (type == MouseClickType.CLICKED) {
907
                     switch (clickType) {
907
                     switch (clickType) {
908
                         case CHANNEL:
908
                         case CHANNEL:
909
-                            ActionManager.processEvent(CoreActionType.
910
-                                    LINK_CHANNEL_CLICKED, null, attribute);
911
-                            frameParent.getServer().join(
912
-                                    new ChannelJoinRequest(attribute));
909
+                            if (ActionManager.processEvent(CoreActionType.
910
+                                    LINK_CHANNEL_CLICKED, null, attribute)) {
911
+                                frameParent.getServer().join(
912
+                                        new ChannelJoinRequest(attribute));
913
+                            }
913
                             break;
914
                             break;
914
                         case HYPERLINK:
915
                         case HYPERLINK:
915
-                            ActionManager.processEvent(CoreActionType.
916
-                                    LINK_URL_CLICKED, null, attribute);
917
-                            URLHandler.getURLHander().launchApp(attribute);
916
+                            if (ActionManager.processEvent(CoreActionType.
917
+                                    LINK_URL_CLICKED, null, attribute)) {
918
+                                URLHandler.getURLHander().launchApp(attribute);
919
+                            }
918
                             break;
920
                             break;
919
                         case NICKNAME:
921
                         case NICKNAME:
920
-                            ActionManager.processEvent(CoreActionType.
921
-                                    LINK_NICKNAME_CLICKED, null, attribute);
922
-                            getContainer().getServer().addQuery(attribute).
923
-                                    activateFrame();
922
+                            if (ActionManager.processEvent(CoreActionType.
923
+                                    LINK_NICKNAME_CLICKED, null, attribute)) {
924
+                                getContainer().getServer().addQuery(attribute).
925
+                                        activateFrame();
926
+                            }
924
                             break;
927
                             break;
925
                         default:
928
                         default:
926
                             break;
929
                             break;

Loading…
Cancel
Save