[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [PATCH] focus locationbar in new tab
From:       jonathan_brugge <jonathan_brugge () mailcircuit ! com>
Date:       2002-04-28 9:45:14
[Download RAW message or body]

The attatched patch gives focus to the locationbar when a new tab is added. 
The only reason I can think of to open a tab is to browse, which needs an URL 
typed in the locationbar, which means in turn that it should get focus.
Note that this is my first patch ever (in fact, my first C or C++ code too), 
so there might be better ways to do this. I used focusLocationBar(), but the 
rest of the code uses m_combo->setFocus();. Makes me wonder why 
focusLocationBar() was ever written, as that does just the same (though it's 
easier to see what it does than m_combo->setFocus()).
["focus.diff" (text/x-diff)]

--- konq_mainwindow.cc	Sun Apr 28 12:39:25 2002
+++ /home/kde3/konq_mainwindow.cc	Sat Apr 27 23:43:56 2002
@@ -1944,6 +1944,7 @@
   KonqView* newView = m_pViewManager->addTab();
   if (newView == 0L) return;
   openURL( newView, KURL("about:blank") );
+  focusLocationBar();
   m_pWorkingTab = 0L;
 }
 

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic