FS#100 - Scrollbar value export to statusbar
Attached to Project:
Uzbl
Opened by Anonymous Submitter - 2009-08-30 11:56:17 AM
Last edited by Brendan Taylor (bct) - 2010-11-26 07:46:56 PM
Opened by Anonymous Submitter - 2009-08-30 11:56:17 AM
Last edited by Brendan Taylor (bct) - 2010-11-26 07:46:56 PM
|
Detailswould be cool if the value of the v-scrollbar is exported to the statusbar, somehow like this:
+{ "SCROLL_STATE", PTR_C_STR(uzbl.state.scroll_state, NULL)}, +void +scroll_update () { + int max = gtk_adjustment_get_upper(uzbl.gui.bar_v) - gtk_adjustment_get_page_size(uzbl.gui.bar_v); + int val = (int)(gtk_adjustment_get_value(uzbl.gui.bar_v) / max * 100); + g_free(uzbl.state.scroll_state); + uzbl.state.scroll_state = NULL; + if(max == 0) + uzbl.state.scroll_state = g_strdup("All"); + else if(val == 0) + uzbl.state.scroll_state = g_strdup("Top"); + else if(val == 100) + uzbl.state.scroll_state = g_strdup("Bot"); + else + uzbl.state.scroll_state = g_strdup_printf("%d%%", val); + update_title(); +} |
This task depends upon
Closed by Brendan Taylor (bct)
2010-11-26 07:46:56 PM
Reason for closing: Implemented
Additional comments about closing: scroll percentage has been restored, thanks mathstuf
2010-11-26 07:46:56 PM
Reason for closing: Implemented
Additional comments about closing: scroll percentage has been restored, thanks mathstuf
Comment by Noel Maersk (veox) -
2010-11-16 02:02:27 PM
There is a branch by mathstuff that implements this. Will probably make it to Dieterbe/uzbl soon.