@@ -27,13 +27,15 @@ bool ClientHandler::OnBeforePopup(CefRefPtr<CefBrowser> parentBrowser,
2727void ClientHandler::OnAddressChange (CefRefPtr<CefBrowser> browser,
2828 CefRefPtr<CefFrame> frame,
2929 const CefString& url) {
30+ #ifdef SHOW_TOOLBAR_UI
3031 REQUIRE_UI_THREAD ();
3132
3233 if (m_BrowserId == browser->GetIdentifier () && frame->IsMain ()) {
3334 // Set the edit window text
3435 std::string urlStr (url);
3536 gtk_entry_set_text (GTK_ENTRY (m_EditHwnd), urlStr.c_str ());
3637 }
38+ #endif // SHOW_TOOLBAR_UI
3739}
3840
3941void ClientHandler::OnTitleChange (CefRefPtr<CefBrowser> browser,
@@ -52,13 +54,16 @@ void ClientHandler::SendNotification(NotificationType type) {
5254}
5355
5456void ClientHandler::SetLoading (bool isLoading) {
57+ #ifdef SHOW_TOOLBAR_UI
5558 if (isLoading)
5659 gtk_widget_set_sensitive (GTK_WIDGET (m_StopHwnd), true );
5760 else
5861 gtk_widget_set_sensitive (GTK_WIDGET (m_StopHwnd), false );
62+ #endif // SHOW_TOOLBAR_UI
5963}
6064
6165void ClientHandler::SetNavState (bool canGoBack, bool canGoForward) {
66+ #ifdef SHOW_TOOLBAR_UI
6267 if (canGoBack)
6368 gtk_widget_set_sensitive (GTK_WIDGET (m_BackHwnd), true );
6469 else
@@ -68,6 +73,7 @@ void ClientHandler::SetNavState(bool canGoBack, bool canGoForward) {
6873 gtk_widget_set_sensitive (GTK_WIDGET (m_ForwardHwnd), true );
6974 else
7075 gtk_widget_set_sensitive (GTK_WIDGET (m_ForwardHwnd), false );
76+ #endif // SHOW_TOOLBAR_UI
7177}
7278
7379void ClientHandler::CloseMainWindow () {
@@ -86,3 +92,4 @@ void ClientHandler::PopupCreated(CefRefPtr<CefBrowser> browser)
8692bool ClientHandler::CanCloseBrowser (CefRefPtr<CefBrowser> browser) {
8793 return true ;
8894}
95+
0 commit comments