ctrl k
  • Changed CMD+Backspace to remove line of entered text and close chat only if there is no message in the message input field #beagleim-236 #16

  • Loading...
  • Andrzej Wójcik (Tigase) committed 5 years ago
    9a328771
    1 parent 61a3b4a6
  • BeagleIM/AppDelegate.swift
    ■ ■ ■ ■ ■
    skipped 850 lines
    851 851   }
    852 852   }
    853 853  
    854  -
    855  - @IBAction func closeChat(_ sender: Any) {
    856  - NotificationCenter.default.post(name: ChatsListViewController.CLOSE_SELECTED_CHAT, object: nil);
    857  - }
    858  -
    859 854   fileprivate var hourlyTimer: Foundation.Timer? = nil;
    860 855  
    861 856   func descheduleHourlyTimer() {
    skipped 25 lines
  • BeagleIM/Base.lproj/Main.storyboard
    ■ ■ ■ ■
    skipped 82 lines
    83 83  CA
    84 84  </string>
    85 85   <connections>
    86  - <action selector="closeChat:" target="Voe-Tx-rLC" id="psw-1x-K8y"/>
     86 + <action selector="delete:" target="Ady-hI-5gd" id="eVQ-YR-LVt"/>
    87 87   </connections>
    88 88   </menuItem>
    89 89   </items>
    skipped 3473 lines
  • BeagleIM/ConversationDetails.storyboard
    ■ ■ ■ ■ ■ ■
    1 1  <?xml version="1.0" encoding="UTF-8"?>
    2  -<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     2 +<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
    3 3   <dependencies>
    4 4   <deployment identifier="macosx"/>
    5  - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15702"/>
     5 + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16096"/>
    6 6   <capability name="System colors introduced in macOS 10.14" minToolsVersion="10.0"/>
    7 7   <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    8 8   </dependencies>
    skipped 2 lines
    11 11   <scene sceneID="xp7-ce-rvd">
    12 12   <objects>
    13 13   <viewController title="ConversationDetailsViewController" identifier="ConversationDetailsViewController" storyboardIdentifier="ConversationDetailsViewController" id="yDC-N1-fGo" customClass="ConversationDetailsViewController" customModule="BeagleIM" customModuleProvider="target" sceneMemberID="viewController">
    14  - <view key="view" misplaced="YES" id="xq8-f6-pmw">
     14 + <view key="view" id="xq8-f6-pmw">
    15 15   <rect key="frame" x="0.0" y="0.0" width="333" height="56"/>
    16 16   <autoresizingMask key="autoresizingMask"/>
    17 17   <subviews>
    18 18   <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8Ku-3C-CwA">
    19 19   <rect key="frame" x="54" y="12" width="20" height="14"/>
    20 20   <textFieldCell key="cell" lineBreakMode="clipping" title="Jid" id="Lkw-eP-Rzq">
    21  - <font key="font" metaFont="toolTip"/>
     21 + <font key="font" metaFont="label" size="11"/>
    22 22   <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
    23 23   <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
    24 24   </textFieldCell>
    skipped 256 lines
    281 281   <segmentedControl verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ysX-T7-iCF">
    282 282   <rect key="frame" x="18" y="260" width="274" height="21"/>
    283 283   <segmentedCell key="cell" controlSize="small" borderStyle="border" alignment="left" segmentDistribution="fill" style="rounded" trackingMode="selectOne" id="Fav-ib-Srd">
    284  - <font key="font" metaFont="toolTip"/>
     284 + <font key="font" metaFont="label" size="11"/>
    285 285   <segments>
    286 286   <segment/>
    287 287   </segments>
    skipped 51 lines
  • BeagleIM/chat/AbstractChatViewController.swift
    ■ ■ ■ ■ ■
    skipped 99 lines
    100 100   }
    101 101  
    102 102  
    103  -
    104 103   func textDidChange(_ notification: Notification) {
    105 104   self.updateMessageFieldSize();
    106 105   }
    107 106  
    108 107   func textView(_ textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool {
    109 108   switch commandSelector {
     109 + case #selector(NSResponder.deleteToBeginningOfLine(_:)):
     110 + guard textView.textStorage?.length ?? 0 == 0 else {
     111 + return false;
     112 + }
     113 + NotificationCenter.default.post(name: ChatsListViewController.CLOSE_SELECTED_CHAT, object: nil);
     114 + return true;
    110 115   case #selector(NSResponder.insertNewline(_:)):
    111 116   guard !NSEvent.modifierFlags.contains(.shift) else {
    112 117   return false;
    skipped 181 lines
  • BeagleIM/ui/AutoresizineTextView.swift
    ■ ■ ■ ■ ■ ■
    skipped 133 lines
    134 134   override func performDragOperation(_ sender: NSDraggingInfo) -> Bool {
    135 135   return (dragHandler?.performDragOperation?(sender) ?? false) || super.performDragOperation(sender);
    136 136   }
     137 +
     138 +
    137 139  }
    138 140   
Please wait...
Page is in error, reload to recover