Changeset cfeaba1cd10e7c3fa4201bfe898f2b6b17386cc0
- Timestamp:
- 08/24/08 18:46:20 (5 years ago)
- Author:
- Armin Burgmeier <armin@…>
- Parents:
- 3bb782a97a760f078c127f35d7bbb94f7ebd6655
- Children:
- 3bb736dc8aaca0b06ecd8cd17b594c34c828759e
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2008-08-24T18:46:20Z+0200
- Message:
-
Focus opened DocWindow? on subscription
2008-08-24 Armin Burgmeier <armin@…>
- inc/core/browser.hpp:
- src/core/browser.cpp: Added the get_selected() and set_selected()
methods, using the new inf_gtk_browser_view_set_selected().
- src/commands/browser-commands.cpp: When subscribing to a session,
then change the BrowserView? selection to the corresponding note, and
give focus to the DocWindow?, so the user can start typing immediately.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r3bb782a9
|
rcfeaba1
|
|
| | 1 | 2008-08-24 Armin Burgmeier <armin@arbur.net> |
| | 2 | |
| | 3 | * inc/core/browser.hpp: |
| | 4 | * src/core/browser.cpp: Added the get_selected() and set_selected() |
| | 5 | methods, using the new inf_gtk_browser_view_set_selected(). |
| | 6 | |
| | 7 | * src/commands/browser-commands.cpp: When subscribing to a session, |
| | 8 | then change the BrowserView selection to the corresponding note, and |
| | 9 | give focus to the DocWindow, so the user can start typing immediately. |
| | 10 | |
| 1 | 11 | 2008-08-14 Armin Burgmeier <armin@arbur.net> |
| 2 | 12 | |
-
|
r5fae4ad
|
rcfeaba1
|
|
| 4 | 4 | - Subscribing to a for the first time document and clicking into it scrolls |
| 5 | 5 | the view all way down. Perhaps it is enough to keep the cursor initially at |
| 6 | | the beginning of the document. |
| | 6 | the beginning of the document, which we should do anyway (in infinote) |
| 7 | 7 | - ^W should close the window |
| 8 | 8 | - Remove references to doclist, userlist and chat in the icon manager |
| … |
… |
|
| 16 | 16 | - Add close buttons to browser in left pane, user lists and docwindow infos, |
| 17 | 17 | and a way to re-show the former two. |
| | 18 | |
| | 19 | These things need to be implemented in infinote, but again would be nice |
| | 20 | to have: |
| | 21 | |
| | 22 | - Show other user's cursors |
| | 23 | - Show other user's selections |
| | 24 | - Show other user's viewport position (perhaps in a separate widget) |
-
|
rdddf956
|
rcfeaba1
|
|
| 66 | 66 | } |
| 67 | 67 | |
| | 68 | bool get_selected(InfcBrowser** browser, InfcBrowserIter* iter); |
| | 69 | void set_selected(InfcBrowser* browser, InfcBrowserIter* iter); |
| | 70 | |
| 68 | 71 | SignalActivate signal_activate() const { return m_signal_activate; } |
| 69 | 72 | |
-
|
r3bb782a9
|
rcfeaba1
|
|
| 289 | 289 | infc_browser_iter_get_name(browser, iter), |
| 290 | 290 | m_info_storage.get_key(browser, iter)); |
| | 291 | |
| | 292 | // For now we always highlight the newly created session... |
| | 293 | // TODO: If the user issued other browserview events in the meanwhile, |
| | 294 | // then don't select the item, and if the user did issue other folder |
| | 295 | // events, then don't switch to the document in the folder. |
| 291 | 296 | m_folder.switch_to_document(window); |
| | 297 | gtk_widget_grab_focus(GTK_WIDGET(window.get_text_view())); |
| | 298 | m_browser.set_selected(browser, iter); |
| 292 | 299 | |
| 293 | 300 | SessionNode& node = m_session_map[session]; |
-
|
r77f22cf
|
rcfeaba1
|
|
| 269 | 269 | m_status_bar.add_message(StatusBar::ERROR, error.what(), 5); |
| 270 | 270 | } |
| | 271 | |
| | 272 | bool Gobby::Browser::get_selected(InfcBrowser** browser, |
| | 273 | InfcBrowserIter* iter) |
| | 274 | { |
| | 275 | GtkTreeIter tree_iter; |
| | 276 | if(!inf_gtk_browser_view_get_selected(m_browser_view, &tree_iter)) |
| | 277 | return false; |
| | 278 | |
| | 279 | InfcBrowser* tmp_browser; |
| | 280 | InfcBrowserIter* tmp_iter; |
| | 281 | |
| | 282 | gtk_tree_model_get( |
| | 283 | GTK_TREE_MODEL(m_browser_store), &tree_iter, |
| | 284 | INF_GTK_BROWSER_MODEL_COL_BROWSER, &tmp_browser, |
| | 285 | INF_GTK_BROWSER_MODEL_COL_NODE, &tmp_iter, -1); |
| | 286 | |
| | 287 | *browser = tmp_browser; |
| | 288 | *iter = *tmp_iter; |
| | 289 | |
| | 290 | infc_browser_iter_free(tmp_iter); |
| | 291 | g_object_unref(tmp_browser); |
| | 292 | |
| | 293 | return true; |
| | 294 | } |
| | 295 | |
| | 296 | void Gobby::Browser::set_selected(InfcBrowser* browser, InfcBrowserIter* iter) |
| | 297 | { |
| | 298 | GtkTreeIter tree_iter; |
| | 299 | |
| | 300 | gboolean has_iter = inf_gtk_browser_model_browser_iter_to_tree_iter( |
| | 301 | INF_GTK_BROWSER_MODEL(m_browser_store), |
| | 302 | browser, iter, &tree_iter); |
| | 303 | g_assert(has_iter == TRUE); |
| | 304 | |
| | 305 | inf_gtk_browser_view_set_selected(m_browser_view, &tree_iter); |
| | 306 | } |