diff options
Diffstat (limited to 'widgets/text')
-rw-r--r-- | widgets/text/e-text-model-repos.h | 4 | ||||
-rw-r--r-- | widgets/text/e-text-model.c | 1 | ||||
-rw-r--r-- | widgets/text/e-text-model.h | 2 | ||||
-rw-r--r-- | widgets/text/e-text.c | 18 | ||||
-rw-r--r-- | widgets/text/e-text.h | 3 |
5 files changed, 0 insertions, 28 deletions
diff --git a/widgets/text/e-text-model-repos.h b/widgets/text/e-text-model-repos.h index 6a185daa08..1c602a88b6 100644 --- a/widgets/text/e-text-model-repos.h +++ b/widgets/text/e-text-model-repos.h @@ -34,7 +34,6 @@ typedef struct { gint e_repos_shift (gint pos, gpointer data); - typedef struct { ETextModel *model; gint pos; /* Position to move to. Negative values count from the end buffer. @@ -43,7 +42,6 @@ typedef struct { gint e_repos_absolute (gint pos, gpointer data); - typedef struct { ETextModel *model; gint pos; /* Location of first inserted character. */ @@ -52,7 +50,6 @@ typedef struct { gint e_repos_insert_shift (gint pos, gpointer data); - typedef struct { ETextModel *model; gint pos; /* Location of first deleted character. */ @@ -61,7 +58,6 @@ typedef struct { gint e_repos_delete_shift (gint pos, gpointer data); - /* For e_repos_clamp, data is a pointer to an ETextModel. The only repositioning that occurs is to avoid buffer overruns. */ diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c index e1a0fca438..e4ab873d9d 100644 --- a/widgets/text/e-text-model.c +++ b/widgets/text/e-text-model.c @@ -398,7 +398,6 @@ e_text_model_insert_length (ETextModel *model, gint position, const gchar *text, g_return_if_fail (E_IS_TEXT_MODEL (model)); g_return_if_fail (length >= 0); - if (text == NULL || length == 0) return; diff --git a/widgets/text/e-text-model.h b/widgets/text/e-text-model.h index 0a9a738398..4b0a4475cb 100644 --- a/widgets/text/e-text-model.h +++ b/widgets/text/e-text-model.h @@ -82,7 +82,6 @@ void e_text_model_cancel_completion (ETextModel *model); void e_text_model_reposition (ETextModel *model, ETextModelReposFn fn, gpointer repos_data); gint e_text_model_validate_position (ETextModel *model, gint pos); - /* Functions for manipulating the underlying text. */ const gchar *e_text_model_get_text (ETextModel *model); @@ -94,7 +93,6 @@ void e_text_model_prepend (ETextModel *model, const gchar *text) void e_text_model_append (ETextModel *model, const gchar *text); void e_text_model_delete (ETextModel *model, gint position, gint length); - /* Functions for accessing embedded objects. */ gint e_text_model_object_count (ETextModel *model); diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 0b2f84cf8e..88235e0e60 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -1657,7 +1657,6 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, } } - if (text->clip) { gdk_gc_set_clip_rectangle (main_gc, NULL); } @@ -2030,8 +2029,6 @@ _do_tooltip (gpointer data) "justification", text->justification, NULL); - - if (text->draw_borders) e_canvas_item_move_absolute(tooltip_text, 1 + BORDER_INDENT, 1 + BORDER_INDENT); else @@ -2348,11 +2345,9 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) g_signal_emit (text, e_text_signals[E_TEXT_KEYPRESS], 0, e_tep_event.key.keyval, e_tep_event.key.state); - if (e_tep_event.key.string) g_free ((gpointer) e_tep_event.key.string); - return ret; } break; @@ -2565,7 +2560,6 @@ e_text_select_all (EText *text) e_text_command(text->tep, &command, text); } - static void primary_get_cb (GtkClipboard *clipboard, GtkSelectionData *selection_data, @@ -2857,8 +2851,6 @@ find_offset_into_line (EText *text, gint offset_into_text, gchar **start_of_line } } - - /* direction = TRUE (move forward), FALSE (move backward) Any error shall return length(text->text) or 0 or text->selection_end (as deemed fit) */ static gint @@ -2925,8 +2917,6 @@ _get_updated_position (EText *text, gboolean direction) return new_pos; } - - static gint _get_position(EText *text, ETextEventProcessorCommand *command) { @@ -3148,7 +3138,6 @@ _get_position(EText *text, ETextEventProcessorCommand *command) else text->selection_start = g_utf8_pointer_to_offset (text->text, p); - text->selection_start = e_text_model_validate_position (text->model, text->selection_start); length = g_utf8_strlen (text->text, -1); @@ -3486,7 +3475,6 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text)); } - /* Class initialization function for the text item */ static void e_text_class_init (ETextClass *klass) @@ -3590,7 +3578,6 @@ e_text_class_init (ETextClass *klass) GTK_TYPE_ANCHOR_TYPE, GTK_ANCHOR_CENTER, G_PARAM_READWRITE)); - g_object_class_install_property (gobject_class, PROP_JUSTIFICATION, g_param_spec_enum ("justification", _( "Justification" ), @@ -3654,7 +3641,6 @@ e_text_class_init (ETextClass *klass) GDK_TYPE_COLOR, G_PARAM_READWRITE)); - g_object_class_install_property (gobject_class, PROP_FILL_COLOR_RGBA, g_param_spec_uint ("fill_color_rgba", _( "GDK fill color" ), @@ -3683,7 +3669,6 @@ e_text_class_init (ETextClass *klass) 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE)); - g_object_class_install_property (gobject_class, PROP_EDITABLE, g_param_spec_boolean ("editable", _( "Editable" ), @@ -3733,7 +3718,6 @@ e_text_class_init (ETextClass *klass) 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); - g_object_class_install_property (gobject_class, PROP_HEIGHT, g_param_spec_double ("height", _( "Height" ), @@ -3887,11 +3871,9 @@ e_text_init (EText *text) text->handle_popup = FALSE; - e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(text), e_text_reflow); } - /* IM Context Callbacks */ static void e_text_commit_cb (GtkIMContext *context, diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h index 5f6904b14a..057ff507a7 100644 --- a/widgets/text/e-text.h +++ b/widgets/text/e-text.h @@ -46,7 +46,6 @@ G_BEGIN_DECLS - /* Text item for the canvas. Text items are positioned by an anchor point and an anchor direction. * * A clipping rectangle may be specified for the text. The rectangle is anchored at the text's anchor @@ -97,7 +96,6 @@ G_BEGIN_DECLS #define E_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TEXT)) #define E_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_TEXT)) - typedef struct _EText EText; typedef struct _ETextClass ETextClass; @@ -231,7 +229,6 @@ struct _ETextClass { void (* style_set) (EText *text, GtkStyle *previous_style); }; - /* Standard Gtk function */ GType e_text_get_type (void); void e_text_cancel_editing (EText *text); |