changeset 1097:4be83aec27bd

Sync window title with current tab
author Jorge Arellano Cid <jcid@dillo.org>
date Fri, 15 May 2009 15:27:14 -0400
parents bd988ddb1251
children 614b1d02e6c3
files src/uicmd.cc
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/uicmd.cc	Fri May 15 14:27:07 2009 -0400
+++ b/src/uicmd.cc	Fri May 15 15:27:14 2009 -0400
@@ -260,6 +260,11 @@
             // Avoid focus change.
             return 0;
          }
+      } else if (e == FOCUS_CHANGE) {
+         // Update the window title
+         BrowserWindow *bw = a_UIcmd_get_bw_by_widget(selected_child());
+         const char *title = a_History_get_title(a_Nav_get_top_uidx(bw), 1);
+         BW2UI(bw)->set_page_title(title ? title : "");
       } else if (e == MOVE) {
          CustShrinkTabPager *cstp = (CustShrinkTabPager *) pager();
          if (event_inside(r) && children() > 1) {