Commit 9cc48eec authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

place the function tooltip correctly

2010-06-16 Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* configure.in: check for gtk_widget_get_allocation
	* src/dead-kittens.h (gtk_widget_get_allocation): new

2010-06-16  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* gnumeric-expr-entry.c (gee_create_tooltip): place the
	  tooltip correctly
parent e996e09a
2010-06-16 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* configure.in: check for gtk_widget_get_allocation
* src/dead-kittens.h (gtk_widget_get_allocation): new
2010-06-16 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* src/GNOME_Gnumeric-gtk.xml.in: add new menu items
......
......@@ -689,7 +689,7 @@ LIBS="$GNUMERIC_LIBS $LIBS"
AC_CHECK_FUNCS(g_date_set_time_t g_slice_alloc g_option_context_set_delocalize)
AC_CHECK_FUNCS(pango_font_map_create_context)
AC_CHECK_FUNCS(gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_set_visible gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area gtk_entry_get_buffer gtk_widget_get_can_focus gtk_entry_get_text_length gtk_entry_set_icon_from_stock gtk_layout_get_bin_window)
AC_CHECK_FUNCS(gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_set_visible gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area gtk_entry_get_buffer gtk_widget_get_can_focus gtk_entry_get_text_length gtk_entry_set_icon_from_stock gtk_layout_get_bin_window gtk_widget_get_allocation)
AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules)
AC_MSG_CHECKING([for PANGO_WEIGHT_THIN etc.])
......
......@@ -27,4 +27,9 @@
#define gtk_widget_get_window(w) ((w)->window)
#endif
#ifndef HAVE_GTK_WIDGET_GET_ALLOCATION
#define gtk_widget_get_allocation(w,a) (*(a) = (w)->allocation)
#endif
#endif
2010-06-16 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnumeric-expr-entry.c (gee_create_tooltip): place the
tooltip correctly
2010-06-15 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnumeric-expr-entry.c (gee_create_tooltip): set tooltip
......
......@@ -615,9 +615,9 @@ gee_create_tooltip (GnmExprEntry *gee, gchar const *str)
GtkTextBuffer *buffer;
GtkWindow *toplevel;
GdkScreen *screen;
gint dest_x = 0, dest_y = 0;
gint root_x = 0, root_y = 0;
GtkRequisition requisition;
GtkAllocation allocation;
GdkWindow *gdkw;
toplevel = GTK_WINDOW (gtk_widget_get_toplevel
(GTK_WIDGET (gee->entry)));
......@@ -630,20 +630,19 @@ gee_create_tooltip (GnmExprEntry *gee, gchar const *str)
screen = gtk_window_get_screen (toplevel);
gtk_widget_size_request (GTK_WIDGET (gee->entry), &requisition);
gtk_widget_translate_coordinates
(GTK_WIDGET (gee->entry), GTK_WIDGET (toplevel),
0, 2 * requisition.height, &dest_x, &dest_y);
gtk_window_get_position (toplevel, &root_x, &root_y);
gdkw = gtk_widget_get_window (GTK_WIDGET (gee->entry));
gdk_window_get_origin (gdkw, &root_x, &root_y);
gtk_widget_get_allocation (GTK_WIDGET (gee->entry), &allocation);
tip = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_type_hint (GTK_WINDOW (tip),
GDK_WINDOW_TYPE_HINT_TOOLTIP);
gtk_window_set_resizable (GTK_WINDOW (tip), FALSE);
gtk_widget_set_name (tip, "gnumeric-tooltip");
gtk_window_set_gravity (GTK_WINDOW (tip), GDK_GRAVITY_NORTH_WEST);
gtk_window_set_screen (GTK_WINDOW (tip), screen);
gtk_window_move (GTK_WINDOW (tip), root_x + dest_x, root_y + dest_y);
gtk_window_move (GTK_WINDOW (tip), root_x, root_y + allocation.height);
text = gtk_text_view_new ();
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text), GTK_WRAP_NONE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment