Rename cocoa_update_title() -> cocoa_update_menu_bar_title()

I renamed `cocoa_update_title()` to `cocoa_update_menu_bar_title()` since that more accurately reflects what this function actually does.
This commit is contained in:
Luflosi 2019-07-23 15:02:45 -05:00
parent 38f73b9f5e
commit 40086c8d1c
No known key found for this signature in database
GPG Key ID: 14140F703B7D8362
2 changed files with 3 additions and 3 deletions

View File

@ -482,7 +482,7 @@ pyset_iutf8(ChildMonitor *self, PyObject *args) {
#undef INCREF_CHILD
#undef DECREF_CHILD
extern void cocoa_update_title(PyObject*);
extern void cocoa_update_menu_bar_title(PyObject*);
static inline void
collect_cursor_info(CursorRenderInfo *ans, Window *w, double now, OSWindow *os_window) {
@ -518,7 +518,7 @@ update_window_title(Window *w, OSWindow *os_window) {
Py_INCREF(os_window->window_title);
set_os_window_title(os_window, PyUnicode_AsUTF8(w->title));
#ifdef __APPLE__
if (os_window->is_focused && OPT(macos_show_window_title_in_menubar)) cocoa_update_title(w->title);
if (os_window->is_focused && OPT(macos_show_window_title_in_menubar)) cocoa_update_menu_bar_title(w->title);
#endif
return true;
}

View File

@ -327,7 +327,7 @@ cocoa_create_global_menu(void) {
}
void
cocoa_update_title(PyObject *pytitle) {
cocoa_update_menu_bar_title(PyObject *pytitle) {
NSString *title = [[NSString alloc] initWithUTF8String:PyUnicode_AsUTF8(pytitle)];
NSMenu *bar = [NSApp mainMenu];
if (title_menu != NULL) {