Skip to content

Commit

Permalink
addons: Drop use of the most obvious deprecated Geany API
Browse files Browse the repository at this point in the history
  • Loading branch information
b4n committed Feb 20, 2016
1 parent 47d07f6 commit f28010e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 5 additions & 5 deletions addons/src/addons.c
Expand Up @@ -463,17 +463,17 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
g_signal_connect(check_doclist, "toggled", G_CALLBACK(ao_configure_doclist_toggled_cb), dialog);

radio_doclist_name = gtk_radio_button_new_with_mnemonic(NULL, _("Sort documents by _name"));
ui_widget_set_tooltip_text(radio_doclist_name,
gtk_widget_set_tooltip_text(radio_doclist_name,
_("Sort the documents in the list by their filename"));

radio_doclist_tab_order = gtk_radio_button_new_with_mnemonic_from_widget(
GTK_RADIO_BUTTON(radio_doclist_name), _("Sort documents by _occurrence"));
ui_widget_set_tooltip_text(radio_doclist_tab_order,
gtk_widget_set_tooltip_text(radio_doclist_tab_order,
_("Sort the documents in the order of the document tabs"));

radio_doclist_tab_order_reversed = gtk_radio_button_new_with_mnemonic_from_widget(
GTK_RADIO_BUTTON(radio_doclist_name), _("Sort documents by _occurrence (reversed)"));
ui_widget_set_tooltip_text(radio_doclist_tab_order_reversed,
gtk_widget_set_tooltip_text(radio_doclist_tab_order_reversed,
_("Sort the documents in the order of the document tabs (reversed)"));

switch (ao_info->doclist_sort_mode)
Expand Down Expand Up @@ -516,14 +516,14 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
_("Show tasks of all documents"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_tasks_scan_mode),
ao_info->tasks_scan_all_documents);
ui_widget_set_tooltip_text(check_tasks_scan_mode,
gtk_widget_set_tooltip_text(check_tasks_scan_mode,
_("Whether to show the tasks of all open documents in the list or only those of the current document."));

entry_tasks_tokens = gtk_entry_new();
if (!EMPTY(ao_info->tasks_token_list))
gtk_entry_set_text(GTK_ENTRY(entry_tasks_tokens), ao_info->tasks_token_list);
ui_entry_add_clear_icon(GTK_ENTRY(entry_tasks_tokens));
ui_widget_set_tooltip_text(entry_tasks_tokens,
gtk_widget_set_tooltip_text(entry_tasks_tokens,
_("Specify a semicolon separated list of search tokens."));

label_tasks_tokens = gtk_label_new_with_mnemonic(_("Search tokens:"));
Expand Down
6 changes: 1 addition & 5 deletions addons/src/ao_openuri.c
Expand Up @@ -244,11 +244,7 @@ void ao_open_uri_update_menu(AoOpenUri *openuri, GeanyDocument *doc, gint pos)

/* if we have a selection, prefer it over the current word */
if (sci_has_selection(doc->editor->sci))
{
gint len = sci_get_selected_text_length(doc->editor->sci);
text = g_malloc0((guint)len + 1);
sci_get_selected_text(doc->editor->sci, text);
}
text = sci_get_selection_contents(doc->editor->sci);
else
text = editor_get_word_at_pos(doc->editor, pos, GEANY_WORDCHARS"@.://-?&%#=~+,;");

Expand Down

0 comments on commit f28010e

Please sign in to comment.