Re: ComboBox and Tooltips
- From: muppet <scott asofyet org>
- To: Jeffrey Ratcliffe <jeffrey ratcliffe gmail com>
- Cc: gtk-perl-list gnome org
- Subject: Re: ComboBox and Tooltips
- Date: Fri, 23 Mar 2007 00:18:26 -0400
On Mar 20, 2007, at 9:15 AM, Jeffrey Ratcliffe wrote:
Having successfully compiled Gtk2 1.144 against gtk+ 2.10.11 in a
sandbox, I have just switched all my OptionMenus to ComboBoxes.
However, the Tooltips don't seem to work. Here is a little demo - the
button tooltip works fine, but the combobox not.
What haven't I understood correctly?
Hmm. Doesn't work on my systems, either.
Yet again, the answer is "there is nothing in the bindings that would
cause this sort of behavior, so this is a gtk+ issue."
To wit, i see the exact same behavior from this transliteration of
your perl code to C (feel free to include it in your bugzilla
report ;-):
/* compile with
gcc -W -Wall `pkg-config --libs --cflags gtk+-2.0` combotooltip.c -o
combotooltip
*/
#include <gtk/gtk.h>
int
main (int argc,
char *argv[])
{
GtkWidget * window;
GtkWidget * hbox;
GtkWidget * button;
GtkWidget * cb;
GtkTooltips * tooltips;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "delete-event",
G_CALLBACK (gtk_main_quit), NULL);
hbox = gtk_hbox_new (FALSE, 5);
gtk_container_add (GTK_CONTAINER (window), hbox);
tooltips = gtk_tooltips_new ();
gtk_tooltips_enable (tooltips);
button = gtk_button_new_with_label ("Button");
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button, "Button", NULL);
cb = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (cb), "Combo Box");
gtk_combo_box_set_active (GTK_COMBO_BOX (cb), 0);
gtk_box_pack_end (GTK_BOX (hbox), cb, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, cb, "Combo Box", NULL);
gtk_widget_show_all (window);
gtk_main ();
return 0;
}
--
If the monkey could type one keystroke every nanosecond, the expected
waiting time until the monkey types out Hamlet is so long that the
estimated age of the universe is insignificant by comparison ... this
is not a practical method for writing plays.
-- Gian-Carlo Rota
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]