[uim-commit] r2654 - trunk/gtk
ekato at freedesktop.org
ekato at freedesktop.org
Mon Dec 19 00:10:50 PST 2005
Author: ekato
Date: 2005-12-19 00:10:32 -0800 (Mon, 19 Dec 2005)
New Revision: 2654
Modified:
trunk/gtk/caret-state-indicator.c
trunk/gtk/gtk-im-uim.c
Log:
* gtk/gtk-im-uim.c (im_uim_init) : Initialize
uic->carete_state_indicator.
* gtk/gtk/caret-state-indicator.c (caret_state_indicator_update) :
Add sanity check.
(caret_state_indicator_set_cursor_location) : Ditto.
(caret_state_indicator_set_timeout) : Ditto.
Modified: trunk/gtk/caret-state-indicator.c
===================================================================
--- trunk/gtk/caret-state-indicator.c 2005-12-19 07:40:16 UTC (rev 2653)
+++ trunk/gtk/caret-state-indicator.c 2005-12-19 08:10:32 UTC (rev 2654)
@@ -78,7 +78,7 @@
}
static gint
-caret_state_indicator_paint_window (GtkWidget *window)
+caret_state_indicator_paint_window(GtkWidget *window)
{
GtkRequisition req;
@@ -122,6 +122,8 @@
GtkWidget *label;
gint cursor_x, cursor_y;
+ g_return_if_fail(window != NULL);
+
label = g_object_get_data(G_OBJECT(window), "label");
cursor_x = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window), "cursor_x"));
cursor_y = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window), "cursor_y"));
@@ -140,6 +142,8 @@
void
caret_state_indicator_set_cursor_location(GtkWidget *window, GdkRectangle *cursor_location)
{
+ g_return_if_fail(window != NULL);
+
g_object_set_data(G_OBJECT(window), "cursor_x",
GINT_TO_POINTER(cursor_location->x));
g_object_set_data(G_OBJECT(window), "cursor_y",
@@ -153,6 +157,8 @@
gint current_time;
guint tag, oldtag;
+ g_return_if_fail(window != NULL);
+
oldtag = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(window), "timeout-tag"));
if (oldtag > 0)
Modified: trunk/gtk/gtk-im-uim.c
===================================================================
--- trunk/gtk/gtk-im-uim.c 2005-12-19 07:40:16 UTC (rev 2653)
+++ trunk/gtk/gtk-im-uim.c 2005-12-19 08:10:32 UTC (rev 2654)
@@ -620,6 +620,7 @@
{
uic->win = NULL;
uic->menu = NULL;
+ uic->caret_state_indicator = NULL;
uic->pseg = 0;
uic->nr_psegs = 0;
More information about the uim-commit
mailing list