summary refs log tree commit diff stats
path: root/win32
AgeCommit message (Expand)Author
2012-07-21Add trailing backslashes to Output and Intermediate directories, make Visual ...Berke Viktor
2012-07-18A decent WizardImage for the installerBerke Viktor
2012-07-16Update logos thanks to TingPing, now only WizardImage is leftBerke Viktor
2012-07-16Use highest compression available, it actually speeds up compression and slig...Berke Viktor
2012-07-14Ultra compression slows down compilation but doesn't really reduce the size, ...Berke Viktor
2012-07-14win32/nls/nls.vcxproj: get rid of unused elementsxhmikosr
2012-07-14remove trailing spacexhmikosr
2012-07-14installer: use lzma2/ultra compressionxhmikosr
2012-07-14get rid of *.user files and ignore themxhmikosr
2012-07-14Remove migratorsBerke Viktor
2012-07-14Add installers for migrating from XChat-WDKBerke Viktor
2012-07-13Rename DLL files, rename X-SASL to SASLBerke Viktor
2012-07-13Rename X-Tray to HexTrayBerke Viktor
2012-07-13Update theme extensions in the installer, tooBerke Viktor
2012-07-13Remove the last remnants of XChat-WDKBerke Viktor
2012-07-13Another bunch of rebranding stuffBerke Viktor
2012-07-13Rename XTM to HTMBerke Viktor
2012-07-12Fix NLSBerke Viktor
2012-07-11Rebranding on the file levelBerke Viktor
2012-07-11Fix Perl 5.16 installation in x64 installerBerke Viktor
2012-06-17Another bunch of fixes and additions to the XTMBerke Viktor
2012-06-17Add XChat Theme Manager (TingPing)Patrick Griffs
2012-06-15Add .user files and .gitignoreBerke Viktor
2012-06-15Add x64 support to the VS solutionBerke Viktor
2012-06-15Update paths for x64 installer tooBerke Viktor
2012-06-15Use nicer default dependency pathsBerke Viktor
2012-06-15First bunch of cleanupsBerke Viktor
2012-06-15LOTS of fixes to the VS solutionBerke Viktor
2012-06-10Add projects for making the installerBerke Viktor
2012-06-10Add WMPA as wellBerke Viktor
2012-06-10Add all plugins to solution except WMPABerke Viktor
2012-06-10More solution fixes and add language interfacesBerke Viktor
2012-06-10Shorten folder nameBerke Viktor
2012-06-10Add files required for the WDK7 platform toolset used by the VS solutionBerke Viktor
2012-06-10Migrate VS solution to VS2010+WDK7Berke Viktor
2012-06-03Solution fixes, debug config and x64 platformBerke Viktor
2012-06-03Use Tor's proxy-libintl with VSBerke Viktor
2012-06-03Initial Visual Studio solutionBerke Viktor
2012-05-13overwrite 7z items as well and delete ATK translations tooBerke Viktor
2012-05-13Update OpenSSL to 1.0.1cBerke Viktor
2012-05-04update openssl to 1.0.1bBerke Viktor
2012-03-15update openssl depsBerke Viktor
2012-03-15update openssl to 1.0.1Berke Viktor
2012-01-20add DNS pluginBerke Viktor
2012-01-20update openssl to 1.0.0gBerke Viktor
2012-01-20disable the non-bmp pluginBerke Viktor
2012-01-18install nonbmp by defaultBerke Viktor
2012-01-18add Non-BMP plugin against GTK+ exploitsBerke Viktor
2012-01-11some more xsasl cosmeticsBerke Viktor
2012-01-10update Lua-WDK to 5.2Berke Viktor
blished 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "fe-gtk.h" #include <gtk/gtkhbox.h> #include <gtk/gtkstock.h> #include <gtk/gtkhbbox.h> #include <gtk/gtkscrolledwindow.h> #include <gtk/gtkliststore.h> #include <gtk/gtktreeview.h> #include <gtk/gtktreeselection.h> #include <gtk/gtkcellrenderertext.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; if (!event || !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, get_xdir (), NULL, FRF_WRITE|FRF_FILTERISINITIAL); } 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); 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."); } }