GNOME Bugzilla – Bug 498947
Beep when focus to textview.
Last modified: 2008-01-06 01:48:52 UTC
Please describe the problem: After use gtk-runtime 2.12, when use focus to textview, there will be a beep sound. The textview is set to uneditable. To reproduce, download and install this: http://downloads.sourceforge.net/stardict/stardict-3.0.1.exe Run it, then click the textview. When backspace on empty entry, it will beep, this is normal, but focus on uneditable textview should not beep. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
I cannot reproduce this problem with stardict on Linux, might be win32-specific.
I believe that this is a duplicate of 490624. *** This bug has been marked as a duplicate of 490624 ***
Yes, this only happen in win32. It seems this bug is still not fixed. The new gtk-runtime just disabled beep in the default themes, but if you choose other themes, which enable beep feature, focus on textview will still beep.
This is not a bug in GTK+ - it is a feature controlled by the theme. If the default Win32 theme disables this behavior, I consider the matter closed. *** This bug has been marked as a duplicate of 490624 ***
I really don't think beeping when focusing an uneditable texteview is a feature in any sense. (Beeping when arrowing off the end is the feature that is disabled in the win32 theme) Of course, I have a hard time imagining how this could be a win32-specific bug. Are we sure it isn't specific to something the app is doing?
I think beeping when focus to a uneditable textview widget is NOT a needed feature too! Because textview is not just used only for editing, it can be used as viewing too, this is why we set it to uneditable. We needn't beeping at all in this case. So I really think this is a bug, as this feature, should be removed at all! When you view article by textview widget(such as in a dictionary program), beep when focus is very annoying!
huzheng ... can you attach a simple, standalone, single C file that demonstrates the problem? In general, this doesn't happen for us.
huzheng, can you also tell us exactly what version of gtk+ you're using on Win32? Because as dom said, we think this issue is already fixed in a recent release.
Here is the demo source code. I installed this gtk runtime: http://downloads.sourceforge.net/pidgin/gtk-runtime-2.12.1-rev-b.exe You need to select another themes first, so win32 beep feature is enabled. #include <gtk/gtk.h> gboolean on_delete_event(GtkWidget * window, GdkEvent *event , gpointer data) { gtk_main_quit(); return FALSE; } int main(int argc,char **argv) { gtk_set_locale(); gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW(window), 200, 100); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (on_delete_event), NULL); GtkWidget *hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); GtkWidget *text_view = gtk_text_view_new(); gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE); GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view)); gtk_text_buffer_set_text(buffer, "focus to me will beep.", -1); GtkWidget *scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(scrolled_window), text_view); gtk_box_pack_start(GTK_BOX(hbox),scrolled_window,TRUE,TRUE,0); text_view = gtk_text_view_new(); gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view)); gtk_text_buffer_set_text(buffer, "beep.", -1); scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(scrolled_window), text_view); gtk_box_pack_start(GTK_BOX(hbox),scrolled_window,FALSE,FALSE,0); gtk_widget_show_all(window); gtk_main(); return 0; }