gnumeric r17165 - in trunk: . src
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17165 - in trunk: . src
- Date: Wed, 25 Feb 2009 01:15:52 +0000 (UTC)
Author: mortenw
Date: Wed Feb 25 01:15:52 2009
New Revision: 17165
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17165&view=rev
Log:
2009-02-24 Morten Welinder <terra gnome org>
* src/gui-util.c (gnumeric_create_tooltip): Add extra screen
argument so we can pop up on the right screen. All callers
changed.
* src/gnm-pane.c (gnm_pane_display_obj_size_tip): Make this
multihead safe.
* src/wbc-gtk.c (cb_sheet_label_drag_begin): Pop up the arrow on
the right screen.
* src/sheet-control-gui.c (scg_comment_display): Pop up the cell
comment on the right screen and at coordinates relating to that
screen.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/src/gnm-pane.c
trunk/src/gui-util.c
trunk/src/gui-util.h
trunk/src/item-bar.c
trunk/src/item-cursor.c
trunk/src/item-grid.c
trunk/src/sheet-control-gui.c
trunk/src/wbc-gtk.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Feb 25 01:15:52 2009
@@ -1,5 +1,10 @@
Gnumeric 1.9.5
+Morten:
+ * Fix multihead issues with cell comments.
+ * Fix multihead issue with sheet reordering.
+ * Fix multihead issues with tooltips.
+
--------------------------------------------------------------------------
Gnumeric 1.9.4
Modified: trunk/src/gnm-pane.c
==============================================================================
--- trunk/src/gnm-pane.c (original)
+++ trunk/src/gnm-pane.c Wed Feb 25 01:15:52 2009
@@ -1971,11 +1971,14 @@
if (pane->size_tip == NULL) {
GtkWidget *top;
int x, y;
- pane->size_tip = gnumeric_create_tooltip ();
+ GdkScreen *screen = gtk_window_get_screen (wbcg_toplevel (scg_wbcg (scg)));
+
+ pane->size_tip = gnumeric_create_tooltip (screen);
top = gtk_widget_get_toplevel (pane->size_tip);
/* do not use gnumeric_position_tooltip because it places the tip
* too close to the mouse and generates LEAVE events */
- gdk_window_get_pointer (NULL, &x, &y, NULL);
+ gdk_window_get_pointer (gdk_screen_get_root_window (screen),
+ &x, &y, NULL);
gtk_window_move (GTK_WINDOW (top), x + 10, y + 10);
gtk_widget_show_all (top);
}
Modified: trunk/src/gui-util.c
==============================================================================
--- trunk/src/gui-util.c (original)
+++ trunk/src/gui-util.c Wed Feb 25 01:15:52 2009
@@ -427,7 +427,7 @@
GtkWidget *
-gnumeric_create_tooltip (void)
+gnumeric_create_tooltip (GdkScreen *screen)
{
GtkWidget *tip, *label, *frame;
static GtkRcStyle*rc_style = NULL;
@@ -443,6 +443,7 @@
}
tip = gtk_window_new (GTK_WINDOW_POPUP);
+ gtk_window_set_screen (GTK_WINDOW (tip), screen);
if (rc_style != NULL)
gtk_widget_modify_style (tip, rc_style);
Modified: trunk/src/gui-util.h
==============================================================================
--- trunk/src/gui-util.h (original)
+++ trunk/src/gui-util.h Wed Feb 25 01:15:52 2009
@@ -39,7 +39,7 @@
* Pseudo-tool-tip support code.
*/
void gnumeric_position_tooltip (GtkWidget *tip, int horizontal);
-GtkWidget *gnumeric_create_tooltip (void);
+GtkWidget *gnumeric_create_tooltip (GdkScreen *screen);
GladeXML *gnm_glade_xml_new (GOCmdContext *cc, char const *gladefile,
char const *root, char const *domain);
Modified: trunk/src/item-bar.c
==============================================================================
--- trunk/src/item-bar.c (original)
+++ trunk/src/item-bar.c Wed Feb 25 01:15:52 2009
@@ -964,7 +964,7 @@
ib->colrow_resize_size = cri->size_pixels;
if (ib->tip == NULL) {
- ib->tip = gnumeric_create_tooltip ();
+ ib->tip = gnumeric_create_tooltip (gdk_event_get_screen (e));
colrow_tip_setlabel (ib, is_cols, ib->colrow_resize_size);
/* Position above the current point for both
* col and row headers. trying to put it
Modified: trunk/src/item-cursor.c
==============================================================================
--- trunk/src/item-cursor.c (original)
+++ trunk/src/item-cursor.c Wed Feb 25 01:15:52 2009
@@ -1061,7 +1061,8 @@
item_cursor_tip_setlabel (ItemCursor *ic, char const *text)
{
if (ic->tip == NULL) {
- ic->tip = gnumeric_create_tooltip ();
+ GdkScreen *screen = gtk_window_get_screen (wbcg_toplevel (scg_wbcg (ic->scg)));
+ ic->tip = gnumeric_create_tooltip (screen);
gnumeric_position_tooltip (ic->tip, TRUE);
gtk_widget_show_all (gtk_widget_get_toplevel (ic->tip));
}
Modified: trunk/src/item-grid.c
==============================================================================
--- trunk/src/item-grid.c (original)
+++ trunk/src/item-grid.c Wed Feb 25 01:15:52 2009
@@ -966,7 +966,8 @@
g_return_val_if_fail (link == ig->cur_link, FALSE);
if (ig->tip == NULL && strlen (tiptext) > 0) {
- ig->tip = gnumeric_create_tooltip ();
+ GdkScreen *screen = gtk_window_get_screen (wbcg_toplevel (scg_wbcg (ig->scg)));
+ ig->tip = gnumeric_create_tooltip (screen);
gtk_label_set_text (GTK_LABEL (ig->tip), tiptext);
gnumeric_position_tooltip (ig->tip, TRUE);
gtk_widget_show_all (gtk_widget_get_toplevel (ig->tip));
Modified: trunk/src/sheet-control-gui.c
==============================================================================
--- trunk/src/sheet-control-gui.c (original)
+++ trunk/src/sheet-control-gui.c Wed Feb 25 01:15:52 2009
@@ -2474,9 +2474,13 @@
GtkWidget *text, *frame;
GtkTextBuffer *buffer;
GtkTextIter iter;
+ GtkWindow *toplevel = wbcg_toplevel (scg_wbcg (scg));
+ GdkScreen *screen = gtk_window_get_screen (toplevel);
scg->comment.item = gtk_window_new (GTK_WINDOW_POPUP);
- gdk_window_get_pointer (NULL, &x, &y, NULL);
+ gtk_window_set_screen (GTK_WINDOW (scg->comment.item), screen);
+ gdk_window_get_pointer (gdk_screen_get_root_window (screen),
+ &x, &y, NULL);
gtk_window_move (GTK_WINDOW (scg->comment.item), x+10, y+10);
text = gtk_text_view_new ();
Modified: trunk/src/wbc-gtk.c
==============================================================================
--- trunk/src/wbc-gtk.c (original)
+++ trunk/src/wbc-gtk.c Wed Feb 25 01:15:52 2009
@@ -617,6 +617,8 @@
/* Create the arrow. */
arrow = gtk_window_new (GTK_WINDOW_POPUP);
+ gtk_window_set_screen (GTK_WINDOW (arrow),
+ gtk_widget_get_screen (widget));
gtk_widget_realize (arrow);
pixbuf = gtk_icon_theme_load_icon (
gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget)),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]