[maemo-commits] [maemo-commits] r13662 - projects/haf/trunk/hildon-input-method-framework/src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Sep 7 11:52:07 EEST 2007
- Previous message: [maemo-commits] r13661 - in projects/haf/trunk/hildon-input-method: . src
- Next message: [maemo-commits] r13663 - projects/haf/tags
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: tjunnone Date: 2007-09-07 11:52:06 +0300 (Fri, 07 Sep 2007) New Revision: 13662 Modified: projects/haf/trunk/hildon-input-method-framework/src/hildon-im-context.c Log: fix some typos and misleading comments Modified: projects/haf/trunk/hildon-input-method-framework/src/hildon-im-context.c =================================================================== --- projects/haf/trunk/hildon-input-method-framework/src/hildon-im-context.c 2007-09-07 08:31:44 UTC (rev 13661) +++ projects/haf/trunk/hildon-input-method-framework/src/hildon-im-context.c 2007-09-07 08:52:06 UTC (rev 13662) @@ -271,14 +271,14 @@ if (!GTK_WIDGET_TOPLEVEL (toplevel) || !GTK_IS_WINDOW(toplevel)) { - /* no parent toplevel */ + /* No parent toplevel */ return TRUE; } old_focus_widget = gtk_window_get_focus(GTK_WINDOW(toplevel)); if (old_focus_widget == focus_widget) { - /* already focused there */ + /* Already focused there */ return TRUE; } @@ -332,7 +332,7 @@ gtk_im_context_reset(context); } - /* remove text highlight (selection) unless focus is moved + /* Remove text highlight (selection) unless focus is moved inside a toolbar, scrollbar or combo */ allow_deselect = (!is_inside_toolbar && !is_combo_box_entry && @@ -384,7 +384,7 @@ widget = g_value_get_object(¶m_values[0]); - /* If the IM if opened for this widget, hide the IM */ + /* If the IM is opened for this widget, hide the IM */ if (GTK_WIDGET_HAS_FOCUS(widget)) { hildon_im_context_hide(NULL); @@ -398,14 +398,11 @@ { gint signal_id; - /*get convenience variables*/ GObjectClass *object_class = G_OBJECT_CLASS(im_context_class); GtkIMContextClass *gtk_im_context_class = GTK_IM_CONTEXT_CLASS(im_context_class); - /*set the global parent_class here*/ parent_class = g_type_class_peek_parent( im_context_class ); - /*now the object stuff*/ object_class->finalize = hildon_im_context_finalize; /* Virtual functions */ @@ -488,7 +485,7 @@ } else { - g_warning( "Unable to get the window id\n" ); + g_warning("Unable to get the window id\n"); } return result; @@ -641,7 +638,7 @@ gtk_text_iter_set_line_offset(&start, 0); gtk_text_iter_forward_to_line_end (&end); - /* include the previous non-whitespace character in the surrounding */ + /* Include the previous non-whitespace character in the surrounding */ if (gtk_text_iter_backward_char (&start)) gtk_text_iter_backward_find_char(&start, surroundings_search_predicate, NULL, NULL); @@ -674,7 +671,7 @@ g_return_val_if_fail(OSSO_IS_IM_CONTEXT(context), FALSE); self = HILDON_IM_CONTEXT(context); - /* override the textview surrounding handler */ + /* Override the textview surrounding handler */ if (GTK_IS_TEXT_VIEW(self->client_gtk_widget)) { result = hildon_im_context_get_textview_surrounding(context, @@ -1007,7 +1004,7 @@ static void hildon_im_context_widget_changed(HildonIMContext *self) { - /* count how many "changed" signals we get for + /* Count how many "changed" signals we get for hildon_im_context_insert_utf8() */ self->changed_count++; } @@ -1091,7 +1088,7 @@ } if (self->client_gdk_window != NULL) { - /*need to clean up old window unhook gdk_event_filter etc */ + /* Need to clean up old window unhook gdk_event_filter etc */ gdk_window_remove_filter(self->client_gdk_window, (GdkFilterFunc)client_message_filter, self ); @@ -1112,12 +1109,12 @@ if (window) { - /*filter the window for ClientMessages*/ + /* Filter the window for ClientMessages*/ gpointer widget; gdk_window_add_filter(window, (GdkFilterFunc)client_message_filter, self); - /* if the widget contents change, we want to know about it. */ + /* If the widget contents change, we want to know about it. */ gdk_window_get_user_data(window, &widget); if (widget != NULL) { @@ -1162,10 +1159,8 @@ } } - /* we can safely assume that once the client window is changed - * then it is time to clear preedit buffer in im context, merely - * depend on focus_in will cause problem when we only activate the - * inputmethod context menu, and back*/ + /* We can safely assume that once the client window is changed + * it is time to clear preedit buffer */ hildon_im_context_commit_preedit_data(self); } @@ -1710,7 +1705,7 @@ if (imc->last_internal_change) { - /* our own change */ + /* Our own change */ hildon_im_context_check_sentence_start(imc); imc->last_internal_change = FALSE; } @@ -1720,7 +1715,7 @@ If cursor x/y hasn't moved, we're in same position */ if (area->y != imc->prev_cursor_y || area->x != imc->prev_cursor_x) { - /* moved, clear IM. */ + /* Moved, clear IM. */ hildon_im_context_check_sentence_start(imc); hildon_im_context_reset_real(context); } @@ -1924,11 +1919,11 @@ g_signal_emit_by_name(self, "commit", ""); } - /* this last "commit" signal adds the actual text. we're assuming it sends + /* This last "commit" signal adds the actual text. We're assuming it sends 0 or 1 "changed" signals (we try to guarantee that by sending a "" commit above to delete highlights). - if we get more than one "changed" signal, it means that the + If we get more than one "changed" signal, it means that the application's "changed" signal handler went and changed the text as a result of the change, and we need to clear IM. */ self->changed_count = 0; @@ -1944,7 +1939,7 @@ in idle handler. */ if (self->last_internal_change && self->changed_count > 1) { - /* external change seen, clear IM in set_cursor_location() handler */ + /* External change seen, clear IM in set_cursor_location() handler */ self->last_internal_change = FALSE; self->prev_cursor_y = self->prev_cursor_x = -1; } @@ -2071,7 +2066,7 @@ } else { - g_warning( "Received the X error %d\n", xerror ); + g_warning("Received the X error %d\n", xerror); } } } @@ -2215,7 +2210,7 @@ { HildonIMContext *self = HILDON_IM_CONTEXT(context); - /* Workaround to avoid autocap on inactive window. */ + /* Avoid autocap on inactive window. */ if (self->has_focus) { hildon_im_context_check_sentence_start(HILDON_IM_CONTEXT(context));
- Previous message: [maemo-commits] r13661 - in projects/haf/trunk/hildon-input-method: . src
- Next message: [maemo-commits] r13663 - projects/haf/tags
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]