Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 16 Jan 2016 21:50:05 UTC Commit: e052cc3718dd638a443f67f9a18c41396ca37f49 https://github.com/geany/geany-plugins/commit/e052cc3718dd638a443f67f9a18c41...
Log Message: ----------- geniuspaste: Remove unused code
Modified Paths: -------------- geniuspaste/src/geniuspaste.c
Modified: geniuspaste/src/geniuspaste.c 12 lines changed, 3 insertions(+), 9 deletions(-) =================================================================== @@ -322,25 +322,20 @@ static void save_settings(void) g_key_file_free(config); }
-static gchar *get_paste_text(GeanyDocument *doc, gsize *text_len) +static gchar *get_paste_text(GeanyDocument *doc) { - gsize len; gchar *paste_text;
if (sci_has_selection(doc->editor->sci)) { - len = sci_get_selected_text_length(doc->editor->sci) + 1; paste_text = sci_get_selection_contents(doc->editor->sci); } else { - len = sci_get_length(doc->editor->sci) + 1; + gint len = sci_get_length(doc->editor->sci) + 1; paste_text = sci_get_contents(doc->editor->sci, len); }
- if (text_len) - *text_len = len; - return paste_text; }
@@ -607,7 +602,6 @@ static void paste(GeanyDocument * doc, const gchar * website) { const Pastebin *pastebin; gchar *f_content; - gsize f_length; SoupSession *session; SoupMessage *msg; gchar *user_agent = NULL; @@ -630,7 +624,7 @@ static void paste(GeanyDocument * doc, const gchar * website) }
/* get the contents */ - f_content = get_paste_text(doc, &f_length); + f_content = get_paste_text(doc); if (f_content == NULL || f_content[0] == '\0') { dialogs_show_msgbox(GTK_MESSAGE_ERROR, _("Refusing to create blank paste"));
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org