2006-03-18 [colin] 2.0.0cvs151
authorColin Leroy <colin@colino.net>
Sat, 18 Mar 2006 19:16:07 +0000 (19:16 +0000)
committerColin Leroy <colin@colino.net>
Sat, 18 Mar 2006 19:16:07 +0000 (19:16 +0000)
* src/mainwindow.c
* src/textview.c
* src/textview.h
Put a watch cursor in textview too when the mainwindow's
cursor in a watch

ChangeLog
PATCHSETS
configure.ac
src/mainwindow.c
src/textview.c
src/textview.h

index 3e767c2f228c187a0c94d6557b51fb4c7316e21b..33084c0e7c40174a92d0fcc5cc6397681c3c0003 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-03-18 [colin]     2.0.0cvs151
+
+       * src/mainwindow.c
+       * src/textview.c
+       * src/textview.h
+               Put a watch cursor in textview too when the mainwindow's
+               cursor in a watch
+
 2006-03-18 [colin]     2.0.0cvs150
 
        * src/folder.c
index 578431561cc324fb8d4b39bae59e1e4338aa9563..b0b2d62787e670e3c2f7b0ca2d8ebcc48abdae04 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.253 -r 1.382.2.254 src/compose.c;  ) > 2.0.0cvs148.patchset
 ( cvs diff -u -r 1.274.2.102 -r 1.274.2.103 src/mainwindow.c;  cvs diff -u -r 1.39.2.14 -r 1.39.2.15 src/mainwindow.h;  cvs diff -u -r 1.1.2.17 -r 1.1.2.18 src/prefs_msg_colors.c;  cvs diff -u -r 1.395.2.182 -r 1.395.2.183 src/summaryview.c;  cvs diff -u -r 1.68.2.19 -r 1.68.2.20 src/summaryview.h;  cvs diff -u -r 1.2.2.11 -r 1.2.2.12 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.4.3 -r 1.1.4.4 src/gtk/colorlabel.h;  ) > 2.0.0cvs149.patchset
 ( cvs diff -u -r 1.213.2.86 -r 1.213.2.87 src/folder.c;  ) > 2.0.0cvs150.patchset
+( cvs diff -u -r 1.274.2.103 -r 1.274.2.104 src/mainwindow.c;  cvs diff -u -r 1.96.2.102 -r 1.96.2.103 src/textview.c;  cvs diff -u -r 1.12.2.10 -r 1.12.2.11 src/textview.h;  ) > 2.0.0cvs151.patchset
index 65d513cf13ecb0ce84c10953d9cc10c8270188a4..39c010f0ae2718e70560583e45e500943359e696 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=150
+EXTRA_VERSION=151
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index ee753317851bb747d22feed78a51cc1a61679d27..e0e8e8825d1f65f2aed7037ba600fe7a5a09a5ae 100644 (file)
 #include "foldersort.h"
 #include "icon_legend.h"
 #include "colorlabel.h"
+#include "textview.h"
 
 #define AC_LABEL_WIDTH 240
 
 /* list of all instantiated MainWindow */
 static GList *mainwin_list = NULL;
 
-static GdkCursor *watch_cursor;
+static GdkCursor *watch_cursor = NULL;
 
 static void main_window_menu_callback_block    (MainWindow     *mainwin);
 static void main_window_menu_callback_unblock  (MainWindow     *mainwin);
@@ -1328,9 +1329,11 @@ void main_window_update_actions_menu(MainWindow *mainwin)
 void main_window_cursor_wait(MainWindow *mainwin)
 {
 
-       if (mainwin->cursor_count == 0)
+       if (mainwin->cursor_count == 0) {
                gdk_window_set_cursor(mainwin->window->window, watch_cursor);
-
+               textview_cursor_wait(mainwin->messageview->mimeview->textview);
+       }
+       
        mainwin->cursor_count++;
 
        gdk_flush();
@@ -1341,9 +1344,10 @@ void main_window_cursor_normal(MainWindow *mainwin)
        if (mainwin->cursor_count)
                mainwin->cursor_count--;
 
-       if (mainwin->cursor_count == 0)
+       if (mainwin->cursor_count == 0) {
                gdk_window_set_cursor(mainwin->window->window, NULL);
-
+               textview_cursor_normal(mainwin->messageview->mimeview->textview);
+       }
        gdk_flush();
 }
 
index 06af6f725295b53efa8e15461bc42ae25ad8013f..67be7a35849e0be595ed2cfaa759251130df6538 100644 (file)
@@ -102,6 +102,7 @@ static GdkColor emphasis_color = {
 
 static GdkCursor *hand_cursor = NULL;
 static GdkCursor *text_cursor = NULL;
+static GdkCursor *watch_cursor= NULL;
 
 #define TEXTVIEW_STATUSBAR_PUSH(textview, str)                             \
 {      if (textview->messageview->statusbar)                               \
@@ -420,6 +421,8 @@ void textview_init(TextView *textview)
                hand_cursor = gdk_cursor_new(GDK_HAND2);
        if (!text_cursor)
                text_cursor = gdk_cursor_new(GDK_XTERM);
+       if (!watch_cursor)
+               watch_cursor = gdk_cursor_new(GDK_WATCH);
 
        textview_reflect_prefs(textview);
        textview_set_all_headers(textview, FALSE);
@@ -1736,6 +1739,22 @@ static gboolean textview_visibility_notify(GtkWidget *widget,
        return FALSE;
 }
 
+void textview_cursor_wait(TextView *textview)
+{
+       GdkWindow *window = gtk_text_view_get_window(
+                       GTK_TEXT_VIEW(textview->text),
+                       GTK_TEXT_WINDOW_TEXT);
+       gdk_window_set_cursor(window, watch_cursor);
+}
+
+void textview_cursor_normal(TextView *textview)
+{
+       GdkWindow *window = gtk_text_view_get_window(
+                       GTK_TEXT_VIEW(textview->text),
+                       GTK_TEXT_WINDOW_TEXT);
+       gdk_window_set_cursor(window, NULL);
+}
+
 static void textview_uri_update(TextView *textview, gint x, gint y)
 {
        GtkTextBuffer *buffer;
@@ -1794,7 +1813,11 @@ static void textview_uri_update(TextView *textview, gint x, gint y)
                
                window = gtk_text_view_get_window(GTK_TEXT_VIEW(textview->text),
                                                  GTK_TEXT_WINDOW_TEXT);
-               gdk_window_set_cursor(window, uri ? hand_cursor : text_cursor);
+               if (textview->messageview->mainwin->cursor_count == 0) {
+                       gdk_window_set_cursor(window, uri ? hand_cursor : text_cursor);
+               } else {
+                       gdk_window_set_cursor(window, watch_cursor);
+               }
 
                TEXTVIEW_STATUSBAR_POP(textview);
 
index ac1a68836d296864a341c841ac897668044ded77..d93f8acdaf5a6e293259486c95ef8b21561f38cd 100644 (file)
@@ -98,5 +98,7 @@ gboolean textview_search_string                       (TextView       *textview,
 gboolean textview_search_string_backward       (TextView       *textview,
                                                 const gchar    *str,
                                                 gboolean        case_sens);
+void textview_cursor_wait(TextView *textview);
+void textview_cursor_normal(TextView *textview);
 
 #endif /* __TEXTVIEW_H__ */