mirror of
git://projects.qi-hardware.com/vido.git
synced 2025-01-09 19:10:15 +02:00
fix commands
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
This commit is contained in:
parent
af2cf4d035
commit
c544a52e18
17
src/vido.cc
17
src/vido.cc
@ -111,6 +111,7 @@ void show_help()
|
|||||||
txt += "Ctrl + Q = Quit Vido\n";
|
txt += "Ctrl + Q = Quit Vido\n";
|
||||||
txt += "F1 = Display this help\n";
|
txt += "F1 = Display this help\n";
|
||||||
show_message(title, txt);
|
show_message(title, txt);
|
||||||
|
window2->connect_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
// fill gtkhtml widget with new content
|
// fill gtkhtml widget with new content
|
||||||
@ -155,7 +156,6 @@ void fill_gtkhtml(std::string& html_str, std::string url, std::string title){
|
|||||||
|
|
||||||
}
|
}
|
||||||
// gtk_html_get_selection_html(GTK_HTML(html_wg), )
|
// gtk_html_get_selection_html(GTK_HTML(html_wg), )
|
||||||
window2->resize(320,240);
|
|
||||||
while( Gtk::Main::events_pending() ){
|
while( Gtk::Main::events_pending() ){
|
||||||
Gtk::Main::iteration();
|
Gtk::Main::iteration();
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ void show_random()
|
|||||||
// window2->disconnect_all();
|
// window2->disconnect_all();
|
||||||
|
|
||||||
screenblock(1);
|
screenblock(1);
|
||||||
log_debug("random called. window all disconnected");
|
// log_debug("random called. window all disconnected");
|
||||||
zim::File m = get_file();
|
zim::File m = get_file();
|
||||||
zim::Article article;
|
zim::Article article;
|
||||||
do
|
do
|
||||||
@ -278,6 +278,7 @@ void GoToTop()
|
|||||||
log_debug("go to top called");
|
log_debug("go to top called");
|
||||||
std::string term = "top";
|
std::string term = "top";
|
||||||
bool success = gtk_html_jump_to_anchor(GTK_HTML(html_wg), const_cast<char*>(term.c_str()));
|
bool success = gtk_html_jump_to_anchor(GTK_HTML(html_wg), const_cast<char*>(term.c_str()));
|
||||||
|
window2->connect_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
// // // meta functions
|
// // // meta functions
|
||||||
@ -446,10 +447,6 @@ bool scrolled(GtkHTML *cb_html, GtkOrientation orientation, GtkScrollType scroll
|
|||||||
//static void gtk_html_adjust_cursor_position (GtkHTML *html)
|
//static void gtk_html_adjust_cursor_position (GtkHTML *html)
|
||||||
}
|
}
|
||||||
|
|
||||||
void motion( GdkEventMotion *event)
|
|
||||||
{
|
|
||||||
log_debug("motion");
|
|
||||||
}
|
|
||||||
// // main function
|
// // main function
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@ -477,15 +474,9 @@ int main(int argc, char **argv)
|
|||||||
g_signal_connect( G_OBJECT( html_wg ), "link_clicked", G_CALLBACK( on_link_clicked ), NULL );
|
g_signal_connect( G_OBJECT( html_wg ), "link_clicked", G_CALLBACK( on_link_clicked ), NULL );
|
||||||
g_signal_connect( G_OBJECT( html_wg ), "scroll", G_CALLBACK( scrolled ), NULL );
|
g_signal_connect( G_OBJECT( html_wg ), "scroll", G_CALLBACK( scrolled ), NULL );
|
||||||
gtk_html_set_caret_mode(GTK_HTML(html_wg),false);
|
gtk_html_set_caret_mode(GTK_HTML(html_wg),false);
|
||||||
gtk_widget_set_events(html_wg, 0x3FFFFE);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (html_wg), "resize",
|
|
||||||
GTK_SIGNAL_FUNC (motion), NULL);
|
|
||||||
// g_signal_connect( G_OBJECT( html_wg ), "event", G_CALLBACK( motion ), NULL );
|
|
||||||
|
|
||||||
// gtk_html_adjust_cursor_position(GTK_HTML(html_wg));
|
// gtk_html_adjust_cursor_position(GTK_HTML(html_wg));
|
||||||
Gtk::ScrolledWindow scrolled_window;
|
Gtk::ScrolledWindow scrolled_window;
|
||||||
scrolled_window2 = &scrolled_window;
|
scrolled_window2 = &scrolled_window;
|
||||||
scrolled_window.set_resize_mode(Gtk::RESIZE_PARENT);
|
|
||||||
scrolled_window.add(*html);
|
scrolled_window.add(*html);
|
||||||
scrolled_window.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
scrolled_window.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
||||||
|
|
||||||
@ -494,8 +485,6 @@ int main(int argc, char **argv)
|
|||||||
position = 0;
|
position = 0;
|
||||||
show_random();
|
show_random();
|
||||||
gtk_html_edit_make_cursor_visible(GTK_HTML(html_wg));
|
gtk_html_edit_make_cursor_visible(GTK_HTML(html_wg));
|
||||||
// html.add_events (Gdk::ALL_EVENTS_MASK);
|
|
||||||
// html.signal_motion_notify_event().connect_notify(sigc::ptr_fun(motion));
|
|
||||||
Gtk::Main::run(window);
|
Gtk::Main::run(window);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user