[evolution] Kill e-cursor(s) (both of them).



commit 5beeca1f80c3a618feeeb2c5b7e09cc47b64387d
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Nov 9 20:40:07 2009 -0500

    Kill e-cursor(s) (both of them).

 calendar/gui/e-meeting-time-sel.c           |   19 +++-
 doc/reference/shell/eshell-sections.txt     |    2 -
 doc/reference/shell/tmpl/e-util.sgml        |   30 -----
 doc/reference/shell/tmpl/eshell-unused.sgml |   16 +++
 e-util/Makefile.am                          |    2 -
 e-util/e-cursor.c                           |   68 ------------
 e-util/e-cursor.h                           |   36 ------
 mail/em-format-html-display.c               |    1 -
 shell/main.c                                |    4 -
 widgets/misc/Makefile.am                    |    6 -
 widgets/misc/e-cursors.c                    |  159 ---------------------------
 widgets/misc/e-cursors.h                    |   68 ------------
 widgets/misc/pixmaps/Makefile.am            |   11 --
 widgets/misc/pixmaps/cursor_cross.xpm       |   38 -------
 widgets/misc/pixmaps/cursor_hand_closed.xpm |   38 -------
 widgets/misc/pixmaps/cursor_hand_open.xpm   |   38 -------
 widgets/misc/pixmaps/cursor_zoom_in.xpm     |   37 ------
 widgets/misc/pixmaps/cursor_zoom_out.xpm    |   37 ------
 widgets/table/e-table-header-item.c         |   14 ++-
 widgets/table/e-table-header-item.h         |    1 +
 20 files changed, 42 insertions(+), 583 deletions(-)
---
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 633af15..4bd1ed1 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -40,7 +40,6 @@
 
 #include "misc/e-dateedit.h"
 #include "e-util/e-binding.h"
-#include "e-util/e-cursor.h"
 #include "e-util/e-util.h"
 
 #include "e-meeting-utils.h"
@@ -1386,8 +1385,16 @@ e_meeting_time_selector_refresh_cb (gpointer data)
 	EMeetingTimeSelector *mts = data;
 
 	if (e_meeting_store_get_num_queries (mts->model) == 0) {
-		e_cursor_set ((GtkWidget *)mts, E_CURSOR_NORMAL);
+		GdkCursor *cursor;
+		GdkWindow *window;
+
+		cursor = gdk_cursor_new (GDK_LEFT_PTR);
+		window = gtk_widget_get_window (GTK_WIDGET (mts));
+		gdk_window_set_cursor (window, cursor);
+		gdk_cursor_unref (cursor);
+
 		mts->last_cursor_set = GDK_LEFT_PTR;
+
 		e_meeting_time_selector_item_set_normal_cursor (E_MEETING_TIME_SELECTOR_ITEM (mts->item_top));
 		e_meeting_time_selector_item_set_normal_cursor (E_MEETING_TIME_SELECTOR_ITEM (mts->item_main));
 	}
@@ -1406,6 +1413,8 @@ void
 e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row, gboolean all)
 {
 	EMeetingTime start, end;
+	GdkCursor *cursor;
+	GdkWindow *window;
 
 	start = mts->meeting_start_time;
 	g_date_subtract_days (&start.date, E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE);
@@ -1418,7 +1427,11 @@ e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row,
 
 	/*  set the cursor to Busy, We need to reset it to normal once the free busy
 	    queries are complete */
-	e_cursor_set ((GtkWidget *)mts, E_CURSOR_BUSY);
+	cursor = gdk_cursor_new (GDK_WATCH);
+	window = gtk_widget_get_window (GTK_WIDGET (mts));
+	gdk_window_set_cursor (window, cursor);
+	gdk_cursor_unref (cursor);
+
 	mts->last_cursor_set = GDK_WATCH;
 
 	/* Ref ourselves in case we are called back after destruction,
diff --git a/doc/reference/shell/eshell-sections.txt b/doc/reference/shell/eshell-sections.txt
index ae9ecaf..557f8b8 100644
--- a/doc/reference/shell/eshell-sections.txt
+++ b/doc/reference/shell/eshell-sections.txt
@@ -573,8 +573,6 @@ e_util_guess_mime_type
 e_util_read_file
 e_util_get_category_filter_options
 e_charset_add_radio_actions
-ECursorType
-e_cursor_set
 e_folder_map_local_folders
 e_fsutils_usage
 e_fsutils_avail
diff --git a/doc/reference/shell/tmpl/e-util.sgml b/doc/reference/shell/tmpl/e-util.sgml
index 15d7d5f..b58fb3d 100644
--- a/doc/reference/shell/tmpl/e-util.sgml
+++ b/doc/reference/shell/tmpl/e-util.sgml
@@ -378,36 +378,6 @@ Miscellaneous Utility Functions
 @Returns: 
 
 
-<!-- ##### ENUM ECursorType ##### -->
-<para>
-
-</para>
-
- E_CURSOR_FAT_CROSS: 
- E_CURSOR_THIN_CROSS: 
- E_CURSOR_ARROW: 
- E_CURSOR_MOVE: 
- E_CURSOR_ZOOM_IN: 
- E_CURSOR_ZOOM_OUT: 
- E_CURSOR_SIZE_X: 
- E_CURSOR_SIZE_Y: 
- E_CURSOR_SIZE_TL: 
- E_CURSOR_SIZE_TR: 
- E_CURSOR_PRESS: 
- E_CURSOR_HAND_OPEN: 
- E_CURSOR_HAND_CLOSED: 
- E_CURSOR_XTERM: 
- E_CURSOR_NUM_CURSORS: 
-
-<!-- ##### FUNCTION e_cursor_set ##### -->
-<para>
-
-</para>
-
- widget: 
- cursor: 
-
-
 <!-- ##### FUNCTION e_folder_map_local_folders ##### -->
 <para>
 
diff --git a/doc/reference/shell/tmpl/eshell-unused.sgml b/doc/reference/shell/tmpl/eshell-unused.sgml
index 2f908a7..d3c3dc5 100644
--- a/doc/reference/shell/tmpl/eshell-unused.sgml
+++ b/doc/reference/shell/tmpl/eshell-unused.sgml
@@ -406,6 +406,14 @@ EvolutionIntelligentImporter
 intelligent
 
 
+<!-- ##### ENUM ECursorType ##### -->
+<para>
+
+</para>
+
+ E_CURSOR_NORMAL: 
+ E_CURSOR_BUSY: 
+
 <!-- ##### STRUCT ESEvent ##### -->
 <para>
 
@@ -1850,6 +1858,14 @@ intelligent
 @revision: 
 @Returns: 
 
+<!-- ##### FUNCTION e_cursor_set ##### -->
+<para>
+
+</para>
+
+ widget: 
+ cursor: 
+
 <!-- ##### FUNCTION e_file_dialog_save ##### -->
 <para>
 
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index ecc3220..688c7e7 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -18,7 +18,6 @@ eutilinclude_HEADERS = 				\
 	e-categories-config.h			\
 	e-charset.h				\
 	e-config.h				\
-	e-cursor.h				\
 	e-datetime-format.h			\
 	e-dialog-utils.h			\
 	e-dialog-widgets.h			\
@@ -92,7 +91,6 @@ libeutil_la_SOURCES =				\
 	e-categories-config.c			\
 	e-charset.c				\
 	e-config.c				\
-	e-cursor.c				\
 	e-datetime-format.c			\
 	e-dialog-utils.c			\
 	e-dialog-widgets.c			\
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 34c146e..7b79d88 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -58,7 +58,6 @@
 #include <camel/camel-string-utils.h>
 #include <camel/camel-operation.h>
 
-#include <misc/e-cursors.h>
 #include <e-util/e-util.h>
 #include <e-util/e-util-private.h>
 
diff --git a/shell/main.c b/shell/main.c
index f5c757a..4918655 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -63,8 +63,6 @@
 #include "e-util/e-util-private.h"
 #include "e-util/e-util.h"
 
-#include "widgets/misc/e-cursors.h"
-
 #include <fcntl.h>
 #include <signal.h>
 #include <string.h>
@@ -574,7 +572,6 @@ main (gint argc, gchar **argv)
 	}
 
 	glade_init ();
-	e_cursors_init ();
 	e_icon_factory_init ();
 	e_passwords_init ();
 
@@ -628,7 +625,6 @@ main (gint argc, gchar **argv)
 	gtk_accel_map_save (e_get_accels_filename ());
 
 	e_icon_factory_shutdown ();
-	e_cursors_shutdown ();
 #ifdef G_OS_WIN32
 	link_shutdown ();
 #endif
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index f847021..e43494b 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -45,7 +45,6 @@ widgetsinclude_HEADERS =			\
 	e-charset-combo-box.h			\
 	e-colors.h				\
 	e-combo-cell-editable.h			\
-	e-cursors.h				\
 	e-dateedit.h				\
 	e-gui-utils.h				\
 	e-hinted-entry.h			\
@@ -121,7 +120,6 @@ libemiscwidgets_la_SOURCES =			\
 	e-charset-combo-box.c			\
 	e-colors.c				\
 	e-combo-cell-editable.c			\
-	e-cursors.c				\
 	e-dateedit.c				\
 	e-gui-utils.c				\
 	e-hinted-entry.c			\
@@ -227,8 +225,4 @@ EXTRA_DIST =			\
 	e-pilot-settings.c	\
 	ChangeLog.pre-1-4
 
-dist-hook:
-	-mkdir $(distdir)/pixmaps
-	cp $(srcdir)/pixmaps/*.xpm $(distdir)/pixmaps
-
 -include $(top_srcdir)/git.mk
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 684c920..2b601c4 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -38,7 +38,6 @@
 #include "e-util/e-util.h"
 #include "e-util/e-xml-utils.h"
 #include "misc/e-canvas.h"
-#include "misc/e-cursors.h"
 #include "misc/e-gui-utils.h"
 #include "misc/e-popup-menu.h"
 
@@ -121,6 +120,11 @@ ethi_dispose (GObject *object) {
 
 	scroll_off (ethi);
 
+	if (ethi->resize_cursor) {
+		gdk_cursor_unref (ethi->resize_cursor);
+		ethi->resize_cursor = NULL;
+	}
+
 	if (ethi->dnd_code) {
 		g_free (ethi->dnd_code);
 		ethi->dnd_code = NULL;
@@ -1081,10 +1085,9 @@ set_cursor (ETableHeaderItem *ethi, gint pos)
 	}
 
 	if (resizable)
-		e_cursor_set (canvas->window, E_CURSOR_SIZE_X);
+		gdk_window_set_cursor (canvas->window, ethi->resize_cursor);
 	else
 		gdk_window_set_cursor (canvas->window, NULL);
-	/*		e_cursor_set (canvas->window, E_CURSOR_ARROW);*/
 }
 
 static void
@@ -1695,7 +1698,6 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
 
 	case GDK_LEAVE_NOTIFY:
 		gdk_window_set_cursor (GTK_WIDGET (canvas)->window, NULL);
-		/*		e_cursor_set (GTK_WIDGET (canvas)->window, E_CURSOR_ARROW);*/
 		break;
 
 	case GDK_MOTION_NOTIFY:
@@ -1711,7 +1713,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
 				gnome_canvas_item_grab (item,
 							GDK_POINTER_MOTION_MASK |
 							GDK_BUTTON_RELEASE_MASK,
-							e_cursor_get (E_CURSOR_SIZE_X),
+							ethi->resize_cursor,
 							e->button.time);
 			}
 
@@ -1952,6 +1954,8 @@ ethi_init (ETableHeaderItem *ethi)
 {
 	GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ethi);
 
+	ethi->resize_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
+
 	ethi->resize_col = -1;
 
 	item->x1 = 0;
diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h
index db2aeb3..17e6e96 100644
--- a/widgets/table/e-table-header-item.h
+++ b/widgets/table/e-table-header-item.h
@@ -44,6 +44,7 @@ typedef struct {
 	ETableHeader    *eth;
 
 	GdkCursor       *change_cursor;
+	GdkCursor       *resize_cursor;
 
 	short            height, width;
 	PangoFontDescription *font_desc;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]