X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhelmpot%2FguiGTK.c;h=5ca382d91e6a57e70b49488b131cea482a0c9ec4;hb=e056db635d42bf61eeccbba580c6a0e3a78c3f01;hp=ede4aa03f5d006b99329c9c07b43683451530ed0;hpb=724f1010cfb307ac6c1e9bd23a7e47384550714b;p=helm.git diff --git a/helm/helmpot/guiGTK.c b/helm/helmpot/guiGTK.c index ede4aa03f..5ca382d91 100644 --- a/helm/helmpot/guiGTK.c +++ b/helm/helmpot/guiGTK.c @@ -217,7 +217,7 @@ GUI_load_document(const gchar* name) if (strlen(name) > 40) name += strlen(name) - 40; gtk_statusbar_push(GTK_STATUSBAR(status_bar), statusbar_context, name); - gdk_window_set_cursor(main_area->window, klass->normal_cursor); + /*gdk_window_set_cursor(gtk_widget_get_parent_window(main_area), klass->normal_cursor);*/ if (file_name != NULL) g_free(file_name); file_name = g_strdup(name); @@ -457,6 +457,10 @@ selection_changed(GtkMathView* math_view, mDOMNodeRef node) { g_return_if_fail(math_view != NULL); g_return_if_fail(GTK_IS_MATH_VIEW(math_view)); + + while (node != NULL && !mdom_node_has_attribute(node, DOM_CONST_STRING("xref"))) + node = mdom_node_get_parent(node); + gtk_math_view_set_selection(math_view, node); } @@ -496,6 +500,13 @@ jump(GtkMathView* math_view, mDOMNodeRef node) } } +PRIVATE void +clicked(GtkMathView* math_view, gpointer user_data) +{ + if (gtk_math_view_get_action(math_view) != NULL) + gtk_math_view_action_toggle(math_view); +} + PRIVATE void create_widget_set() { @@ -518,7 +529,13 @@ create_widget_set() "selection_changed", GTK_SIGNAL_FUNC (selection_changed), (gpointer) main_area); - gtk_signal_connect_object (GTK_OBJECT (main_area), "jump", GTK_SIGNAL_FUNC(jump), NULL); + gtk_signal_connect_object (GTK_OBJECT (main_area), + "jump", GTK_SIGNAL_FUNC(jump), + (gpointer) main_area); + + gtk_signal_connect_object (GTK_OBJECT (main_area), + "clicked", GTK_SIGNAL_FUNC(clicked), + (gpointer) main_area); scrolled_area = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_area),