lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
List overview
Plugins-Commits
July 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
plugins-commits@lists.geany.org
4 participants
40 discussions
Start a n
N
ew thread
SF.net SVN: geany-plugins:[126] trunk/geanylua
by ntrel@users.sourceforge.net
17 Jul '08
17 Jul '08
Revision: 126
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=126&view=rev
Author: ntrel Date: 2008-07-17 12:18:58 +0000 (Thu, 17 Jul 2008) Log Message: ----------- Don't install .svn subdirectories in examples. Modified Paths: -------------- trunk/geanylua/ChangeLog trunk/geanylua/Makefile.am Modified: trunk/geanylua/ChangeLog =================================================================== --- trunk/geanylua/ChangeLog 2008-07-17 12:08:28 UTC (rev 125) +++ trunk/geanylua/ChangeLog 2008-07-17 12:18:58 UTC (rev 126) @@ -1,6 +1,7 @@ July 17, 2008 (ntrel) Fix use of old app macro. Fix segfault in last commit in glspi_init() (oops). + Don't install .svn subdirectories in examples. July 15, 2008 (ntrel) Fix for GeanyEditor changes. Modified: trunk/geanylua/Makefile.am =================================================================== --- trunk/geanylua/Makefile.am 2008-07-17 12:08:28 UTC (rev 125) +++ trunk/geanylua/Makefile.am 2008-07-17 12:18:58 UTC (rev 126) @@ -87,8 +87,12 @@ install-scripts: - $(MKDIR_P) $(DATA_DEST_DIR) - cp -R ./examples $(DATA_DEST_DIR) + $(MKDIR_P) $(DATA_DEST_DIR)/examples + DIRS=`find examples -maxdepth 1 -mindepth 1 -type d -not -name .svn`; \ + for DIR in $$DIRS; do \ + $(MKDIR_P) $(DATA_DEST_DIR)/$$DIR; \ + cp $$DIR/*.lua $(DATA_DEST_DIR)/$$DIR; \ + done install-docs: This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[125] trunk/geanylua
by ntrel@users.sourceforge.net
17 Jul '08
17 Jul '08
Revision: 125
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=125&view=rev
Author: ntrel Date: 2008-07-17 12:08:28 +0000 (Thu, 17 Jul 2008) Log Message: ----------- Fix segfault in last commit in glspi_init() (oops). Modified Paths: -------------- trunk/geanylua/ChangeLog trunk/geanylua/glspi_init.c Modified: trunk/geanylua/ChangeLog =================================================================== --- trunk/geanylua/ChangeLog 2008-07-17 11:22:05 UTC (rev 124) +++ trunk/geanylua/ChangeLog 2008-07-17 12:08:28 UTC (rev 125) @@ -1,5 +1,6 @@ July 17, 2008 (ntrel) Fix use of old app macro. + Fix segfault in last commit in glspi_init() (oops). July 15, 2008 (ntrel) Fix for GeanyEditor changes. Modified: trunk/geanylua/glspi_init.c =================================================================== --- trunk/geanylua/glspi_init.c 2008-07-17 11:22:05 UTC (rev 124) +++ trunk/geanylua/glspi_init.c 2008-07-17 12:08:28 UTC (rev 125) @@ -434,7 +434,7 @@ PLUGIN_EXPORT void glspi_init (GeanyData *data, GeanyFunctions *functions, KeyBindingGroup *kg) { - GeanyApp *app = geany->app; + GeanyApp *app = data->app; glspi_geany_data = data; glspi_geany_functions = functions; This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[124] trunk/geanylua
by ntrel@users.sourceforge.net
17 Jul '08
17 Jul '08
Revision: 124
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=124&view=rev
Author: ntrel Date: 2008-07-17 11:22:05 +0000 (Thu, 17 Jul 2008) Log Message: ----------- Fix use of old app macro. Modified Paths: -------------- trunk/geanylua/ChangeLog trunk/geanylua/glspi_app.c trunk/geanylua/glspi_init.c Modified: trunk/geanylua/ChangeLog =================================================================== --- trunk/geanylua/ChangeLog 2008-07-16 22:32:34 UTC (rev 123) +++ trunk/geanylua/ChangeLog 2008-07-17 11:22:05 UTC (rev 124) @@ -1,3 +1,6 @@ +July 17, 2008 (ntrel) + Fix use of old app macro. + July 15, 2008 (ntrel) Fix for GeanyEditor changes. Modified: trunk/geanylua/glspi_app.c =================================================================== --- trunk/geanylua/glspi_app.c 2008-07-16 22:32:34 UTC (rev 123) +++ trunk/geanylua/glspi_app.c 2008-07-17 11:22:05 UTC (rev 124) @@ -81,6 +81,8 @@ static gint glspi_appinfo(lua_State* L) { + GeanyApp *app = geany->app; + lua_newtable(L); SetTableBool("debug", app->debug_mode); SetTableStr("configdir", app->configdir); @@ -95,7 +97,7 @@ glspi_tools(L); lua_rawset(L,1); - if (geany->app->project) { + if (app->project) { lua_pushstring(L,"project"); glspi_project(L); lua_rawset(L,1); Modified: trunk/geanylua/glspi_init.c =================================================================== --- trunk/geanylua/glspi_init.c 2008-07-16 22:32:34 UTC (rev 123) +++ trunk/geanylua/glspi_init.c 2008-07-17 11:22:05 UTC (rev 124) @@ -108,7 +108,7 @@ #define KEYFILE_FAIL(msg) \ -if (app->debug_mode) { \ +if (geany->app->debug_mode) { \ g_printerr("%s: %s\n", PLUGIN_NAME, msg); \ } \ g_error_free(err); \ @@ -177,13 +177,13 @@ key,mod,KG->keys[i].name,KG->keys[i].label,NULL); } } else { - if (app->debug_mode) { + if (geany->app->debug_mode) { g_printerr("%s: %s\n", PLUGIN_NAME, err->message); } g_error_free(err); } } else { - if (app->debug_mode) { + if (geany->app->debug_mode) { g_printerr("%s: File not found %s\n", PLUGIN_NAME, hotkeys_cfg); } } @@ -434,6 +434,8 @@ PLUGIN_EXPORT void glspi_init (GeanyData *data, GeanyFunctions *functions, KeyBindingGroup *kg) { + GeanyApp *app = geany->app; + glspi_geany_data = data; glspi_geany_functions = functions; This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[123] trunk/spellcheck
by eht16@users.sourceforge.net
17 Jul '08
17 Jul '08
Revision: 123
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=123&view=rev
Author: eht16 Date: 2008-07-16 22:32:34 +0000 (Wed, 16 Jul 2008) Log Message: ----------- Note: Don't use this revision for productive use! Experimental changes in word retrieval to work better with complex Unicode characters like in Hindi. Use Scintilla's messages for finding word start and end positions instead of my own variant which didn't work well in Hindi. Add a temporary option to switch between Geany's word retrieval method when showing the editor menu or use an alternative one (only for testing). This code is still in testing and should be considered as WIP. Modified Paths: -------------- trunk/spellcheck/ChangeLog trunk/spellcheck/src/spellcheck.c Modified: trunk/spellcheck/ChangeLog =================================================================== --- trunk/spellcheck/ChangeLog 2008-07-15 19:14:44 UTC (rev 122) +++ trunk/spellcheck/ChangeLog 2008-07-16 22:32:34 UTC (rev 123) @@ -1,3 +1,17 @@ +2008-07-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/spellcheck.c: + Note: Don't use this revision for productive use! + Experimental changes in word retrieval to work better with complex + Unicode characters like in Hindi. + Use Scintilla's messages for finding word start and end positions + instead of my own variant which didn't work well in Hindi. + Add a temporary option to switch between Geany's word retrieval + method when showing the editor menu or use an alternative one + (only for testing). + This code is still in testing and should be considered as WIP. + + 2008-07-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> * src/spellcheck.c: Modified: trunk/spellcheck/src/spellcheck.c =================================================================== --- trunk/spellcheck/src/spellcheck.c 2008-07-15 19:14:44 UTC (rev 122) +++ trunk/spellcheck/src/spellcheck.c 2008-07-16 22:32:34 UTC (rev 123) @@ -35,6 +35,7 @@ #endif #include <string.h> +#include <ctype.h> #include <enchant.h> #include "plugindata.h" @@ -65,6 +66,7 @@ gchar *default_language; gboolean use_msgwin; gboolean check_while_typing; + gboolean use_geanys_current_word; gulong signal_id; GPtrArray *dicts; GtkWidget *edit_menu; @@ -205,20 +207,57 @@ } +/* This is a temporary replacement for Geany's editor_find_current_word() which is not yet + * as good as it should be in reading Unicode words */ +static gchar *get_current_word(GeanyDocument *doc, gint pos_start) +{ + gint wstart, wend; + gchar *word; + gchar c; + + g_message("use internal word retrieval"); + + wstart = p_sci->send_message(doc->editor->sci, SCI_WORDSTARTPOSITION, pos_start, TRUE); + wend = p_sci->send_message(doc->editor->sci, SCI_WORDENDPOSITION, wstart, FALSE); + if (wstart == wend) + return NULL; + c = p_sci->get_char_at(doc->editor->sci, wstart); + + word = g_malloc0(wend - wstart + 1); + /* hopefully it's enough to check for these both */ + if (ispunct(c) || isspace(c)) + { + return NULL; + } + + p_sci->get_text_range(doc->editor->sci, wstart, wend, word); + + return word; +} + + static void on_update_editor_menu(GObject *obj, const gchar *word, gint pos, GeanyDocument *doc, gpointer user_data) { gsize n_suggs, i; gchar **tmp_suggs; + gchar *current_word; + g_return_if_fail(doc != NULL && doc->is_valid); + /* hide the submenu in any case, we will reshow it again if we actually found something */ gtk_widget_hide(sc->edit_menu); gtk_widget_hide(sc->edit_menu_sep); - if (! NZV(word) || enchant_dict_check(sc->dict, word, -1) == 0) + if (sc->use_geanys_current_word) + current_word = g_strdup(word); + else + current_word = get_current_word(doc, pos); + + if (! NZV(current_word) || enchant_dict_check(sc->dict, current_word, -1) == 0) return; - tmp_suggs = enchant_dict_suggest(sc->dict, word, -1, &n_suggs); + tmp_suggs = enchant_dict_suggest(sc->dict, current_word, -1, &n_suggs); if (tmp_suggs != NULL) { @@ -227,7 +266,8 @@ clickinfo.pos = pos; clickinfo.doc = doc; - setptr(clickinfo.word, g_strdup(word)); + //~ setptr(clickinfo.word, g_strdup(word)); + setptr(clickinfo.word, current_word); if (GTK_IS_WIDGET(sc->edit_menu_sub)) gtk_widget_destroy(sc->edit_menu_sub); @@ -253,7 +293,7 @@ image = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU); - label = g_strdup_printf(_("Add \"%s\" to Dictionary"), word); + label = g_strdup_printf(_("Add \"%s\" to Dictionary"), current_word); menu_item = gtk_image_menu_item_new_with_label(label); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), image); gtk_container_add(GTK_CONTAINER(sc->edit_menu_sub), menu_item); @@ -278,19 +318,18 @@ } -static gint check_word(GeanyDocument *doc, gint line_number, GString *str, gint end_pos) +static gint check_word(GeanyDocument *doc, gint line_number, const gchar *word, + gint start_pos, gint end_pos) { gsize j; gsize n_suggs = 0; gchar **suggs; - gchar *word; + GString *str = g_string_sized_new(256); /* early out if the word is spelled correctly */ - if (enchant_dict_check(sc->dict, str->str, -1) == 0) + if (enchant_dict_check(sc->dict, word, -1) == 0) return 0; - word = g_strdup(str->str); - g_string_erase(str, 0, str->len); suggs = enchant_dict_suggest(sc->dict, word, -1, &n_suggs); if (suggs != NULL) @@ -306,19 +345,23 @@ g_string_append_c(str, ' '); } - p_editor->set_indicator(doc->editor, end_pos - strlen(word), end_pos); + if (start_pos == -1) + start_pos = end_pos - strlen(word); + + p_editor->set_indicator(doc->editor, start_pos, end_pos); if (sc->use_msgwin) p_msgwindow->msg_add(COLOR_RED, line_number + 1, doc, "%s", str->str); if (suggs != NULL && n_suggs) enchant_dict_free_string_list(sc->dict, suggs); } - g_free(word); + g_string_free(str, TRUE); return n_suggs; } +#if 0 static gint process_line(GeanyDocument *doc, gint line_number, const gchar *line) { gint end_pos, char_len; @@ -339,8 +382,7 @@ else if (str->len > 0) { g_string_append_c(str, '\0'); - suggestions_found += check_word(doc, line_number, str, end_pos); - g_string_erase(str, 0, str->len); + suggestions_found += check_word(doc, line_number, str->str, -1, end_pos); } /* calculate byte len of c and add skip these in line */ @@ -353,7 +395,51 @@ return suggestions_found; } +#else +static gint process_line(GeanyDocument *doc, gint line_number, const gchar *line) +{ + gint pos_start, pos_end; + gint wstart, wend; + GString *str = g_string_sized_new(256); + gint suggestions_found = 0; + gchar c; + + pos_start = p_sci->get_position_from_line(doc->editor->sci, line_number); + /* TODO use SCI_GETLINEENDPOSITION */ + pos_end = p_sci->get_position_from_line(doc->editor->sci, line_number + 1); + + while (pos_start < pos_end) + { + wstart = p_sci->send_message(doc->editor->sci, SCI_WORDSTARTPOSITION, pos_start, TRUE); + wend = p_sci->send_message(doc->editor->sci, SCI_WORDENDPOSITION, wstart, FALSE); + if (wstart == wend) + break; + c = p_sci->get_char_at(doc->editor->sci, wstart); + /* hopefully it's enough to check for these both */ + if (ispunct(c) || isspace(c)) + { + pos_start++; + continue; + } + + /* ensure the string has enough allocated memory */ + if (str->len < (guint)(wend - wstart)) + g_string_set_size(str, wend - wstart); + + p_sci->get_text_range(doc->editor->sci, wstart, wend, str->str); + + suggestions_found += check_word(doc, line_number, str->str, wstart, wend); + + pos_start = wend + 1; + } + + g_string_free(str, TRUE); + return suggestions_found; +} +#endif + + static void check_document(GeanyDocument *doc) { gchar *line; @@ -375,6 +461,8 @@ p_msgwindow->msg_add(COLOR_BLUE, -1, NULL, _("Checking file \"%s\" (lines %d to %d using %s):"), DOC_FILENAME(doc), first_line + 1, last_line + 1, dict_string); + g_message("Checking file \"%s\" (lines %d to %d using %s):", + DOC_FILENAME(doc), first_line + 1, last_line + 1, dict_string); } else { @@ -383,6 +471,7 @@ if (sc->use_msgwin) p_msgwindow->msg_add(COLOR_BLUE, -1, NULL, _("Checking file \"%s\" (using %s):"), DOC_FILENAME(doc), dict_string); + g_message("Checking file \"%s\" (using %s):", DOC_FILENAME(doc), dict_string); } g_free(dict_string); @@ -594,10 +683,14 @@ sc->use_msgwin = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( g_object_get_data(G_OBJECT(dialog), "check_msgwin")))); + sc->use_geanys_current_word = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( + g_object_get_data(G_OBJECT(dialog), "check_current_word")))); + g_key_file_load_from_file(config, sc->config_file, G_KEY_FILE_NONE, NULL); g_key_file_set_string(config, "spellcheck", "language", sc->default_language); g_key_file_set_boolean(config, "spellcheck", "check_while_typing", sc->check_while_typing); g_key_file_set_boolean(config, "spellcheck", "use_msgwin", sc->use_msgwin); + g_key_file_set_boolean(config, "spellcheck", "use_geanys_current_word", sc->use_geanys_current_word); if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && p_utils->mkdir(config_dir, TRUE) != 0) { @@ -696,6 +789,7 @@ sc->check_while_typing = p_utils->get_setting_boolean(config, "spellcheck", "check_while_typing", FALSE); sc->use_msgwin = p_utils->get_setting_boolean(config, "spellcheck", "use_msgwin", FALSE); + sc->use_geanys_current_word = p_utils->get_setting_boolean(config, "spellcheck", "use_geanys_current_word", TRUE); g_key_file_free(config); locale_init(); @@ -729,7 +823,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog) { - GtkWidget *label, *vbox, *combo, *check_type, *check_msgwin; + GtkWidget *label, *vbox, *combo, *check_type, *check_msgwin, *check_current_word; guint i; vbox = gtk_vbox_new(FALSE, 6); @@ -743,6 +837,11 @@ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_msgwin), sc->use_msgwin); gtk_box_pack_start(GTK_BOX(vbox), check_msgwin, FALSE, FALSE, 3); + check_current_word = gtk_check_button_new_with_label( + _("In the right-click menu, retrieve the current word from Geany?")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_current_word), sc->use_geanys_current_word); + gtk_box_pack_start(GTK_BOX(vbox), check_current_word, FALSE, FALSE, 3); + label = gtk_label_new(_("Language to use for the spell check:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 3); @@ -766,6 +865,7 @@ g_object_set_data(G_OBJECT(dialog), "combo", combo); g_object_set_data(G_OBJECT(dialog), "check_type", check_type); g_object_set_data(G_OBJECT(dialog), "check_msgwin", check_msgwin); + g_object_set_data(G_OBJECT(dialog), "check_current_word", check_current_word); g_signal_connect(dialog, "response", G_CALLBACK(on_configure_response), NULL); gtk_widget_show_all(vbox); This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins: [122] trunk/geanyvc/geanyvc.c
by frlan@users.sourceforge.net
15 Jul '08
15 Jul '08
Revision: 122
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=122&view=rev
Author: frlan Date: 2008-07-15 12:14:44 -0700 (Tue, 15 Jul 2008) Log Message: ----------- GeanyVC: Make plugin work together with Geany plugin API v78 Modified Paths: -------------- trunk/geanyvc/geanyvc.c Modified: trunk/geanyvc/geanyvc.c =================================================================== --- trunk/geanyvc/geanyvc.c 2008-07-15 19:13:59 UTC (rev 121) +++ trunk/geanyvc/geanyvc.c 2008-07-15 19:14:44 UTC (rev 122) @@ -32,6 +32,7 @@ #include "support.h" #include "plugindata.h" #include "document.h" +#include "editor.h" #include "filetypes.h" #include "utils.h" #include "ui_utils.h" @@ -55,7 +56,7 @@ GeanyFunctions *geany_functions; -PLUGIN_VERSION_CHECK(71); +PLUGIN_VERSION_CHECK(78); PLUGIN_SET_INFO(_("VC"), _("Interface to different Version Control systems."), VERSION, _("Yura Siamashka <yurand2(a)gmail.com>,\nFrank Lanitz <frank(a)frank.uvena.de>")); @@ -348,9 +349,9 @@ } else { - p_sci->set_text(doc->sci, std_output); + p_sci->set_text(doc->editor->sci, std_output); book = GTK_NOTEBOOK(geany->main_widgets->notebook); - page = gtk_notebook_page_num(book, GTK_WIDGET(doc->sci)); + page = gtk_notebook_page_num(book, GTK_WIDGET(doc->editor->sci)); gtk_notebook_set_current_page(book, page); } p_document->set_text_changed(doc, set_changed_flag); This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins: [121] trunk/geanylatex
by frlan@users.sourceforge.net
15 Jul '08
15 Jul '08
Revision: 121
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=121&view=rev
Author: frlan Date: 2008-07-15 12:13:59 -0700 (Tue, 15 Jul 2008) Log Message: ----------- GeanyLaTeX: Make plugin work together with plugin API v78 Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/geanylatex.c Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2008-07-15 18:17:46 UTC (rev 120) +++ trunk/geanylatex/ChangeLog 2008-07-15 19:13:59 UTC (rev 121) @@ -1,3 +1,8 @@ +2008-07-15 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + + * Make plugin work together with Geany plugin API v78. + + 2008-07-11 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> * Make plugin compile with Geany svn r2767. Modified: trunk/geanylatex/geanylatex.c =================================================================== --- trunk/geanylatex/geanylatex.c 2008-07-15 18:17:46 UTC (rev 120) +++ trunk/geanylatex/geanylatex.c 2008-07-15 19:13:59 UTC (rev 121) @@ -26,6 +26,7 @@ #include "support.h" #include "plugindata.h" #include "document.h" +#include "editor.h" #include "filetypes.h" #include "templates.h" #include "utils.h" @@ -46,7 +47,7 @@ GeanyFunctions *geany_functions; -PLUGIN_VERSION_CHECK(71) +PLUGIN_VERSION_CHECK(78) PLUGIN_SET_INFO(_("LaTeX"), _("Plugin to make Geany better support LaTeX"), "0.2-dev", "Frank Lanitz <frank(a)frank.uvena.de>") @@ -98,8 +99,8 @@ if (doc != NULL) { - gint pos = p_sci->get_current_position(doc->sci); - p_sci->insert_text(doc->sci, pos, string); + gint pos = p_sci->get_current_position(doc->editor->sci); + p_sci->insert_text(doc->editor->sci, pos, string); } } This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins: [120] trunk/spellcheck
by eht16@users.sourceforge.net
15 Jul '08
15 Jul '08
Revision: 120
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=120&view=rev
Author: eht16 Date: 2008-07-15 11:17:46 -0700 (Tue, 15 Jul 2008) Log Message: ----------- Update to Geany API 78 (GeanyEditor changes). Modified Paths: -------------- trunk/spellcheck/ChangeLog trunk/spellcheck/src/spellcheck.c Modified: trunk/spellcheck/ChangeLog =================================================================== --- trunk/spellcheck/ChangeLog 2008-07-15 17:44:25 UTC (rev 119) +++ trunk/spellcheck/ChangeLog 2008-07-15 18:17:46 UTC (rev 120) @@ -1,3 +1,9 @@ +2008-07-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/spellcheck.c: + Update to Geany API 78 (GeanyEditor changes). + + 2008-07-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> * src/spellcheck.c: Modified: trunk/spellcheck/src/spellcheck.c =================================================================== --- trunk/spellcheck/src/spellcheck.c 2008-07-15 17:44:25 UTC (rev 119) +++ trunk/spellcheck/src/spellcheck.c 2008-07-15 18:17:46 UTC (rev 120) @@ -54,7 +54,7 @@ GeanyFunctions *geany_functions; -PLUGIN_VERSION_CHECK(75) +PLUGIN_VERSION_CHECK(78) PLUGIN_SET_INFO(_("Spell Check"), _("Checks the spelling of the current document."), "0.2", _("The Geany developer team")) @@ -138,8 +138,8 @@ if (len > 0) { - p_sci->send_message(doc->sci, SCI_STARTSTYLING, start, INDIC2_MASK); - p_sci->send_message(doc->sci, SCI_SETSTYLING, len, 0); + p_sci->send_message(doc->editor->sci, SCI_STARTSTYLING, start, INDIC2_MASK); + p_sci->send_message(doc->editor->sci, SCI_SETSTYLING, len, 0); } } @@ -150,8 +150,8 @@ g_return_if_fail(doc != NULL); - start_pos = p_sci->get_position_from_line(doc->sci, line_number); - length = p_sci->get_line_length(doc->sci, line_number); + start_pos = p_sci->get_position_from_line(doc->editor->sci, line_number); + length = p_sci->get_line_length(doc->editor->sci, line_number); clear_indicators_on_range(doc, start_pos, length); } @@ -169,14 +169,16 @@ return; } - startword = p_sci->send_message(clickinfo.doc->sci, SCI_WORDSTARTPOSITION, clickinfo.pos, 0); - endword = p_sci->send_message(clickinfo.doc->sci, SCI_WORDENDPOSITION, clickinfo.pos, 0); + startword = p_sci->send_message( + clickinfo.doc->editor->sci, SCI_WORDSTARTPOSITION, clickinfo.pos, 0); + endword = p_sci->send_message( + clickinfo.doc->editor->sci, SCI_WORDENDPOSITION, clickinfo.pos, 0); if (startword != endword) { - p_sci->set_selection_start(clickinfo.doc->sci, startword); - p_sci->set_selection_end(clickinfo.doc->sci, endword); - p_sci->replace_sel(clickinfo.doc->sci, sugg); + p_sci->set_selection_start(clickinfo.doc->editor->sci, startword); + p_sci->set_selection_end(clickinfo.doc->editor->sci, endword); + p_sci->replace_sel(clickinfo.doc->editor->sci, sugg); clear_indicators_on_range(clickinfo.doc, startword, endword - startword); } @@ -192,8 +194,10 @@ enchant_dict_add_to_pwl(sc->dict, clickinfo.word, -1); - startword = p_sci->send_message(clickinfo.doc->sci, SCI_WORDSTARTPOSITION, clickinfo.pos, 0); - endword = p_sci->send_message(clickinfo.doc->sci, SCI_WORDENDPOSITION, clickinfo.pos, 0); + startword = p_sci->send_message( + clickinfo.doc->editor->sci, SCI_WORDSTARTPOSITION, clickinfo.pos, 0); + endword = p_sci->send_message( + clickinfo.doc->editor->sci, SCI_WORDENDPOSITION, clickinfo.pos, 0); if (startword != endword) { clear_indicators_on_range(clickinfo.doc, startword, endword - startword); @@ -302,7 +306,7 @@ g_string_append_c(str, ' '); } - p_editor->set_indicator(doc, end_pos - strlen(word), end_pos); + p_editor->set_indicator(doc->editor, end_pos - strlen(word), end_pos); if (sc->use_msgwin) p_msgwindow->msg_add(COLOR_RED, line_number + 1, doc, "%s", str->str); @@ -322,7 +326,7 @@ GString *str = g_string_sized_new(256); gint suggestions_found = 0; - end_pos = p_sci->get_position_from_line(doc->sci, line_number); + end_pos = p_sci->get_position_from_line(doc->editor->sci, line_number); /* split line into words */ while ((c = g_utf8_get_char_validated(line, -1)) != (gunichar) -1 && c != 0) { @@ -360,10 +364,12 @@ enchant_dict_describe(sc->dict, dict_describe, &dict_string); - if (p_sci->can_copy(doc->sci)) + if (p_sci->can_copy(doc->editor->sci)) { - first_line = p_sci->get_line_from_position(doc->sci, p_sci->get_selection_start(doc->sci)); - last_line = p_sci->get_line_from_position(doc->sci, p_sci->get_selection_end(doc->sci)); + first_line = p_sci->get_line_from_position( + doc->editor->sci, p_sci->get_selection_start(doc->editor->sci)); + last_line = p_sci->get_line_from_position( + doc->editor->sci, p_sci->get_selection_end(doc->editor->sci)); if (sc->use_msgwin) p_msgwindow->msg_add(COLOR_BLUE, -1, NULL, @@ -373,7 +379,7 @@ else { first_line = 0; - last_line = p_sci->get_line_count(doc->sci); + last_line = p_sci->get_line_count(doc->editor->sci); if (sc->use_msgwin) p_msgwindow->msg_add(COLOR_BLUE, -1, NULL, _("Checking file \"%s\" (using %s):"), DOC_FILENAME(doc), dict_string); @@ -382,7 +388,7 @@ for (i = first_line; i < last_line; i++) { - line = p_sci->get_line(doc->sci, i); + line = p_sci->get_line(doc->editor->sci, i); suggestions_found += process_line(doc, i, line); @@ -405,7 +411,7 @@ static void perform_check(GeanyDocument *doc) { - p_editor->clear_indicators(doc); + p_editor->clear_indicators(doc->editor); if (sc->use_msgwin) { p_msgwindow->clear_tab(MSG_MESSAGE); @@ -438,19 +444,19 @@ doc = p_document->get_current(); /* bail out if we don't have a document or if we are not in the editor widget */ focusw = gtk_window_get_focus(GTK_WINDOW(geany->main_widgets->window)); - if (doc == NULL || focusw != GTK_WIDGET(doc->sci)) + if (doc == NULL || focusw != GTK_WIDGET(doc->editor->sci)) return FALSE; if (ev->keyval == '\r' && - p_sci->send_message(doc->sci, SCI_GETEOLMODE, 0, 0) == SC_EOL_CRLF) + p_sci->send_message(doc->editor->sci, SCI_GETEOLMODE, 0, 0) == SC_EOL_CRLF) { /* prevent double line checking */ return FALSE; } - line_number = p_sci->get_current_line(doc->sci); + line_number = p_sci->get_current_line(doc->editor->sci); if (ev->keyval == '\n' || ev->keyval == '\r') line_number--; /* check previous line if we start a new one */ - line = p_sci->get_line(doc->sci, line_number); + line = p_sci->get_line(doc->editor->sci, line_number); clear_indicators_on_line(doc, line_number); if (process_line(doc, line_number, line) != 0) This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins: [119] trunk/geanylua
by ntrel@users.sourceforge.net
15 Jul '08
15 Jul '08
Revision: 119
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=119&view=rev
Author: ntrel Date: 2008-07-15 10:44:25 -0700 (Tue, 15 Jul 2008) Log Message: ----------- Fix for GeanyEditor changes. Modified Paths: -------------- trunk/geanylua/ChangeLog trunk/geanylua/glspi.h trunk/geanylua/glspi_app.c trunk/geanylua/glspi_doc.c trunk/geanylua/glspi_run.c trunk/geanylua/glspi_sci.c trunk/geanylua/glspi_ver.h Modified: trunk/geanylua/ChangeLog =================================================================== --- trunk/geanylua/ChangeLog 2008-07-12 11:54:09 UTC (rev 118) +++ trunk/geanylua/ChangeLog 2008-07-15 17:44:25 UTC (rev 119) @@ -1,3 +1,6 @@ +July 15, 2008 (ntrel) + Fix for GeanyEditor changes. + July 11, 2008 (ntrel) Use plugin_init(), plugin_cleanup(). Add macro for main_widgets, fix project access. Modified: trunk/geanylua/glspi.h =================================================================== --- trunk/geanylua/glspi.h 2008-07-12 11:54:09 UTC (rev 118) +++ trunk/geanylua/glspi.h 2008-07-15 17:44:25 UTC (rev 119) @@ -59,7 +59,7 @@ #define DOC_REQUIRED \ GeanyDocument *doc = p_document->get_current();\ - if (!(doc && doc->sci)) {return 0;} + if (!(doc && doc->is_valid)) {return 0;} #define SetTableValue(name,value,pusher) \ Modified: trunk/geanylua/glspi_app.c =================================================================== --- trunk/geanylua/glspi_app.c 2008-07-12 11:54:09 UTC (rev 118) +++ trunk/geanylua/glspi_app.c 2008-07-15 17:44:25 UTC (rev 119) @@ -12,6 +12,7 @@ #define NEED_FAIL_ARG_TYPE #include "glspi.h" +#include "editor.h" #include "templates.h" @@ -580,9 +581,9 @@ } if (prompt && doc && doc->is_valid ) { - gint fvl=sci_send_message(doc->sci,SCI_GETFIRSTVISIBLELINE, 0,0); - gint pos=p_sci->get_position_from_line(doc->sci, fvl+1); - sci_send_message(doc->sci,SCI_CALLTIPSHOW,pos+3, (gint)prompt); + gint fvl=sci_send_message(doc->editor->sci,SCI_GETFIRSTVISIBLELINE, 0,0); + gint pos=p_sci->get_position_from_line(doc->editor->sci, fvl+1); + sci_send_message(doc->editor->sci,SCI_CALLTIPSHOW,pos+3, (gint)prompt); } gdk_window_add_filter(main_widgets->window->window, keygrab_cb, &km); do { @@ -596,7 +597,7 @@ gdk_window_remove_filter(main_widgets->window->window, keygrab_cb, &km); if (prompt && doc && doc->is_valid) { - p_sci->send_command(doc->sci, SCI_CALLTIPCANCEL); + p_sci->send_command(doc->editor->sci, SCI_CALLTIPCANCEL); } km.group=0; /* reset the hijacked flag before passing to GDK */ lua_pushstring(L, gdk_keyval_name(gdk_keymap_lookup_key(NULL, &km))); Modified: trunk/geanylua/glspi_doc.c =================================================================== --- trunk/geanylua/glspi_doc.c 2008-07-12 11:54:09 UTC (rev 118) +++ trunk/geanylua/glspi_doc.c 2008-07-15 17:44:25 UTC (rev 119) @@ -7,8 +7,10 @@ #define NEED_FAIL_ARG_TYPES #include "glspi.h" +#include "editor.h" + #define DOCS ((GeanyDocument**)(documents_array->pdata)) #define NOTEBOOK GTK_NOTEBOOK(main_widgets->notebook) @@ -66,7 +68,7 @@ { return ( (idx>=0) && ((guint)idx<documents_array->len) && DOCS[idx]->is_valid - ) ? gtk_notebook_page_num(NOTEBOOK, GTK_WIDGET(DOCS[idx]->sci)):-1; + ) ? gtk_notebook_page_num(NOTEBOOK, GTK_WIDGET(DOCS[idx]->editor->sci)):-1; } Modified: trunk/geanylua/glspi_run.c =================================================================== --- trunk/geanylua/glspi_run.c 2008-07-12 11:54:09 UTC (rev 118) +++ trunk/geanylua/glspi_run.c 2008-07-15 17:44:25 UTC (rev 119) @@ -48,8 +48,8 @@ { GeanyDocument* doc=p_document->get_current(); if ( doc && doc->is_valid ) { - gdk_window_invalidate_rect(GTK_WIDGET(doc->sci)->window, NULL, TRUE); - gdk_window_process_updates(GTK_WIDGET(doc->sci)->window, TRUE); + gdk_window_invalidate_rect(GTK_WIDGET(doc->editor->sci)->window, NULL, TRUE); + gdk_window_process_updates(GTK_WIDGET(doc->editor->sci)->window, TRUE); } } @@ -84,7 +84,7 @@ GeanyDocument *doc=p_document->open_file(fn, FALSE, NULL, NULL); if (doc) { if (doc->is_valid) { - ScintillaObject*sci=doc->sci; + ScintillaObject*sci=doc->editor->sci; if (sci) { gint pos=p_sci->get_position_from_line(sci,line-1); p_sci->set_current_position(sci,pos,TRUE); Modified: trunk/geanylua/glspi_sci.c =================================================================== --- trunk/geanylua/glspi_sci.c 2008-07-12 11:54:09 UTC (rev 118) +++ trunk/geanylua/glspi_sci.c 2008-07-15 17:44:25 UTC (rev 119) @@ -21,13 +21,13 @@ GeanyDocument *doc = p_document->get_current(); - if ((!doc) || (!doc->sci)) { return 0; } + if (!doc) { return 0; } if (0 == lua_gettop(L)) { /* Called with no args, GET the current text */ - gint len = p_sci->get_length(doc->sci); + gint len = p_sci->get_length(doc->editor->sci); gchar *txt = NULL; if (len>0) { txt = g_malloc0((guint)len+2); - p_sci->get_text(doc->sci, len+1, txt); + p_sci->get_text(doc->editor->sci, len+1, txt); lua_pushstring(L, (const gchar *) txt); g_free(txt); } else { @@ -40,7 +40,7 @@ return FAIL_STRING_ARG(1); } txt = lua_tostring(L, 1); - p_sci->set_text(doc->sci, txt); + p_sci->set_text(doc->editor->sci, txt); return 0; } } @@ -52,11 +52,11 @@ DOC_REQUIRED if (0 == lua_gettop(L)) { /* Called with no args, GET the selection */ - gint len = p_sci->get_selected_text_length(doc->sci); + gint len = p_sci->get_selected_text_length(doc->editor->sci); gchar *txt = NULL; if (len>0) { txt = g_malloc0((guint)(len+1)); - p_sci->get_selected_text(doc->sci, txt); + p_sci->get_selected_text(doc->editor->sci, txt); lua_pushstring(L, (const gchar *) txt); g_free(txt); } else { @@ -67,7 +67,7 @@ const gchar*txt=NULL; if (!lua_isstring(L, 1)) { return FAIL_STRING_ARG(1); } txt = lua_tostring(L, 1); - p_sci->replace_sel(doc->sci, txt); + p_sci->replace_sel(doc->editor->sci, txt); return 0; } } @@ -82,7 +82,7 @@ gboolean rectsel=FALSE; DOC_REQUIRED if (0==argc) { - rectsel=sci_send_message(doc->sci, SCI_SELECTIONISRECTANGLE, 0, 0); + rectsel=sci_send_message(doc->editor->sci, SCI_SELECTIONISRECTANGLE, 0, 0); } lua_getglobal(L, LUA_MODULE_NAME); @@ -99,8 +99,8 @@ } } if (0==argc) { - sel_end=p_sci->get_current_position(doc->sci); - sel_start=sci_send_message(doc->sci, SCI_GETANCHOR, 0, 0); + sel_end=p_sci->get_current_position(doc->editor->sci); + sel_start=sci_send_message(doc->editor->sci, SCI_GETANCHOR, 0, 0); push_number(L, sel_start); push_number(L, sel_end); return 2; @@ -113,14 +113,14 @@ if (!lua_isnumber(L, 2)) { return FAIL_NUMERIC_ARG(2); } sel_end=lua_tonumber(L,2); } - sci_send_message(doc->sci, + sci_send_message(doc->editor->sci, SCI_SETSELECTIONMODE, rectsel?SC_SEL_RECTANGLE:SC_SEL_STREAM, 0); - p_sci->set_current_position(doc->sci, sel_end, FALSE); - sci_send_message(doc->sci, SCI_SETANCHOR, sel_start, 0); - p_sci->ensure_line_is_visible(doc->sci, - p_sci->get_line_from_position(doc->sci, sel_end)); - p_sci->scroll_caret(doc->sci); - sci_send_message(doc->sci, + p_sci->set_current_position(doc->editor->sci, sel_end, FALSE); + sci_send_message(doc->editor->sci, SCI_SETANCHOR, sel_start, 0); + p_sci->ensure_line_is_visible(doc->editor->sci, + p_sci->get_line_from_position(doc->editor->sci, sel_end)); + p_sci->scroll_caret(doc->editor->sci); + sci_send_message(doc->editor->sci, SCI_SETSELECTIONMODE, rectsel?SC_SEL_RECTANGLE:SC_SEL_STREAM, 0); return 0; } @@ -131,7 +131,7 @@ static gint glspi_height(lua_State* L) { DOC_REQUIRED - push_number(L, p_sci->get_line_count(doc->sci)); + push_number(L, p_sci->get_line_count(doc->editor->sci)); return 1; } @@ -140,7 +140,7 @@ static gint glspi_length(lua_State* L) { DOC_REQUIRED - push_number(L, p_sci->get_length(doc->sci)); + push_number(L, p_sci->get_length(doc->editor->sci)); return 1; } @@ -151,11 +151,11 @@ { DOC_REQUIRED if (lua_gettop(L)==0) { - push_number(L,p_sci->get_current_position(doc->sci)); + push_number(L,p_sci->get_current_position(doc->editor->sci)); return 1; } else { if (!lua_isnumber(L,1)) { return FAIL_NUMERIC_ARG(1); } - p_sci->set_current_position(doc->sci,(gint)lua_tonumber(L,1),TRUE); + p_sci->set_current_position(doc->editor->sci,(gint)lua_tonumber(L,1),TRUE); return 0; } } @@ -173,19 +173,19 @@ case 0: case 1: if (argc==0) { - pos=p_sci->get_current_position(doc->sci); + pos=p_sci->get_current_position(doc->editor->sci); } else { if (!lua_isnumber(L,1)) { return FAIL_NUMERIC_ARG(1); } pos=lua_tonumber(L,1); if ( pos < 0 ) { pos=0; } else { - len=p_sci->get_length(doc->sci); + len=p_sci->get_length(doc->editor->sci); if ( pos >= len ) { pos=len-1; } } } - line=p_sci->get_line_from_position(doc->sci,pos); - col=p_sci->get_col_from_position(doc->sci,pos); + line=p_sci->get_line_from_position(doc->editor->sci,pos); + col=p_sci->get_col_from_position(doc->editor->sci,pos); push_number(L,line+1); push_number(L,col); return 2; @@ -196,17 +196,17 @@ if ( line < 1 ) { line=1; } else { - cnt=p_sci->get_line_count(doc->sci); + cnt=p_sci->get_line_count(doc->editor->sci); if ( line > cnt ) { line=cnt; } } col=lua_tonumber(L,2); if ( col < 0 ) { col=0; } else { - len=p_sci->get_line_length(doc->sci,line); + len=p_sci->get_line_length(doc->editor->sci,line); if (col>=len) {col=len-1;} } - pos=p_sci->get_position_from_line(doc->sci,line-1)+col; + pos=p_sci->get_position_from_line(doc->editor->sci,line-1)+col; push_number(L,pos); return 1; } @@ -221,9 +221,9 @@ return FAIL_BOOL_ARG(1); } if (lua_toboolean(L,1)) { - p_sci->start_undo_action(doc->sci); + p_sci->start_undo_action(doc->editor->sci); } else { - p_sci->end_undo_action(doc->sci); + p_sci->end_undo_action(doc->editor->sci); } return 0; } @@ -241,13 +241,13 @@ if (!lua_isnumber(L,1)) { return FAIL_NUMERIC_ARG(1); } pos=lua_tonumber(L,1); } else { - pos = p_sci->get_current_position(doc->sci); + pos = p_sci->get_current_position(doc->editor->sci); } - linenum = p_sci->get_line_from_position(doc->sci, pos); - bol = p_sci->get_position_from_line(doc->sci, linenum); + linenum = p_sci->get_line_from_position(doc->editor->sci, pos); + bol = p_sci->get_position_from_line(doc->editor->sci, linenum); bow = pos - bol; eow = pos - bol; - text=p_sci->get_line(doc->sci, linenum); + text=p_sci->get_line(doc->editor->sci, linenum); lua_getglobal(L, LUA_MODULE_NAME); if ( lua_istable(L, -1) ) { lua_pushstring(L,tokenWordChars); @@ -278,9 +278,9 @@ */ static gchar* get_line_text(GeanyDocument*doc,gint linenum) { - gint count=p_sci->get_line_count(doc->sci); + gint count=p_sci->get_line_count(doc->editor->sci); if ((linenum>0)&&(linenum<=count)) { - gchar *text=p_sci->get_line(doc->sci, linenum-1); + gchar *text=p_sci->get_line(doc->editor->sci, linenum-1); return text?text:g_strdup(""); } else { return FALSE; @@ -435,7 +435,7 @@ } else { gint n; for (n=0; n<count; n++) { - p_sci->send_command(doc->sci,scicmd); + p_sci->send_command(doc->editor->sci,scicmd); } } return 0; @@ -461,17 +461,17 @@ switch (lua_gettop(L)) { case 0: - start=p_sci->get_selection_start(doc->sci); - stop=p_sci->get_selection_end(doc->sci); + start=p_sci->get_selection_start(doc->editor->sci); + stop=p_sci->get_selection_end(doc->editor->sci); if (start>stop) { swap(&start,&stop); } - if (start!=stop) p_sci->send_command(doc->sci, SCI_COPY); + if (start!=stop) p_sci->send_command(doc->editor->sci, SCI_COPY); push_number(L, stop-start); return 1; case 1: if (!lua_isstring(L,1)) {return FAIL_STRING_ARG(1);} content=lua_tostring(L,1); len=strlen(content); - if (len) { sci_send_message(doc->sci,SCI_COPYTEXT,len,(gint)content); } + if (len) { sci_send_message(doc->editor->sci,SCI_COPYTEXT,len,(gint)content); } push_number(L, len); return 1; default: @@ -482,7 +482,7 @@ if (start<0) { return FAIL_UNSIGNED_ARG(1); } if (stop <0) { return FAIL_UNSIGNED_ARG(2); } if (start>stop) { swap(&start,&stop); } - if (start!=stop) sci_send_message(doc->sci,SCI_COPYRANGE,start,stop); + if (start!=stop) sci_send_message(doc->editor->sci,SCI_COPYRANGE,start,stop); push_number(L, stop-start); return 1; } @@ -494,12 +494,12 @@ { gint start,stop,len; DOC_REQUIRED - start=p_sci->get_selection_start(doc->sci); - stop=p_sci->get_selection_end(doc->sci); - len=p_sci->get_length(doc->sci); + start=p_sci->get_selection_start(doc->editor->sci); + stop=p_sci->get_selection_end(doc->editor->sci); + len=p_sci->get_length(doc->editor->sci); if (start>stop) {swap(&start,&stop); } - if (start!=stop) {p_sci->send_command(doc->sci, SCI_CUT); } - push_number(L,len-p_sci->get_length(doc->sci)); + if (start!=stop) {p_sci->send_command(doc->editor->sci, SCI_CUT); } + push_number(L,len-p_sci->get_length(doc->editor->sci)); return 1; } @@ -510,10 +510,10 @@ static gint glspi_paste(lua_State* L) { DOC_REQUIRED - if (sci_send_message(doc->sci,SCI_CANPASTE,0,0)) { - gint len=p_sci->get_length(doc->sci); - p_sci->send_command(doc->sci,SCI_PASTE); - push_number(L,p_sci->get_length(doc->sci)-len); + if (sci_send_message(doc->editor->sci,SCI_CANPASTE,0,0)) { + gint len=p_sci->get_length(doc->editor->sci); + p_sci->send_command(doc->editor->sci,SCI_PASTE); + push_number(L,p_sci->get_length(doc->editor->sci)-len); } else { lua_pushnil(L); } @@ -527,12 +527,12 @@ gint pos; DOC_REQUIRED if (lua_gettop(L)==0) { - pos=p_sci->get_current_position(doc->sci); + pos=p_sci->get_current_position(doc->editor->sci); } else { if ( !lua_isnumber(L,1) ) {return FAIL_NUMERIC_ARG(1);} pos=lua_tonumber(L,1); } - push_number(L,p_sci->find_bracematch(doc->sci,pos)); + push_number(L,p_sci->find_bracematch(doc->editor->sci,pos)); return 1; } @@ -544,12 +544,12 @@ gint pos; DOC_REQUIRED if (lua_gettop(L)==0) { - pos=p_sci->get_current_position(doc->sci); + pos=p_sci->get_current_position(doc->editor->sci); } else { if ( !lua_isnumber(L,1) ) {return FAIL_NUMERIC_ARG(1);} pos=lua_tonumber(L,1); } - push_number(L,p_sci->get_char_at(doc->sci,pos)); + push_number(L,p_sci->get_char_at(doc->editor->sci,pos)); return 1; } @@ -709,19 +709,19 @@ case SLT_TEXTRANGE: return FAIL_API; case SLT_STRINGRESULT: if ((he->msgid==SCI_GETTEXT)&&(wparam==0)) { - wparam=sci_send_message(doc->sci, SCI_GETLENGTH, 0,0); + wparam=sci_send_message(doc->editor->sci, SCI_GETLENGTH, 0,0); } switch (he->msgid) { case SCI_GETTEXT: if (wparam==0){ - wparam=sci_send_message(doc->sci, SCI_GETLENGTH, 0,0); + wparam=sci_send_message(doc->editor->sci, SCI_GETLENGTH, 0,0); } else { wparam++; } break; case SCI_GETCURLINE: if (wparam>0) { wparam++; } break; } - bufsize=sci_send_message(doc->sci, he->msgid, wparam, 0); + bufsize=sci_send_message(doc->editor->sci, he->msgid, wparam, 0); if (bufsize) { resultbuf=g_malloc0((guint)(bufsize+1)); lparam=GPOINTER_TO_INT(resultbuf); @@ -736,20 +736,20 @@ } switch (he->result) { case SLT_VOID: - sci_send_message(doc->sci, he->msgid, wparam, lparam); + sci_send_message(doc->editor->sci, he->msgid, wparam, lparam); lua_pushnil(L); return 1; case SLT_INT: if (he->lparam==SLT_STRINGRESULT) { - sci_send_message(doc->sci, he->msgid, wparam, lparam); + sci_send_message(doc->editor->sci, he->msgid, wparam, lparam); lua_pushstring(L,resultbuf); g_free(resultbuf); } else { - push_number(L, sci_send_message(doc->sci, he->msgid, wparam, lparam)); + push_number(L, sci_send_message(doc->editor->sci, he->msgid, wparam, lparam)); } return 1; case SLT_BOOL: - lua_pushboolean(L, sci_send_message(doc->sci, he->msgid, wparam, lparam)); + lua_pushboolean(L, sci_send_message(doc->editor->sci, he->msgid, wparam, lparam)); return 1; default:return FAIL_API; } @@ -805,7 +805,7 @@ lua_pop(L, 1); } - if (sci_send_message(doc->sci,SCI_FINDTEXT,flags,GPOINTER_TO_INT(&ttf))!=-1) { + if (sci_send_message(doc->editor->sci,SCI_FINDTEXT,flags,GPOINTER_TO_INT(&ttf))!=-1) { push_number(L,ttf.chrgText.cpMin); push_number(L,ttf.chrgText.cpMax); g_free(ttf.lpstrText); Modified: trunk/geanylua/glspi_ver.h =================================================================== --- trunk/geanylua/glspi_ver.h 2008-07-12 11:54:09 UTC (rev 118) +++ trunk/geanylua/glspi_ver.h 2008-07-15 17:44:25 UTC (rev 119) @@ -14,7 +14,7 @@ #define PLUGIN_AUTHOR "Jeff Pohlmeyer" -#define MY_GEANY_API_VER 75 +#define MY_GEANY_API_VER 78 #define LUA_MODULE_NAME "geany" This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins: [118] trunk/instantsave
by eht16@users.sourceforge.net
12 Jul '08
12 Jul '08
Revision: 118
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=118&view=rev
Author: eht16 Date: 2008-07-12 04:54:09 -0700 (Sat, 12 Jul 2008) Log Message: ----------- Update to Geany API 75. Modified Paths: -------------- trunk/instantsave/ChangeLog trunk/instantsave/src/instantsave.c Modified: trunk/instantsave/ChangeLog =================================================================== --- trunk/instantsave/ChangeLog 2008-07-12 11:53:46 UTC (rev 117) +++ trunk/instantsave/ChangeLog 2008-07-12 11:54:09 UTC (rev 118) @@ -1,3 +1,9 @@ +2008-07-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/instantsave.c: + Update to Geany API 75. + + 2008-06-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> * src/instantsave.c: Modified: trunk/instantsave/src/instantsave.c =================================================================== --- trunk/instantsave/src/instantsave.c 2008-07-12 11:53:46 UTC (rev 117) +++ trunk/instantsave/src/instantsave.c 2008-07-12 11:54:09 UTC (rev 118) @@ -44,7 +44,7 @@ GeanyFunctions *geany_functions; -PLUGIN_VERSION_CHECK(71) +PLUGIN_VERSION_CHECK(75) PLUGIN_SET_INFO(_("Instant Save"), _("Save instantly new files without an explicit Save As dialog."), "0.2", "Enrico Tröger") @@ -151,7 +151,7 @@ void plugin_init(GeanyData *data) { GKeyFile *config = g_key_file_new(); - config_file = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, + config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, "instantsave", G_DIR_SEPARATOR_S, "instantsave.conf", NULL); g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL); This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins: [117] trunk/backupcopy
by eht16@users.sourceforge.net
12 Jul '08
12 Jul '08
Revision: 117
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=117&view=rev
Author: eht16 Date: 2008-07-12 04:53:46 -0700 (Sat, 12 Jul 2008) Log Message: ----------- Update to Geany API 75. Modified Paths: -------------- trunk/backupcopy/ChangeLog trunk/backupcopy/src/backupcopy.c Modified: trunk/backupcopy/ChangeLog =================================================================== --- trunk/backupcopy/ChangeLog 2008-07-12 11:50:18 UTC (rev 116) +++ trunk/backupcopy/ChangeLog 2008-07-12 11:53:46 UTC (rev 117) @@ -1,3 +1,9 @@ +2008-07-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/backupcopy.c: + Update to Geany API 75. + + 2008-06-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> * src/backupcopy.c: Modified: trunk/backupcopy/src/backupcopy.c =================================================================== --- trunk/backupcopy/src/backupcopy.c 2008-07-12 11:50:18 UTC (rev 116) +++ trunk/backupcopy/src/backupcopy.c 2008-07-12 11:53:46 UTC (rev 117) @@ -47,7 +47,7 @@ GeanyFunctions *geany_functions; -PLUGIN_VERSION_CHECK(71) +PLUGIN_VERSION_CHECK(75) PLUGIN_SET_INFO(_("Backup Copy"), _("Creates a backup of the current file when saving"), "0.2", "Enrico Tröger") @@ -246,7 +246,7 @@ { GKeyFile *config = g_key_file_new(); gchar *tmp; - config_file = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, + config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, "backupcopy", G_DIR_SEPARATOR_S, "backupcopy.conf", NULL); backup_dir = NULL; This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
← Newer
1
2
3
4
Older →
Jump to page:
1
2
3
4
Results per page:
10
25
50
100
200