Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Thu, 09 Jun 2016 09:47:55 UTC Commit: 048c1e1aa41ac19a0a4131bd3e80b96423e46839 https://github.com/geany/geany-plugins/commit/048c1e1aa41ac19a0a4131bd3e80b9...
Log Message: ----------- Merge pull request #360 from b4n/geanyminiscript/less-deprecated
geanyminiscript: Drop use of the most obvious deprecated Geany API
Modified Paths: -------------- geanyminiscript/src/gms.c
Modified: geanyminiscript/src/gms.c 10 lines changed, 4 insertions(+), 6 deletions(-) =================================================================== @@ -68,14 +68,10 @@ static gchar *gms_command = NULL ; */ static void create_selection_2_input_file( ScintillaObject *sci ) { - gchar *contents = NULL; - gint size_buf = sci_get_selected_text_length(sci); + gchar *contents = sci_get_selection_contents(sci);
- contents = GMS_G_MALLOC( gchar, size_buf + 1 ) ; GMS_PNULL(contents) ;
- sci_get_selected_text( sci ,contents ); - g_file_set_contents(gms_get_in_filename(gms_hnd), contents, -1 , NULL ); GMS_G_FREE(contents); } @@ -238,9 +234,11 @@ static void item_activate(GtkMenuItem *menuitem, gpointer gdata) */ void plugin_init(GeanyData *data) { + const GeanyIndentPrefs *iprefs = editor_get_indent_prefs(NULL); + gms_hnd = gms_new(geany->main_widgets->window, data->interface_prefs->editor_font , - data->editor_prefs->indentation->width, + iprefs->width, geany->app->configdir ) ;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org