diff --git a/moo.kdevelop b/moo.kdevelop index a23d947e..a05288db 100644 --- a/moo.kdevelop +++ b/moo.kdevelop @@ -234,16 +234,16 @@ - + A new empty GAP source file - + A new empty C++ file. - + A new empty header file for C/C++. - + A new empty C file. diff --git a/moo/mooedit/moobigpaned.c b/moo/mooedit/moobigpaned.c index 9d61298c..e66a6d41 100644 --- a/moo/mooedit/moobigpaned.c +++ b/moo/mooedit/moobigpaned.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moobigpaned.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moobigpaned.h b/moo/mooedit/moobigpaned.h index ffc3d3ec..c827202a 100644 --- a/moo/mooedit/moobigpaned.h +++ b/moo/mooedit/moobigpaned.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moobigpaned.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooedit-private.h b/moo/mooedit/mooedit-private.h index 6689cba0..d3c55bcc 100644 --- a/moo/mooedit/mooedit-private.h +++ b/moo/mooedit/mooedit-private.h @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooedit-private.h * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -157,7 +157,7 @@ struct _MooTextViewPrivate { GdkColor current_line_color; GdkGC *current_line_gc; gboolean show_tabs; - + /***********************************************************************/ /* Search /*/ diff --git a/moo/mooedit/mooedit.c b/moo/mooedit/mooedit.c index 5d5c51ba..3aaeb723 100644 --- a/moo/mooedit/mooedit.c +++ b/moo/mooedit/mooedit.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooedit.c * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -71,7 +71,7 @@ enum { G_DEFINE_TYPE (MooEdit, moo_edit, MOO_TYPE_TEXT_VIEW) -static void +static void moo_edit_class_init (MooEditClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); @@ -126,7 +126,7 @@ moo_edit_class_init (MooEditClass *klass) } -static void +static void moo_edit_init (MooEdit *edit) { edit->priv = _moo_edit_private_new (); @@ -169,7 +169,7 @@ moo_edit_constructor (GType type, } -static void +static void moo_edit_finalize (GObject *object) { MooEdit *edit = MOO_EDIT (object); @@ -204,7 +204,7 @@ _moo_edit_new (MooEditor *editor) } -static void +static void modified_changed_cb (GtkTextBuffer *buffer, MooEdit *edit) { @@ -212,7 +212,7 @@ modified_changed_cb (GtkTextBuffer *buffer, } -void +void moo_edit_set_modified (MooEdit *edit, gboolean modified) { @@ -244,7 +244,7 @@ moo_edit_set_modified (MooEdit *edit, } -void +void moo_edit_set_clean (MooEdit *edit, gboolean clean) { @@ -257,7 +257,7 @@ moo_edit_set_clean (MooEdit *edit, } -void +void moo_edit_status_changed (MooEdit *edit) { g_return_if_fail (MOO_IS_EDIT (edit)); @@ -312,7 +312,7 @@ moo_edit_file_info_copy (const MooEditFileInfo *info) return copy; } -void +void moo_edit_file_info_free (MooEditFileInfo *info) { if (info) @@ -324,7 +324,7 @@ moo_edit_file_info_free (MooEditFileInfo *info) } -void +void moo_edit_set_lang (MooEdit *edit, MooEditLang *lang) { @@ -351,7 +351,7 @@ moo_edit_set_lang (MooEdit *edit, } -void +void moo_edit_set_highlight (MooEdit *edit, gboolean highlight) { @@ -361,7 +361,7 @@ moo_edit_set_highlight (MooEdit *edit, } -gboolean +gboolean moo_edit_get_readonly (MooEdit *edit) { g_return_val_if_fail (MOO_IS_EDIT (edit), TRUE); @@ -369,7 +369,7 @@ moo_edit_get_readonly (MooEdit *edit) } -void +void moo_edit_set_readonly (MooEdit *edit, gboolean readonly) { @@ -380,7 +380,7 @@ moo_edit_set_readonly (MooEdit *edit, } -gboolean +gboolean moo_edit_is_empty (MooEdit *edit) { GtkTextIter start, end; @@ -396,7 +396,7 @@ moo_edit_is_empty (MooEdit *edit) } -MooEditStatus +MooEditStatus moo_edit_get_status (MooEdit *edit) { g_return_val_if_fail (MOO_IS_EDIT (edit), 0); @@ -416,7 +416,7 @@ _moo_edit_get_lang_mgr (MooEdit *edit) } -static void +static void moo_edit_set_property (GObject *object, guint prop_id, const GValue *value, @@ -437,7 +437,7 @@ moo_edit_set_property (GObject *object, } -static void +static void moo_edit_get_property (GObject *object, guint prop_id, GValue *value, @@ -466,7 +466,7 @@ moo_edit_get_lang (MooEdit *edit) } -GType +GType moo_edit_doc_status_get_type (void) { static GType type = 0; @@ -488,7 +488,7 @@ moo_edit_doc_status_get_type (void) } -GType +GType moo_edit_on_external_changes_get_type (void) { static GType type = 0; @@ -509,7 +509,7 @@ moo_edit_on_external_changes_get_type (void) } -GType +GType moo_edit_file_info_get_type (void) { static GType type = 0; @@ -649,7 +649,7 @@ out: } -void +void _moo_edit_choose_indenter (MooEdit *edit) { MooIndenter *indenter; diff --git a/moo/mooedit/mooedit.h b/moo/mooedit/mooedit.h index bd4e9f45..f0214523 100644 --- a/moo/mooedit/mooedit.h +++ b/moo/mooedit/mooedit.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooedit.h * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -126,4 +127,3 @@ void moo_edit_set_lang (MooEdit *edit, G_END_DECLS #endif /* __MOO_EDIT_H__ */ -/* kate: space-indent on; indent-width 4; replace-tabs on; */ diff --git a/moo/mooedit/mooeditcursor.c b/moo/mooedit/mooeditcursor.c index 63e8f841..e5a12333 100644 --- a/moo/mooedit/mooeditcursor.c +++ b/moo/mooedit/mooeditcursor.c @@ -1,5 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * + * mooeditcursor.c * * Copyright (C) 2004-2005 by Yevgen Muntyan * @@ -28,7 +29,7 @@ parent_class (void) } -inline static gboolean +inline static gboolean is_word_char (const GtkTextIter *iter) { gunichar c = gtk_text_iter_get_char (iter); @@ -40,7 +41,7 @@ is_word_char (const GtkTextIter *iter) * to use Pango or equivalent to get word breaking right, the algorithm * is fairly complex.)" */ -inline static gboolean +inline static gboolean is_space (const GtkTextIter *iter) { gunichar c = gtk_text_iter_get_char (iter); @@ -48,7 +49,7 @@ is_space (const GtkTextIter *iter) return g_unichar_isspace (c); } -inline static gboolean +inline static gboolean is_word_start (const GtkTextIter *iter) { GtkTextIter i; @@ -59,7 +60,7 @@ is_word_start (const GtkTextIter *iter) } -static gboolean +static gboolean text_iter_forward_word_start (GtkTextIter *iter) { gboolean moved = FALSE; @@ -103,7 +104,7 @@ text_iter_forward_word_start (GtkTextIter *iter) return moved && !gtk_text_iter_is_end (iter); } -inline static gboolean +inline static gboolean text_iter_forward_word_start_n (GtkTextIter *iter, guint count) { if (!count) return FALSE; @@ -119,7 +120,7 @@ text_iter_forward_word_start_n (GtkTextIter *iter, guint count) } -inline static gboolean +inline static gboolean text_iter_backward_word_start (GtkTextIter *iter) { gboolean moved = FALSE; @@ -138,7 +139,7 @@ text_iter_backward_word_start (GtkTextIter *iter) return moved; } -inline static gboolean +inline static gboolean text_iter_backward_word_start_n (GtkTextIter *iter, guint count) { gboolean moved = FALSE; @@ -151,7 +152,7 @@ text_iter_backward_word_start_n (GtkTextIter *iter, guint count) /* TODO: may I do this? */ -inline static void +inline static void text_view_reset_im_context (GtkTextView *text_view) { if (text_view->need_im_reset) @@ -162,7 +163,7 @@ text_view_reset_im_context (GtkTextView *text_view) } -void +void _moo_text_view_move_cursor (GtkTextView *text_view, GtkMovementStep step, gint count, @@ -209,7 +210,7 @@ _moo_text_view_move_cursor (GtkTextView *text_view, } -void +void _moo_text_view_delete_from_cursor (GtkTextView *text_view, GtkDeleteType type, gint count) @@ -249,7 +250,7 @@ _moo_text_view_delete_from_cursor (GtkTextView *text_view, /* Mouse */ -inline static gboolean +inline static gboolean extend_selection (MooTextView *view, MooTextSelectionType type, GtkTextIter *insert, @@ -258,7 +259,7 @@ extend_selection (MooTextView *view, return MOO_TEXT_VIEW_GET_CLASS(view)->extend_selection (view, type, insert, selection_bound); } -inline static void +inline static void clear_drag_stuff (MooTextView *view) { view->priv->drag_moved = FALSE; @@ -272,7 +273,7 @@ clear_drag_stuff (MooTextView *view) GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view))) /* from gtktextview.c */ -inline static void +inline static void text_view_unobscure_mouse_cursor (GtkTextView *text_view) { if (text_view->mouse_cursor_obscured) @@ -296,7 +297,7 @@ static void text_view_start_selection_dnd (GtkTextView *text_view, static const int SCROLL_TIMEOUT = 100; -int +int _moo_text_view_button_press_event (GtkWidget *widget, GdkEventButton *event) { @@ -396,7 +397,7 @@ _moo_text_view_button_press_event (GtkWidget *widget, } -int +int _moo_text_view_button_release_event (GtkWidget *widget, G_GNUC_UNUSED GdkEventButton *event) { @@ -443,7 +444,7 @@ _moo_text_view_button_release_event (GtkWidget *widget, (x) >= (rect).x + (rect).width || \ (y) >= (rect).y + (rect).height) -int +int _moo_text_view_motion_event (GtkWidget *widget, GdkEventMotion *event) { @@ -537,7 +538,7 @@ static const GtkTargetEntry gtk_text_view_target_table[] = { { (char*)"GTK_TEXT_BUFFER_CONTENTS", GTK_TARGET_SAME_APP, 0 } }; -static void +static void text_view_start_selection_dnd (GtkTextView *text_view, G_GNUC_UNUSED const GtkTextIter *iter, GdkEventMotion *event) @@ -563,7 +564,7 @@ text_view_start_selection_dnd (GtkTextView *text_view, } -inline static int +inline static int char_class (const GtkTextIter *iter) { if (gtk_text_iter_ends_line (iter)) return -1; @@ -572,23 +573,23 @@ char_class (const GtkTextIter *iter) else return 2; } -int +int _moo_text_view_extend_selection (MooTextView *view, MooTextSelectionType type, GtkTextIter *start, GtkTextIter *end) { int order = gtk_text_iter_compare (start, end); - - if (type == MOO_TEXT_SELECT_CHARS) + + if (type == MOO_TEXT_SELECT_CHARS) { return order; } - else if (type == MOO_TEXT_SELECT_WORDS) + else if (type == MOO_TEXT_SELECT_WORDS) { int ch_class; - if (!order && view->priv->double_click_selects_brackets) + if (!order && view->priv->double_click_selects_brackets) { GtkTextIter rstart = *start; if (moo_text_iter_at_bracket (&rstart) && @@ -597,14 +598,14 @@ _moo_text_view_extend_selection (MooTextView *view, GtkTextIter rend = rstart; if (moo_text_iter_find_matching_bracket (&rend) == MOO_BRACKET_MATCH_CORRECT) { - if (gtk_text_iter_compare (&rstart, &rend) > 0) + if (gtk_text_iter_compare (&rstart, &rend) > 0) { /* ( ) */ if (view->priv->double_click_selects_inside) gtk_text_iter_forward_char (&rend); else gtk_text_iter_forward_char (&rstart); } - else + else { /* ( ) */ if (view->priv->double_click_selects_inside) gtk_text_iter_forward_char (&rstart); @@ -618,36 +619,36 @@ _moo_text_view_extend_selection (MooTextView *view, } } - if (order > 0) + if (order > 0) { GtkTextIter *tmp = start; start = end; end = tmp; } - + ch_class = char_class (end); - + while (!gtk_text_iter_ends_line (end) && char_class (end) == ch_class) { gtk_text_iter_forward_char (end); } - + ch_class = char_class (start); - + while (!gtk_text_iter_starts_line (start) && char_class (start) == ch_class) { gtk_text_iter_backward_char (start); } - + if (char_class (start) != ch_class) gtk_text_iter_forward_char (start); - + return gtk_text_iter_compare (start, end); } - else if (type == MOO_TEXT_SELECT_LINES) + else if (type == MOO_TEXT_SELECT_LINES) { - if (order > 0) + if (order > 0) { GtkTextIter *tmp = start; start = end; end = tmp; @@ -661,7 +662,7 @@ _moo_text_view_extend_selection (MooTextView *view, } -static void +static void start_drag_scroll (MooTextView *view) { if (!view->priv->drag_scroll_timeout) @@ -673,7 +674,7 @@ start_drag_scroll (MooTextView *view) } -static void +static void stop_drag_scroll (MooTextView *view) { if (view->priv->drag_scroll_timeout) @@ -682,7 +683,7 @@ stop_drag_scroll (MooTextView *view) } -static gboolean +static gboolean drag_scroll_timeout_func (MooTextView *view) { GtkTextView *text_view; @@ -708,11 +709,11 @@ drag_scroll_timeout_func (MooTextView *view) view->priv->drag_start_x, view->priv->drag_start_y); - if (view->priv->drag_button == GDK_BUTTON_PRESS) + if (view->priv->drag_button == GDK_BUTTON_PRESS) t = MOO_TEXT_SELECT_CHARS; - else if (view->priv->drag_button == GDK_2BUTTON_PRESS) + else if (view->priv->drag_button == GDK_2BUTTON_PRESS) t = MOO_TEXT_SELECT_WORDS; - else + else t = MOO_TEXT_SELECT_LINES; if (extend_selection (view, t, &start, &iter)) diff --git a/moo/mooedit/mooeditdialogs.c b/moo/mooedit/mooeditdialogs.c index 7fa9c748..d75eadb4 100644 --- a/moo/mooedit/mooeditdialogs.c +++ b/moo/mooedit/mooeditdialogs.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditdialogs.c * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -572,7 +572,7 @@ moo_edit_file_modified_on_disk_dialog (MooEdit *edit) GtkWidget *_moo_edit_create_prompt_on_replace_dialog (void); /* in mooeditfind-glade.c */ -void +void moo_text_nothing_found_dialog (MooTextView *view, const char *text, gboolean regex) @@ -603,7 +603,7 @@ moo_text_nothing_found_dialog (MooTextView *view, } -gboolean +gboolean moo_text_search_from_beginning_dialog (MooTextView *view, gboolean backwards) { @@ -644,7 +644,7 @@ moo_text_search_from_beginning_dialog (MooTextView *view, } -void +void moo_text_regex_error_dialog (MooTextView *view, GError *err) { @@ -683,7 +683,7 @@ moo_text_regex_error_dialog (MooTextView *view, } -void +void moo_text_replaced_n_dialog (MooTextView *view, guint n) { diff --git a/moo/mooedit/mooeditdialogs.h b/moo/mooedit/mooeditdialogs.h index b862b630..d3e7701c 100644 --- a/moo/mooedit/mooeditdialogs.h +++ b/moo/mooedit/mooeditdialogs.h @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditdialogs.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditfileops.c b/moo/mooedit/mooeditfileops.c index 9470ef90..91c5cd0f 100644 --- a/moo/mooedit/mooeditfileops.c +++ b/moo/mooedit/mooeditfileops.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditfileops.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditfileops.h b/moo/mooedit/mooeditfileops.h index 2c2cd4cb..0e72fd45 100644 --- a/moo/mooedit/mooeditfileops.h +++ b/moo/mooedit/mooeditfileops.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditfileops.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditfind.c b/moo/mooedit/mooeditfind.c index 1b877261..df92888d 100644 --- a/moo/mooedit/mooeditfind.c +++ b/moo/mooedit/mooeditfind.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditfind.c * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -54,7 +54,7 @@ static gboolean update_scale_value (GtkSpinButton *spin, } -void +void moo_text_view_goto_line (MooTextView *view, int line) { @@ -160,7 +160,7 @@ static MooTextReplaceResponseType prompt_on_replace_func gpointer data); -void +void _moo_text_view_find (MooTextView *view) { GtkWidget *dialog; @@ -227,11 +227,11 @@ _moo_text_view_find (MooTextView *view) options = 0; - if (regex) + if (regex) options |= MOO_TEXT_SEARCH_REGEX; - if (backwards) + if (backwards) options |= MOO_TEXT_SEARCH_BACKWARDS; - if (!case_sensitive) + if (!case_sensitive) options |= MOO_TEXT_SEARCH_CASE_INSENSITIVE; insert = gtk_text_buffer_get_insert (buffer); @@ -324,7 +324,7 @@ _moo_text_view_find (MooTextView *view) } -void +void _moo_text_view_find_next (MooTextView *view) { gboolean regex, case_sensitive, whole_words, backwards; @@ -425,7 +425,7 @@ _moo_text_view_find_next (MooTextView *view) } -void +void _moo_text_view_find_previous (MooTextView *view) { gboolean regex, case_sensitive, whole_words, backwards; @@ -527,7 +527,7 @@ _moo_text_view_find_previous (MooTextView *view) } -void +void _moo_text_view_replace (MooTextView *view) { GtkWidget *dialog; diff --git a/moo/mooedit/mooeditkeys.c b/moo/mooedit/mooeditkeys.c index b4550388..57aee71a 100644 --- a/moo/mooedit/mooeditkeys.c +++ b/moo/mooedit/mooeditkeys.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditkeys.c * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -51,7 +51,7 @@ static gboolean handle_ctrl_pgup (MooTextView *view, gboolean up); -int +int _moo_text_view_key_press_event (GtkWidget *widget, GdkEventKey *event) { @@ -140,7 +140,7 @@ _moo_text_view_key_press_event (GtkWidget *widget, } -static void +static void text_view_obscure_mouse_cursor (GtkTextView *text_view) { if (!text_view->mouse_cursor_obscured) @@ -154,7 +154,7 @@ text_view_obscure_mouse_cursor (GtkTextView *text_view) } -static void +static void set_invisible_cursor (GdkWindow *window) { GdkBitmap *empty_bitmap; @@ -182,7 +182,7 @@ set_invisible_cursor (GdkWindow *window) } -static gboolean +static gboolean handle_tab (MooTextView *view, G_GNUC_UNUSED GdkEventKey *event) { @@ -243,7 +243,7 @@ handle_tab (MooTextView *view, } -static gboolean +static gboolean handle_shift_tab (MooTextView *view, G_GNUC_UNUSED GdkEventKey *event) { @@ -270,7 +270,7 @@ handle_shift_tab (MooTextView *view, } -static gboolean +static gboolean handle_backspace (MooTextView *view, G_GNUC_UNUSED GdkEventKey *event) { @@ -299,7 +299,7 @@ handle_backspace (MooTextView *view, } -static gboolean +static gboolean handle_enter (MooTextView *view, G_GNUC_UNUSED GdkEventKey *event) { @@ -332,7 +332,7 @@ handle_enter (MooTextView *view, } -static gboolean +static gboolean handle_ctrl_up (MooTextView *view, G_GNUC_UNUSED GdkEventKey *event, gboolean up) @@ -369,7 +369,7 @@ handle_ctrl_up (MooTextView *view, } -static gboolean +static gboolean handle_ctrl_pgup (MooTextView *view, G_GNUC_UNUSED GdkEventKey *event, gboolean up) diff --git a/moo/mooedit/mooeditlang-private.h b/moo/mooedit/mooeditlang-private.h index c841637a..fd51d1b9 100644 --- a/moo/mooedit/mooeditlang-private.h +++ b/moo/mooedit/mooeditlang-private.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditlang-private.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditlang-xml.c b/moo/mooedit/mooeditlang-xml.c index 1dc9e32c..aa1809ea 100644 --- a/moo/mooedit/mooeditlang-xml.c +++ b/moo/mooedit/mooeditlang-xml.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditlang-xml.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditlang.c b/moo/mooedit/mooeditlang.c index 24ff76ff..4856f405 100644 --- a/moo/mooedit/mooeditlang.c +++ b/moo/mooedit/mooeditlang.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditlang.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditlang.h b/moo/mooedit/mooeditlang.h index 2200ce62..3c301c90 100644 --- a/moo/mooedit/mooeditlang.h +++ b/moo/mooedit/mooeditlang.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditlang.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditlangmgr.c b/moo/mooedit/mooeditlangmgr.c index 335c5f35..fee5afaf 100644 --- a/moo/mooedit/mooeditlangmgr.c +++ b/moo/mooedit/mooeditlangmgr.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditlangmgr.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditlangmgr.h b/moo/mooedit/mooeditlangmgr.h index c313027e..f16b6117 100644 --- a/moo/mooedit/mooeditlangmgr.h +++ b/moo/mooedit/mooeditlangmgr.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditlangmgr.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditor.c b/moo/mooedit/mooeditor.c index 2126bcc9..6f274f11 100644 --- a/moo/mooedit/mooeditor.c +++ b/moo/mooedit/mooeditor.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditor.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditor.h b/moo/mooedit/mooeditor.h index 9e74215e..73aa50da 100644 --- a/moo/mooedit/mooeditor.h +++ b/moo/mooedit/mooeditor.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditor.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditprefs.c b/moo/mooedit/mooeditprefs.c index 1f43a175..d7eb915a 100644 --- a/moo/mooedit/mooeditprefs.c +++ b/moo/mooedit/mooeditprefs.c @@ -1,5 +1,4 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; * * Copyright (C) 2004-2005 by Yevgen Muntyan * @@ -146,7 +145,7 @@ void _moo_edit_apply_settings (MooEdit *edit) gtk_source_view_set_show_line_numbers (view, get_bool (MOO_EDIT_PREFS_SHOW_LINE_NUMBERS)); gtk_source_view_set_show_margin (view, get_bool (MOO_EDIT_PREFS_SHOW_MARGIN)); gtk_source_view_set_margin (view, get_int (MOO_EDIT_PREFS_MARGIN)); - moo_text_buffer_set_check_brackets (MOO_TEXT_BUFFER (buffer), + moo_text_buffer_set_check_brackets (MOO_TEXT_BUFFER (buffer), get_bool (MOO_EDIT_PREFS_CHECK_BRACKETS)); set_matching_bracket_styles (edit); set_highlight_current_line (edit); @@ -228,21 +227,21 @@ static void set_matching_bracket_styles (MooEdit *edit) style.underline = get_bool (MOO_EDIT_MATCHING_BRACKETS_CORRECT "/" MOO_EDIT_PREFS_UNDERLINE); style.strikethrough = get_bool (MOO_EDIT_MATCHING_BRACKETS_CORRECT "/" MOO_EDIT_PREFS_STRIKETHROUGH); color = get_color (MOO_EDIT_MATCHING_BRACKETS_CORRECT "/" MOO_EDIT_PREFS_BACKGROUND); - - if (color) + + if (color) { style.background = *color; style.mask |= GTK_SOURCE_TAG_STYLE_USE_BACKGROUND; } - + color = get_color (MOO_EDIT_MATCHING_BRACKETS_CORRECT "/" MOO_EDIT_PREFS_FOREGROUND); - + if (color) { style.foreground = *color; style.mask |= GTK_SOURCE_TAG_STYLE_USE_FOREGROUND; } - + moo_text_buffer_set_bracket_match_style (MOO_TEXT_BUFFER (buffer), &style); // style.mask = 0; @@ -251,21 +250,21 @@ static void set_matching_bracket_styles (MooEdit *edit) // style.underline = get_bool (MOO_EDIT_MATCHING_BRACKETS_INCORRECT "/" MOO_EDIT_PREFS_UNDERLINE); // style.strikethrough = get_bool (MOO_EDIT_MATCHING_BRACKETS_INCORRECT "/" MOO_EDIT_PREFS_STRIKETHROUGH); // color = get_color (MOO_EDIT_MATCHING_BRACKETS_INCORRECT "/" MOO_EDIT_PREFS_BACKGROUND); -// -// if (color) +// +// if (color) // { // style.background = *color; // style.mask |= GTK_SOURCE_TAG_STYLE_USE_BACKGROUND; // } -// +// // color = get_color (MOO_EDIT_MATCHING_BRACKETS_INCORRECT "/" MOO_EDIT_PREFS_FOREGROUND); -// -// if (color) +// +// if (color) // { // style.foreground = *color; // style.mask |= GTK_SOURCE_TAG_STYLE_USE_FOREGROUND; // } -// +// // moo_text_buffer_set_bracket_match_style (MOO_TEXT_BUFFER (buffer), &style); } @@ -275,7 +274,7 @@ static void set_font (MooEdit *edit) if (get_bool (MOO_EDIT_PREFS_USE_DEFAULT_FONT)) moo_text_view_set_font_from_string (MOO_TEXT_VIEW (edit), NULL); else - moo_text_view_set_font_from_string (MOO_TEXT_VIEW (edit), + moo_text_view_set_font_from_string (MOO_TEXT_VIEW (edit), get_string (MOO_EDIT_PREFS_FONT)); } diff --git a/moo/mooedit/mooeditprefs.h b/moo/mooedit/mooeditprefs.h index 71523bd8..31344595 100644 --- a/moo/mooedit/mooeditprefs.h +++ b/moo/mooedit/mooeditprefs.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditprefs.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditprefspage.c b/moo/mooedit/mooeditprefspage.c index 40d82e5f..0e581432 100644 --- a/moo/mooedit/mooeditprefspage.c +++ b/moo/mooedit/mooeditprefspage.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditprefspage.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditsearch.c b/moo/mooedit/mooeditsearch.c index 4db0ad01..2173c61b 100644 --- a/moo/mooedit/mooeditsearch.c +++ b/moo/mooedit/mooeditsearch.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditsearch.c * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -19,7 +19,7 @@ #include -GType +GType moo_text_search_options_get_type (void) { static GType type = 0; @@ -39,7 +39,7 @@ moo_text_search_options_get_type (void) return type; } -GType +GType moo_text_replace_response_type_get_type (void) { static GType type = 0; diff --git a/moo/mooedit/mooeditsearch.h b/moo/mooedit/mooeditsearch.h index c4d5081f..1708b7d4 100644 --- a/moo/mooedit/mooeditsearch.h +++ b/moo/mooedit/mooeditsearch.h @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditsearch.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditwindow.c b/moo/mooedit/mooeditwindow.c index fd2508f4..3a7767c8 100644 --- a/moo/mooedit/mooeditwindow.c +++ b/moo/mooedit/mooeditwindow.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * mooeditwindow.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooeditwindow.h b/moo/mooedit/mooeditwindow.h index 9d03d329..cc6301b6 100644 --- a/moo/mooedit/mooeditwindow.h +++ b/moo/mooedit/mooeditwindow.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditwindow.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooindenter.c b/moo/mooedit/mooindenter.c index 2a68113b..94786e36 100644 --- a/moo/mooedit/mooindenter.c +++ b/moo/mooedit/mooindenter.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooedit.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooindenter.h b/moo/mooedit/mooindenter.h index 224ee488..c1507d19 100644 --- a/moo/mooedit/mooindenter.h +++ b/moo/mooedit/mooindenter.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooindenter.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moonotebook.c b/moo/mooedit/moonotebook.c index db6e8d26..4af1bce1 100644 --- a/moo/mooedit/moonotebook.c +++ b/moo/mooedit/moonotebook.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moonotebook.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moonotebook.h b/moo/mooedit/moonotebook.h index 19a87b4f..d6c8630b 100644 --- a/moo/mooedit/moonotebook.h +++ b/moo/mooedit/moonotebook.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moonotebook.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moopaned.c b/moo/mooedit/moopaned.c index 7d12b318..cf74439a 100644 --- a/moo/mooedit/moopaned.c +++ b/moo/mooedit/moopaned.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moopaned.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moopaned.h b/moo/mooedit/moopaned.h index fbec28be..6b212a70 100644 --- a/moo/mooedit/moopaned.h +++ b/moo/mooedit/moopaned.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moopaned.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moopaneview.c b/moo/mooedit/moopaneview.c index 586965bd..87e0f22c 100644 --- a/moo/mooedit/moopaneview.c +++ b/moo/mooedit/moopaneview.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * moopaneview.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moopaneview.h b/moo/mooedit/moopaneview.h index 2fb15eca..16ec6442 100644 --- a/moo/mooedit/moopaneview.h +++ b/moo/mooedit/moopaneview.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moopaneview.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooplugin.c b/moo/mooedit/mooplugin.c index 35c67871..8246555a 100644 --- a/moo/mooedit/mooplugin.c +++ b/moo/mooedit/mooplugin.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooeditplugin.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mooplugin.h b/moo/mooedit/mooplugin.h index ca5a6caf..2441a56b 100644 --- a/moo/mooedit/mooplugin.h +++ b/moo/mooedit/mooplugin.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooplugin.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moorecentmgr.c b/moo/mooedit/moorecentmgr.c index 91a888b0..47a524c2 100644 --- a/moo/mooedit/moorecentmgr.c +++ b/moo/mooedit/moorecentmgr.c @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moorecentmgr.c * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/moorecentmgr.h b/moo/mooedit/moorecentmgr.h index 0825dda2..2f70fdd4 100644 --- a/moo/mooedit/moorecentmgr.h +++ b/moo/mooedit/moorecentmgr.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * moorecentmgr.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mootextbuffer.c b/moo/mooedit/mootextbuffer.c index 84659427..b7e827ea 100644 --- a/moo/mooedit/mootextbuffer.c +++ b/moo/mooedit/mootextbuffer.c @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; - * + * * mootextbuffer.c * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -24,7 +23,7 @@ struct _MooTextBufferPrivate { gboolean has_selection; gboolean has_text; - + gboolean check_brackets; guint num_brackets; gunichar *left_brackets, *right_brackets; @@ -47,7 +46,7 @@ static void moo_text_buffer_get_property (GObject *object, GParamSpec *pspec); static void moo_text_buffer_cursor_moved (MooTextBuffer *buffer, - const GtkTextIter *iter); + const GtkTextIter *iter); static void moo_text_buffer_mark_set (GtkTextBuffer *buffer, const GtkTextIter *iter, GtkTextMark *mark); @@ -81,7 +80,7 @@ enum { G_DEFINE_TYPE (MooTextBuffer, moo_text_buffer, GTK_TYPE_SOURCE_BUFFER) -static void +static void moo_text_buffer_class_init (MooTextBufferClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); @@ -94,9 +93,9 @@ moo_text_buffer_class_init (MooTextBufferClass *klass) buffer_class->mark_set = moo_text_buffer_mark_set; buffer_class->insert_text = moo_text_buffer_insert_text; buffer_class->delete_range = moo_text_buffer_delete_range; - + klass->cursor_moved = moo_text_buffer_cursor_moved; - + g_object_class_install_property (gobject_class, PROP_CHECK_BRACKETS, g_param_spec_boolean ("check-brackets", @@ -141,7 +140,7 @@ moo_text_buffer_class_init (MooTextBufferClass *klass) } -static void +static void moo_text_buffer_init (MooTextBuffer *buffer) { buffer->priv = g_new0 (MooTextBufferPrivate, 1); @@ -152,14 +151,14 @@ moo_text_buffer_init (MooTextBuffer *buffer) } -static void +static void moo_text_buffer_finalize (GObject *object) { MooTextBuffer *buffer = MOO_TEXT_BUFFER (object); if (buffer->priv->lang) g_object_unref (buffer->priv->lang); - + g_free (buffer->priv); buffer->priv = NULL; @@ -167,7 +166,7 @@ moo_text_buffer_finalize (GObject *object) } -void +void moo_text_buffer_set_lang (MooTextBuffer *buffer, MooEditLang *lang) { @@ -214,7 +213,7 @@ moo_text_buffer_set_lang (MooTextBuffer *buffer, } -static gboolean +static gboolean find (gunichar *vec, guint size, gunichar c) { guint i; @@ -226,7 +225,7 @@ find (gunichar *vec, guint size, gunichar c) return FALSE; } -gboolean +gboolean moo_text_iter_at_bracket (GtkTextIter *iter) { gunichar c; @@ -235,7 +234,7 @@ moo_text_iter_at_bracket (GtkTextIter *iter) buffer = MOO_TEXT_BUFFER (gtk_text_iter_get_buffer (iter)); g_return_val_if_fail (MOO_IS_TEXT_BUFFER (buffer), FALSE); - + c = gtk_text_iter_get_char (iter); if (find (buffer->priv->left_brackets, buffer->priv->num_brackets, c) || @@ -243,7 +242,7 @@ moo_text_iter_at_bracket (GtkTextIter *iter) { return TRUE; } - + b = *iter; if (!gtk_text_iter_starts_line (&b) && gtk_text_iter_backward_char (&b)) @@ -257,12 +256,12 @@ moo_text_iter_at_bracket (GtkTextIter *iter) return TRUE; } } - + return FALSE; } -MooBracketMatchType +MooBracketMatchType moo_text_iter_find_matching_bracket (GtkTextIter *iter) { int addition = 0; @@ -286,7 +285,7 @@ moo_text_iter_find_matching_bracket (GtkTextIter *iter) same_direction = buffer->priv->left_brackets; break; } - + if (to_find == buffer->priv->num_brackets) for (to_find = 0; to_find < buffer->priv->num_brackets; ++to_find) if (bracket == buffer->priv->right_brackets[to_find]) @@ -297,14 +296,14 @@ moo_text_iter_find_matching_bracket (GtkTextIter *iter) inverse_direction = buffer->priv->left_brackets; break; } - + if (to_find == buffer->priv->num_brackets) return MOO_BRACKET_MATCH_NOT_AT_BRACKET; - + tag = gtk_source_iter_has_syntax_tag (iter); stack = 0; b = *iter; - + while (gtk_text_iter_forward_chars (&b, addition)) { if (tag == gtk_source_iter_has_syntax_tag (&b)) @@ -315,8 +314,8 @@ moo_text_iter_find_matching_bracket (GtkTextIter *iter) *iter = b; return MOO_BRACKET_MATCH_CORRECT; } - - if (find (same_direction, buffer->priv->num_brackets, c)) + + if (find (same_direction, buffer->priv->num_brackets, c)) { ++stack; } @@ -334,12 +333,12 @@ moo_text_iter_find_matching_bracket (GtkTextIter *iter) } } } - + return MOO_BRACKET_MATCH_NONE; } -static void +static void moo_text_buffer_cursor_moved (MooTextBuffer *buffer, const GtkTextIter *where) { @@ -348,9 +347,9 @@ moo_text_buffer_cursor_moved (MooTextBuffer *buffer, GtkTextTag *tag; GtkTextBuffer *text_buffer = GTK_TEXT_BUFFER (buffer); int i; - + g_return_if_fail (where != NULL); - + switch (buffer->priv->bracket_found) { case MOO_BRACKET_MATCH_CORRECT: @@ -367,7 +366,7 @@ moo_text_buffer_cursor_moved (MooTextBuffer *buffer, { for (i = 0; i < 4; ++i) gtk_text_buffer_get_iter_at_mark (text_buffer, &iter[i], - buffer->priv->bracket_mark[i]); + buffer->priv->bracket_mark[i]); gtk_text_buffer_remove_tag (text_buffer, tag, &iter[0], &iter[1]); gtk_text_buffer_remove_tag (text_buffer, tag, &iter[2], &iter[3]); } @@ -457,7 +456,7 @@ moo_text_buffer_mark_set (GtkTextBuffer *text_buffer, } -static void +static void moo_text_buffer_insert_text (GtkTextBuffer *text_buffer, GtkTextIter *pos, const gchar *text, @@ -478,7 +477,7 @@ moo_text_buffer_insert_text (GtkTextBuffer *text_buffer, } -static void +static void moo_text_buffer_delete_range (GtkTextBuffer *text_buffer, GtkTextIter *start, GtkTextIter *end) @@ -499,26 +498,26 @@ moo_text_buffer_delete_range (GtkTextBuffer *text_buffer, } -static void +static void moo_text_buffer_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { MooTextBuffer *buffer = MOO_TEXT_BUFFER (object); - + switch (prop_id) { case PROP_BRACKET_MATCH_STYLE: moo_text_buffer_set_bracket_match_style (buffer, g_value_get_boxed (value)); break; - + case PROP_CHECK_BRACKETS: - moo_text_buffer_set_check_brackets (buffer, + moo_text_buffer_set_check_brackets (buffer, g_value_get_boolean (value)); break; - + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -526,14 +525,14 @@ moo_text_buffer_set_property (GObject *object, } -static void +static void moo_text_buffer_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { MooTextBuffer *buffer = MOO_TEXT_BUFFER (object); - + switch (prop_id) { case PROP_CHECK_BRACKETS: @@ -564,7 +563,7 @@ moo_text_buffer_set_bracket_match_style (MooTextBuffer *buffer, int weight = PANGO_WEIGHT_NORMAL; PangoUnderline underline = PANGO_UNDERLINE_NONE; PangoStyle italic = PANGO_STYLE_NORMAL; - + g_return_if_fail (MOO_IS_TEXT_BUFFER (buffer)); if (!style) @@ -582,7 +581,7 @@ moo_text_buffer_set_bracket_match_style (MooTextBuffer *buffer, } if (!buffer->priv->correct_match_tag) - buffer->priv->correct_match_tag = + buffer->priv->correct_match_tag = gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (buffer), NULL, NULL); if (style->mask & GTK_SOURCE_TAG_STYLE_USE_BACKGROUND) @@ -596,7 +595,7 @@ moo_text_buffer_set_bracket_match_style (MooTextBuffer *buffer, if (style->underline) underline = PANGO_UNDERLINE_SINGLE; - g_object_set (buffer->priv->correct_match_tag, + g_object_set (buffer->priv->correct_match_tag, "foreground-gdk", fg, "background-gdk", bg, "style", italic, @@ -606,7 +605,7 @@ moo_text_buffer_set_bracket_match_style (MooTextBuffer *buffer, NULL); g_object_notify (G_OBJECT (buffer), "bracket-match-style"); - + if (freeme) gtk_source_tag_style_free (freeme); } @@ -631,7 +630,7 @@ parse_brackets (const char *string, left = g_new (gunichar, len); right = g_new (gunichar, len); - for (i = 0; i < len; ++i) + for (i = 0; i < len; ++i) { left[i] = g_utf8_get_char (p); p = g_utf8_next_char (p); @@ -659,7 +658,7 @@ moo_text_buffer_set_brackets (MooTextBuffer *buffer, g_free (buffer->priv->right_brackets); buffer->priv->right_brackets = NULL; - if (!string) + if (!string) { buffer->priv->num_brackets = 3; buffer->priv->left_brackets = g_new (gunichar, 3); @@ -684,8 +683,8 @@ moo_text_buffer_set_brackets (MooTextBuffer *buffer, } -void -moo_text_buffer_set_check_brackets (MooTextBuffer *buffer, +void +moo_text_buffer_set_check_brackets (MooTextBuffer *buffer, gboolean check) { g_return_if_fail (MOO_IS_TEXT_BUFFER (buffer)); @@ -694,19 +693,19 @@ moo_text_buffer_set_check_brackets (MooTextBuffer *buffer, } -gboolean +gboolean moo_text_buffer_has_text (MooTextBuffer *buffer) { GtkTextIter start, end; - + g_return_val_if_fail (MOO_IS_TEXT_BUFFER (buffer), TRUE); - + gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (buffer), &start, &end); return gtk_text_iter_compare (&start, &end) ? TRUE : FALSE; } -gboolean +gboolean moo_text_buffer_has_selection (MooTextBuffer *buffer) { g_return_val_if_fail (MOO_IS_TEXT_BUFFER (buffer), FALSE); diff --git a/moo/mooedit/mootextbuffer.h b/moo/mooedit/mootextbuffer.h index 4adc71e2..4c0f489d 100644 --- a/moo/mooedit/mootextbuffer.h +++ b/moo/mooedit/mootextbuffer.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mootextbuffer.h * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -42,7 +43,7 @@ struct _MooTextBuffer struct _MooTextBufferClass { GtkSourceBufferClass parent_class; - + void (*cursor_moved) (MooTextBuffer *buffer, const GtkTextIter *iter); }; @@ -55,13 +56,13 @@ MooTextBuffer *moo_text_buffer_new (void); void moo_text_buffer_set_lang (MooTextBuffer *buffer, MooEditLang *lang); -void moo_text_buffer_set_bracket_match_style +void moo_text_buffer_set_bracket_match_style (MooTextBuffer *buffer, const GtkSourceTagStyle *style); -void moo_text_buffer_set_brackets (MooTextBuffer *buffer, +void moo_text_buffer_set_brackets (MooTextBuffer *buffer, const char *brackets); void moo_text_buffer_set_check_brackets - (MooTextBuffer *buffer, + (MooTextBuffer *buffer, gboolean check); gboolean moo_text_buffer_has_text (MooTextBuffer *buffer); @@ -70,4 +71,3 @@ gboolean moo_text_buffer_has_selection (MooTextBuffer *buffer); G_END_DECLS #endif /* __MOO_TEXT_BUFFER_H__ */ -/* kate: space-indent on; indent-width 4; replace-tabs on; */ diff --git a/moo/mooedit/mootextiter.h b/moo/mooedit/mootextiter.h index 44ebaa3c..075af35e 100644 --- a/moo/mooedit/mootextiter.h +++ b/moo/mooedit/mootextiter.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mootextiter.h * * Copyright (C) 2004-2005 by Yevgen Muntyan diff --git a/moo/mooedit/mootextview.c b/moo/mooedit/mootextview.c index cc8b6a01..38d8eafa 100644 --- a/moo/mooedit/mootextview.c +++ b/moo/mooedit/mootextview.c @@ -1,5 +1,4 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; * * mootextview.c * @@ -328,7 +327,7 @@ moo_text_view_constructor (GType type, } -static void +static void moo_text_view_finalize (GObject *object) { MooTextView *view = MOO_TEXT_VIEW (object); @@ -350,7 +349,7 @@ moo_text_view_new (void) } -void +void moo_text_view_delete_selection (MooTextView *view) { g_return_if_fail (MOO_IS_TEXT_VIEW (view)); @@ -358,14 +357,14 @@ moo_text_view_delete_selection (MooTextView *view) } -static void +static void can_redo_cb (MooTextView *view, gboolean arg) { g_signal_emit (view, signals[CAN_REDO], 0, arg, NULL); } -static void +static void can_undo_cb (MooTextView *view, gboolean arg) { @@ -398,35 +397,35 @@ _moo_text_view_private_new (void) } -void +void moo_text_view_find (MooTextView *view) { g_return_if_fail (MOO_IS_TEXT_VIEW (view)); g_signal_emit (view, signals[FIND], 0, NULL); } -void +void moo_text_view_replace (MooTextView *view) { g_return_if_fail (MOO_IS_TEXT_VIEW (view)); g_signal_emit (view, signals[REPLACE], 0, NULL); } -void +void moo_text_view_find_next (MooTextView *view) { g_return_if_fail (MOO_IS_TEXT_VIEW (view)); g_signal_emit (view, signals[FIND_NEXT], 0, NULL); } -void +void moo_text_view_find_previous (MooTextView *view) { g_return_if_fail (MOO_IS_TEXT_VIEW (view)); g_signal_emit (view, signals[FIND_PREVIOUS], 0, NULL); } -static void +static void goto_line (MooTextView *view) { moo_text_view_goto_line (view, -1); @@ -441,17 +440,17 @@ moo_text_view_set_font_from_string (MooTextView *view, g_return_if_fail (MOO_IS_TEXT_VIEW (view)); - if (font) + if (font) font_desc = pango_font_description_from_string (font); - + gtk_widget_modify_font (GTK_WIDGET (view), font_desc); - - if (font_desc) + + if (font_desc) pango_font_description_free (font_desc); } -gboolean +gboolean moo_text_view_can_redo (MooTextView *view) { g_return_val_if_fail (MOO_IS_TEXT_VIEW (view), FALSE); @@ -459,7 +458,7 @@ moo_text_view_can_redo (MooTextView *view) } -gboolean +gboolean moo_text_view_can_undo (MooTextView *view) { g_return_val_if_fail (MOO_IS_TEXT_VIEW (view), FALSE); @@ -467,7 +466,7 @@ moo_text_view_can_undo (MooTextView *view) } -void +void moo_text_view_select_all (MooTextView *view) { g_return_if_fail (MOO_IS_TEXT_VIEW (view)); @@ -475,7 +474,7 @@ moo_text_view_select_all (MooTextView *view) } -static void +static void moo_text_view_set_property (GObject *object, guint prop_id, const GValue *value, @@ -503,9 +502,9 @@ moo_text_view_set_property (GObject *object, { g_object_ref (buffer); } - + gtk_text_view_set_buffer (GTK_TEXT_VIEW (view), buffer); - + g_object_unref (buffer); break; @@ -520,7 +519,7 @@ moo_text_view_set_property (GObject *object, case PROP_CURRENT_LINE_COLOR_GDK: moo_text_view_set_current_line_color (view, g_value_get_boxed (value)); break; - + case PROP_CURRENT_LINE_COLOR: g_return_if_fail (g_value_get_string (value) != NULL); gdk_color_parse (g_value_get_string (value), &color); @@ -537,7 +536,7 @@ moo_text_view_set_property (GObject *object, } } -static void +static void moo_text_view_get_property (GObject *object, guint prop_id, GValue *value, @@ -568,12 +567,12 @@ moo_text_view_get_property (GObject *object, break; case PROP_HAS_TEXT: - g_value_set_boolean (value, + g_value_set_boolean (value, moo_text_view_has_text (view)); break; case PROP_HAS_SELECTION: - g_value_set_boolean (value, + g_value_set_boolean (value, moo_text_view_has_selection (view)); break; @@ -584,7 +583,7 @@ moo_text_view_get_property (GObject *object, } -GType +GType moo_text_selection_type_get_type (void) { static GType type = 0; @@ -621,7 +620,7 @@ moo_text_view_get_selection (MooTextView *view) } -gboolean +gboolean moo_text_view_has_selection (MooTextView *view) { g_return_val_if_fail (MOO_IS_TEXT_VIEW (view), FALSE); @@ -629,7 +628,7 @@ moo_text_view_has_selection (MooTextView *view) } -gboolean +gboolean moo_text_view_has_text (MooTextView *view) { g_return_val_if_fail (MOO_IS_TEXT_VIEW (view), FALSE); @@ -662,7 +661,7 @@ moo_text_view_get_text (MooTextView *view) } -static void +static void insert_text_cb (GtkTextBuffer *buffer, GtkTextIter *iter, gchar *text, @@ -680,7 +679,7 @@ insert_text_cb (GtkTextBuffer *buffer, } -static void +static void cursor_moved (MooTextView *view, GtkTextIter *where) { @@ -688,14 +687,14 @@ cursor_moved (MooTextView *view, } -static void +static void has_selection_notify (MooTextView *view) { g_object_notify (G_OBJECT (view), "has-selection"); } -static void +static void has_text_notify (MooTextView *view) { g_object_notify (G_OBJECT (view), "has-text"); @@ -710,7 +709,7 @@ moo_text_view_get_indenter (MooTextView *view) } -void +void moo_text_view_set_indenter (MooTextView *view, MooIndenter *indenter) { @@ -812,7 +811,7 @@ get_moo_buffer (MooTextView *view) } -void +void moo_text_view_set_highlight_current_line (MooTextView *view, gboolean highlight) { @@ -820,7 +819,7 @@ void if (view->priv->highlight_current_line == highlight) return; - + view->priv->highlight_current_line = highlight; g_object_notify (G_OBJECT (view), "highlight-current-line"); @@ -829,7 +828,7 @@ void } -void +void moo_text_view_set_current_line_color (MooTextView *view, const GdkColor *color) { @@ -851,7 +850,7 @@ moo_text_view_set_current_line_color (MooTextView *view, } -static void +static void moo_text_view_realize (GtkWidget *widget) { GTK_WIDGET_CLASS(moo_text_view_parent_class)->realize (widget); @@ -859,7 +858,7 @@ moo_text_view_realize (GtkWidget *widget) } -static void +static void moo_text_view_unrealize (GtkWidget *widget) { MooTextView *view = MOO_TEXT_VIEW (widget); @@ -870,36 +869,36 @@ moo_text_view_unrealize (GtkWidget *widget) } -static void +static void create_current_line_gc (MooTextView *view) { GtkWidget *widget = GTK_WIDGET (view); GdkColormap *colormap; gboolean success; GdkWindow *window; - + g_return_if_fail (GTK_WIDGET_REALIZED (widget)); g_return_if_fail (view->priv->current_line_gc == NULL); colormap = gtk_widget_get_colormap (widget); g_return_if_fail (colormap != NULL); - + window = gtk_text_view_get_window (GTK_TEXT_VIEW (view), GTK_TEXT_WINDOW_TEXT); g_return_if_fail (window != NULL); - + success = gdk_colormap_alloc_color (colormap, &view->priv->current_line_color, FALSE, TRUE); - + if (!success) { g_warning ("%s: failed to allocate color", G_STRLOC); view->priv->current_line_color = widget->style->bg[GTK_STATE_NORMAL]; } - + view->priv->current_line_gc = gdk_gc_new (window); - gdk_gc_set_foreground (view->priv->current_line_gc, + gdk_gc_set_foreground (view->priv->current_line_gc, &view->priv->current_line_color); } @@ -974,13 +973,13 @@ draw_tab_at_iter (GtkTextView *text_view, static void -moo_text_view_draw_tab_markers (GtkTextView *text_view, +moo_text_view_draw_tab_markers (GtkTextView *text_view, GdkEventExpose *event, GtkTextIter *start, GtkTextIter *end) { - - + + while (gtk_text_iter_compare (start, end) < 0) { if (gtk_text_iter_get_char (start) == '\t') @@ -991,7 +990,7 @@ moo_text_view_draw_tab_markers (GtkTextView *text_view, } -static gboolean +static gboolean moo_text_view_expose (GtkWidget *widget, GdkEventExpose *event) { @@ -999,7 +998,7 @@ moo_text_view_expose (GtkWidget *widget, MooTextView *view = MOO_TEXT_VIEW (widget); GtkTextView *text_view = GTK_TEXT_VIEW (widget); GdkWindow *text_window = gtk_text_view_get_window (text_view, GTK_TEXT_WINDOW_TEXT); - + if (view->priv->highlight_current_line && event->window == text_window) { moo_text_view_draw_current_line (text_view, event); @@ -1029,14 +1028,14 @@ moo_text_view_expose (GtkWidget *widget, void -moo_text_view_set_show_tabs (MooTextView *view, +moo_text_view_set_show_tabs (MooTextView *view, gboolean show) { g_return_if_fail (MOO_IS_TEXT_VIEW (view)); - + if (view->priv->show_tabs == show) return; - + view->priv->show_tabs = show; g_object_notify (G_OBJECT (view), "show-tabs"); diff --git a/moo/mooedit/mootextview.h b/moo/mooedit/mootextview.h index 2aa9a593..7a13da10 100644 --- a/moo/mooedit/mootextview.h +++ b/moo/mooedit/mootextview.h @@ -1,4 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- + * * mooedit.h * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -121,16 +122,15 @@ void moo_text_view_move_cursor (MooTextView *view, int character, gboolean in_idle); -void moo_text_view_set_highlight_current_line +void moo_text_view_set_highlight_current_line (MooTextView *view, gboolean highlight); void moo_text_view_set_current_line_color (MooTextView *view, const GdkColor *color); -void moo_text_view_set_show_tabs (MooTextView *view, +void moo_text_view_set_show_tabs (MooTextView *view, gboolean show); G_END_DECLS #endif /* __MOO_TEXT_VIEW_H__ */ -/* kate: space-indent on; indent-width 4; replace-tabs on; */ diff --git a/moo/mooedit/plugins/moogrep.c b/moo/mooedit/plugins/moogrep.c index 1ed441c5..705acf65 100644 --- a/moo/mooedit/plugins/moogrep.c +++ b/moo/mooedit/plugins/moogrep.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- - * kate: space-indent on; indent-width 4; replace-tabs on; + * * moogrep.c * * Copyright (C) 2004-2005 by Yevgen Muntyan @@ -843,7 +843,7 @@ output_click (WindowStuff *stuff, gtk_widget_grab_focus (GTK_WIDGET (doc)); if (line_data->line >= 0) - moo_text_view_move_cursor (MOO_TEXT_VIEW (doc), + moo_text_view_move_cursor (MOO_TEXT_VIEW (doc), line_data->line, -1, TRUE); return TRUE;