Skip to content

Commit e1dfb60

Browse files
committed
Format code in kitty/cocoa_window.m a little
1 parent 2cee3a8 commit e1dfb60

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

kitty/cocoa_window.m

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ + (GlobalMenuTarget *) shared_instance;
7373

7474
@implementation GlobalMenuTarget
7575

76-
- (void) show_preferences : (id)sender {
76+
- (void)show_preferences:(id)sender {
7777
(void)sender;
7878
set_cocoa_pending_action(PREFERENCES_WINDOW, NULL);
7979
}
8080

81-
- (void) new_os_window : (id)sender {
81+
- (void)new_os_window:(id)sender {
8282
(void)sender;
8383
set_cocoa_pending_action(NEW_OS_WINDOW, NULL);
8484
}
@@ -118,9 +118,10 @@ + (GlobalMenuTarget *) shared_instance
118118
if (!dockMenu) {
119119
GlobalMenuTarget *global_menu_target = [GlobalMenuTarget shared_instance];
120120
dockMenu = [[NSMenu alloc] init];
121-
NSMenuItem *newWindowItem = [dockMenu addItemWithTitle:@"New OS window"
122-
action:@selector(new_os_window:)
123-
keyEquivalent:@""];
121+
NSMenuItem *newWindowItem =
122+
[dockMenu addItemWithTitle:@"New OS window"
123+
action:@selector(new_os_window:)
124+
keyEquivalent:@""];
124125
[newWindowItem setTarget:global_menu_target];
125126
}
126127
return dockMenu;
@@ -238,13 +239,15 @@ - (void)openFilesFromPasteboard:(NSPasteboard *)pasteboard type:(int)type {
238239
[NSApp setMainMenu:bar];
239240

240241
NSMenuItem* appMenuItem =
241-
[bar addItemWithTitle:@"" action:NULL keyEquivalent:@""];
242+
[bar addItemWithTitle:@""
243+
action:NULL
244+
keyEquivalent:@""];
242245
NSMenu* appMenu = [[NSMenu alloc] init];
243246
[appMenuItem setSubmenu:appMenu];
244247

245248
[appMenu addItemWithTitle:[NSString stringWithFormat:@"About %@", app_name]
246249
action:@selector(orderFrontStandardAboutPanel:)
247-
keyEquivalent:@""];
250+
keyEquivalent:@""];
248251
[appMenu addItem:[NSMenuItem separatorItem]];
249252
NSMenuItem* preferences_menu_item = [[NSMenuItem alloc] initWithTitle:@"Preferences..." action:@selector(show_preferences:) keyEquivalent:@","], *new_os_window_menu_item = NULL;
250253
[preferences_menu_item setTarget:global_menu_target];
@@ -263,8 +266,8 @@ - (void)openFilesFromPasteboard:(NSPasteboard *)pasteboard type:(int)type {
263266
action:@selector(hide:)
264267
keyEquivalent:@"h"];
265268
[[appMenu addItemWithTitle:@"Hide Others"
266-
action:@selector(hideOtherApplications:)
267-
keyEquivalent:@"h"]
269+
action:@selector(hideOtherApplications:)
270+
keyEquivalent:@"h"]
268271
setKeyEquivalentModifierMask:NSEventModifierFlagOption | NSEventModifierFlagCommand];
269272
[appMenu addItemWithTitle:@"Show All"
270273
action:@selector(unhideAllApplications:)
@@ -274,19 +277,21 @@ - (void)openFilesFromPasteboard:(NSPasteboard *)pasteboard type:(int)type {
274277
NSMenu* servicesMenu = [[NSMenu alloc] init];
275278
[NSApp setServicesMenu:servicesMenu];
276279
[[appMenu addItemWithTitle:@"Services"
277-
action:NULL
278-
keyEquivalent:@""] setSubmenu:servicesMenu];
280+
action:NULL
281+
keyEquivalent:@""] setSubmenu:servicesMenu];
279282
[servicesMenu release];
280283

281284
[appMenu addItem:[NSMenuItem separatorItem]];
282285

283286
[appMenu addItemWithTitle:[NSString stringWithFormat:@"Quit %@", app_name]
284287
action:@selector(terminate:)
285-
keyEquivalent:@"q"];
288+
keyEquivalent:@"q"];
286289
[appMenu release];
287290

288291
NSMenuItem* windowMenuItem =
289-
[bar addItemWithTitle:@"" action:NULL keyEquivalent:@""];
292+
[bar addItemWithTitle:@""
293+
action:NULL
294+
keyEquivalent:@""];
290295
NSMenu* windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
291296
[windowMenuItem setSubmenu:windowMenu];
292297

@@ -316,10 +321,10 @@ - (void)openFilesFromPasteboard:(NSPasteboard *)pasteboard type:(int)type {
316321
[bar release];
317322

318323
class_addMethod(
319-
object_getClass([NSApp delegate]),
320-
@selector(applicationDockMenu:),
321-
(IMP)get_dock_menu,
322-
"@@:@");
324+
object_getClass([NSApp delegate]),
325+
@selector(applicationDockMenu:),
326+
(IMP)get_dock_menu,
327+
"@@:@");
323328

324329

325330
[NSApp setServicesProvider:[[[ServiceProvider alloc] init] autorelease]];

0 commit comments

Comments
 (0)