| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8315fb0 commit 90452e3
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -813,7 +813,8 @@ def CreateBrowserSync(windowInfo=None, | |||
| 813 | 813 | cef_window.get().RequestFocus() | |
| 814 | 814 | windowInfo = WindowInfo() | |
| 815 | 815 | windowInfo.SetAsChild(cef_window.get().GetWindowHandle()) | |
| 816 | - Debug("CefWindow handle = "+str(cef_window.get().GetWindowHandle())) | ||
| 816 | + Debug("CefWindow handle = " | ||
| 817 | + +str(<uintptr_t>cef_window.get().GetWindowHandle())) | ||
| 817 | 818 | """ | |
| 818 | 819 | ||
| 819 | 820 | # Only title was set in hello_world.py example | |
@@ -881,7 +882,7 @@ def CreateBrowserSync(windowInfo=None, | |||
| 881 | 882 | Debug("CefBrowser::CreateBrowserSync() succeeded") | |
| 882 | 883 | ||
| 883 | 884 | Debug("CefBrowser window handle = " | |
| 884 | - +str(cefBrowser.get().GetHost().get().GetWindowHandle())) | ||
| 885 | + +str(<uintptr_t>cefBrowser.get().GetHost().get().GetWindowHandle())) | ||
| 885 | 886 | ||
| 886 | 887 | # Request context - part 2/2. | |
| 887 | 888 | if g_applicationSettings["unique_request_context_per_browser"]: | |
@@ -910,7 +911,8 @@ def CreateBrowserSync(windowInfo=None, | |||
| 910 | 911 | x11.SetX11WindowTitle(cefBrowser, | |
| 911 | 912 | PyStringToChar(windowInfo.windowName)) | |
| 912 | 913 | ELIF UNAME_SYSNAME == "Darwin": | |
| 913 | - pass | ||
| 914 | + MacSetWindowTitle(cefBrowser, | ||
| 915 | + PyStringToChar(windowInfo.windowName)) | ||
| 914 | 916 | ||
| 915 | 917 | return pyBrowser | |
| 916 | 918 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,9 @@ | |||
| 8 | 8 | #include <string> | |
| 9 | 9 | #include "include/cef_base.h" | |
| 10 | 10 | #include "include/cef_app.h" | |
| 11 | + #include "include/cef_browser.h" | ||
| 11 | 12 | ||
| 12 | 13 | void MacInitialize(); | |
| 14 | + void MacSetWindowTitle(CefRefPtr<CefBrowser> browser, char* title); | ||
| 13 | 15 | ||
| 14 | 16 | #endif // CEFPYTHON_UTIL_MAC_H_ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,7 +66,8 @@ void MacInitialize() { | |||
| 66 | 66 | [NSApplication sharedApplication]; | |
| 67 | 67 | } | |
| 68 | 68 | ||
| 69 | - void MacSetTitle(CefRefPtr<CefBrowser> browser, char* title) { | ||
| 69 | + void MacSetWindowTitle(CefRefPtr<CefBrowser> browser, char* title) { | ||
| 70 | 70 | NSView* view = browser->GetHost()->GetWindowHandle(); | |
| 71 | - view.window!.title = title; | ||
| 71 | + NSString* nstitle = [NSString stringWithFormat:@"%s" , title]; | ||
| 72 | + view.window.title = nstitle; | ||
| 72 | 73 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,3 @@ | |||
| 1 | 1 | # This file was generated by setup.py | |
| 2 | - DEF UNAME_SYSNAME = "Linux" | ||
| 2 | + DEF UNAME_SYSNAME = "Darwin" | ||
| 3 | 3 | DEF PY_MAJOR_VERSION = 2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,5 +2,9 @@ | |||
| 2 | 2 | # All rights reserved. Licensed under BSD 3-clause license. | |
| 3 | 3 | # Project website: https://github.com/cztomczak/cefpython | |
| 4 | 4 | ||
| 5 | + from cef_ptr cimport CefRefPtr | ||
| 6 | + from cef_browser cimport CefBrowser | ||
| 7 | + | ||
| 5 | 8 | cdef extern from "client_handler/util_mac.h": | |
| 6 | - cdef void MacInitialize() | ||
| 9 | + void MacInitialize() | ||
| 10 | + void MacSetWindowTitle(CefRefPtr[CefBrowser] browser, char* title) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments