Преглед на файлове

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 години
родител
ревизия
68ab29c8f9
променени са 1 файла, в които са добавени 14 реда и са изтрити 11 реда
  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 Целия файл

@@ -906,21 +906,24 @@ public abstract class TextFrame extends JInternalFrame implements Window,
906 906
                 if (type == MouseClickType.CLICKED) {
907 907
                     switch (clickType) {
908 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 914
                             break;
914 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 920
                             break;
919 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 927
                             break;
925 928
                         default:
926 929
                             break;

Loading…
Отказ
Запис