summary refs log tree commit diff stats
path: root/plugins/fishlim
AgeCommit message (Expand)Author
2021-10-01win32: Update to OpenSSL 1.1Patrick Griffis
2021-07-15fish: Misc test cleanupsPatrick Griffis
2021-06-19Replace identify-msg support with solanum.chat/identify-msg.Sadie Powell
2021-05-23Updated Toolset to v142DjLegolas
2020-10-16fishlim: Implement correct handling of long and UTF-8 messagesBakasuraRCE
2020-10-16fishlim: Remove needless headerBakasuraRCE
2020-10-16fishlim: Remove compiler warningsBakasuraRCE
2020-10-16fishlim: Remove needless functions for testsBakasuraRCE
2020-10-16fishlim: Fix resultBakasuraRCE
2020-10-16fishlim: Fix castBakasuraRCE
2020-07-13FiSHLiM: Support for CBC mode + more commands (#2347)Bakasura
2018-02-18fishlim: Fix build warningPatrick Griffis
2017-06-15Hide false-positive deprecated warningPatrick Griffis
2017-06-13build: Replace Autotools with MesonPatrick Griffis
2017-03-30Fix key exchangeeimmot
2017-01-05fishlim: Fix not including config.hPatrick Griffis
2016-12-13Fix building fishlim against libressl alsoPatrick Griffis
2016-11-28Fix typos s/Recieved/Received/Mattia Rizzolo
2016-10-23Final fixup of OpenSSL 1.1.0 changesPatrick Griffis
2016-10-11fishlim: Fix MEMZERO macro using element number not bytesIgor
2016-10-08fishlim: Bump versionPatrick Griffis
2016-10-08fishlim: Remove outdated INSTALL filePatrick Griffis
2016-10-08fishlim: Fix saving nicks containing [ or ]Patrick Griffis
2016-10-08fishlim: Add support for the /me commandGroil
2016-10-08fishlim: Add commands /topic+ /msg+ and /notice+cypherpunk
2016-10-08fishlim: Add /keyx for DH1080 key exchangePatrick Griffis
2016-09-26build: Reorder includes to avoid installed plugin headerRainer Müller
2016-02-18Fix strict prototype warningsPatrick Griffis
2015-10-16build: Let 'make dist' do a better jobRico Tzschichholz
2015-10-10Use VS 2015Arnavion
2015-04-23Remove unused fileTingPing
2015-02-11Better project files.Arnavion
2014-12-28Fix building as c89TingPing
2014-12-28Use glib for allocations in all pluginsTingPing
2014-12-17More consistently include config.hTingPing
2014-12-15Don't require glib 2.40TingPing
2014-12-15fishlim: Handle server-timeTingPing
2014-12-15fishlim: Use proper filesystem encoding for filesTingPing
2014-12-15fishlim: Use standard keyfile save functionTingPing
2014-12-15fishlim: Strip whitespace when deleting keysTingPing
2014-12-15fishlim: Use hexchat_nickcmp()TingPing
2014-12-15fishlim: Improve string handlingTingPing
2014-12-15configure: Improve various build flagsTingPing
2014-07-18Fix formatting warningsTingPing
2014-06-02fishlim: Fix filename in error messagesTingPing
2014-06-02Handle a special character before "+OK", e.g. identify-msg + or -Samuel Lidén Borell
2014-06-02Use path to HexChat instead of XChat in the test programSamuel Lidén Borell
2014-06-02Add missing include in the test programSamuel Lidén Borell
2014-06-02Fix memory leak in the test programSamuel Lidén Borell
2014-06-02Fix undefined behaviour in left shiftSamuel Lidén Borell
998 Peter Zelezny. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "fe-gtk.h" #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "../common/cfgfiles.h" #include "../common/fe.h" #include "../common/url.h" #include "../common/tree.h" #include "gtkutil.h" #include "menu.h" #include "maingui.h" #include "urlgrab.h" /* model for the URL treeview */ enum { URL_COLUMN, N_COLUMNS }; static GtkWidget *urlgrabberwindow = 0; static gboolean url_treeview_url_clicked_cb (GtkWidget *view, GdkEventButton *event, gpointer data) { GtkTreeIter iter; gchar *url; GtkTreeSelection *sel; GtkTreePath *path; GtkTreeView *tree = GTK_TREE_VIEW (view); if (!event || !gtk_tree_view_get_path_at_pos (tree, event->x, event->y, &path, 0, 0, 0)) return FALSE; /* select what they right-clicked on */ sel = gtk_tree_view_get_selection (tree); gtk_tree_selection_unselect_all (sel); gtk_tree_selection_select_path (sel, path); gtk_tree_path_free (path); if (!gtkutil_treeview_get_selected (GTK_TREE_VIEW (view), &iter, URL_COLUMN, &url, -1)) return FALSE; switch (event->button) { case 1: if (event->type == GDK_2BUTTON_PRESS) fe_open_url (url); break; case 3: menu_urlmenu (event, url); break; default: break; } g_free (url); return FALSE; } static GtkWidget * url_treeview_new (GtkWidget *box) { GtkListStore *store; GtkWidget *view; store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING); g_return_val_if_fail (store != NULL, NULL); view = gtkutil_treeview_new (box, GTK_TREE_MODEL (store), NULL, URL_COLUMN, _("URL"), -1); g_signal_connect (G_OBJECT (view), "button_press_event", G_CALLBACK (url_treeview_url_clicked_cb), NULL); /* don't want column headers */ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE); gtk_widget_show (view); return view; } static void url_closegui (GtkWidget *wid, gpointer userdata) { urlgrabberwindow = 0; } static void url_button_clear (void) { GtkListStore *store; url_clear (); store = GTK_LIST_STORE (g_object_get_data (G_OBJECT (urlgrabberwindow), "model")); gtk_list_store_clear (store); } static void url_button_copy (GtkWidget *widget, gpointer data) { GtkTreeView *view = GTK_TREE_VIEW (data); GtkTreeIter iter; gchar *url = NULL; if (gtkutil_treeview_get_selected (view, &iter, URL_COLUMN, &url, -1)) { gtkutil_copy_to_clipboard (GTK_WIDGET (view), NULL, url); g_free (url); } } static void url_save_callback (void *arg1, char *file) { if (file) { url_save_tree (file, "w", TRUE); } } static void url_button_save (void) { gtkutil_file_req (_("Select an output filename"), url_save_callback, NULL, NULL, NULL, FRF_WRITE); } void fe_url_add (const char *urltext) { GtkListStore *store; GtkTreeIter iter; gboolean valid; if (urlgrabberwindow) { store = GTK_LIST_STORE (g_object_get_data (G_OBJECT (urlgrabberwindow), "model")); gtk_list_store_prepend (store, &iter); gtk_list_store_set (store, &iter, URL_COLUMN, urltext, -1); /* remove any overflow */ if (prefs.hex_url_grabber_limit > 0) { valid = gtk_tree_model_iter_nth_child ( GTK_TREE_MODEL (store), &iter, NULL, prefs.hex_url_grabber_limit); while (valid) valid = gtk_list_store_remove (store, &iter); } } } static int populate_cb (char *urltext, gpointer userdata) { fe_url_add (urltext); return TRUE; } void url_opengui () { GtkWidget *vbox, *hbox, *view; if (urlgrabberwindow) { mg_bring_tofront (urlgrabberwindow); return; } urlgrabberwindow = mg_create_generic_tab ("UrlGrabber", _(DISPLAY_NAME": URL Grabber"), FALSE, TRUE, url_closegui, NULL, 400, 256, &vbox, 0); gtkutil_destroy_on_esc (urlgrabberwindow); view = url_treeview_new (vbox); g_object_set_data (G_OBJECT (urlgrabberwindow), "model", gtk_tree_view_get_model (GTK_TREE_VIEW (view))); hbox = gtk_hbutton_box_new (); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 0); gtk_widget_show (hbox); gtkutil_button (hbox, GTK_STOCK_CLEAR, _("Clear list"), url_button_clear, 0, _("Clear")); gtkutil_button (hbox, GTK_STOCK_COPY, _("Copy selected URL"), url_button_copy, view, _("Copy")); gtkutil_button (hbox, GTK_STOCK_SAVE_AS, _("Save list to a file"), url_button_save, 0, _("Save As...")); gtk_widget_show (urlgrabberwindow); if (prefs.hex_url_grabber) tree_foreach (url_tree, (tree_traverse_func *)populate_cb, NULL); else { gtk_list_store_clear (GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (view)))); fe_url_add ("URL Grabber is disabled."); } }