Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addons: Drop use of the most obvious deprecated Geany API #354

Merged
merged 1 commit into from
Feb 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions addons/src/addons.c
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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