summary refs log blame commit diff stats
path: root/src/fe-gtk/gtkutil.h
blob: 0aa364397feff508978c1c7b6785800a47527950 (plain) (tree)


















                                                                            


                         
                    
                         


                                                     
                                                                                                                     
                                                          
                                             




                                      
/* HexChat
 * Copyright (C) 1998-2010 Peter Zelezny.
 * Copyright (C) 2009-2013 Berke Viktor.
 *
 * 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
 */

#ifndef HEXCHAT_GTKUTIL_H
#define HEXCHAT_GTKUTIL_H

#include <gtk/gtk.h>
#include "../common/fe.h"

typedef void (*filereqcallback) (void *, char *file);

void gtkutil_file_req (const char *title, void *callback, void *userdata, char *filter, char *extensions, int flags);
void gtkutil_destroy (GtkWidget * igad, GtkWidget * dgad);
void gtkutil_destroy_on_esc (GtkWidget *win);
GtkWidget *gtkutil_button (GtkWidget *box, char *stock, char *tip, void *callback,
				 void *userdata, char *labeltext);
void gtkutil_label_new (char *text, GtkWidget * box);
GtkWidget *gtkutil_entry_new (int max, GtkWidget * box, void *callback,
										gpointer userdata);
void show_and_unfocus (GtkWidget * wid);
void gtkutil_set_icon (GtkWidget *win);
GtkWidget *gtkutil_window_new (char *title, char *role, int width, int height, int flags);
void gtkutil_copy_to_clipboard (GtkWidget *widget, GdkAtom selection,
                                const gchar *str);
GtkWidget *gtkutil_treeview_new (GtkWidget *box, GtkTreeModel *model,
                                 GtkTreeCellDataFunc mapper, ...);
gboolean gtkutil_treemodel_string_to_iter (GtkTreeModel *model, gchar *pathstr, GtkTreeIter *iter_ret);
gboolean gtkutil_treeview_get_selected_iter (GtkTreeView *view, GtkTreeIter *iter_ret);
gboolean gtkutil_treeview_get_selected (GtkTreeView *view, GtkTreeIter *iter_ret, ...);
gboolean gtkutil_tray_icon_supported (GtkWindow *window);

#if defined (WIN32) || defined (__APPLE__)
gboolean gtkutil_find_font (const char *fontname);
#endif

#endif
s options. ### Where are the log files saved to? * Unix/Linux > ~/.config/hexchat/logs * Windows > %APPDATA%\\HexChat\\logs ### How do I rotate log files every so often? By default settings, no rotation occurs, your log files will just keep getting larger. Go to _Settings_ `->` _Preferences_ `->` _Logging_ and change the log filename to any one of these: > %Y-%m-%d/%n-%c.log ->2006-12-30/FreeNode-\#channel.log > > %n/%Y-%m-%d/%c.log ->FreeNode/2006-12-30/\#channel.log > > %n/%c.log -> FreeNode/\#channel.log (no rotation) %Y, %m and %d represents the current year, month and day respectively. %n is the network name, e.g. "FreeNode" or "UnderNet", and finally, %c is the channel. In these examples, a new log filename and folder would be created after midnight. You can find more possibilities at [http://xchat.org/docs/log/](http://xchat.org/docs/log/). ### Where did the Real Name field go? The real name field is now removed from the Network List. This is in order to avoid alienating newcomers (some might be afraid of their personal data). The network-specific real name can still be set via the GUI. If you want to modify the global real name, just issue the following command: > /set irc\_real\_name Stewie Griffin ### How do I migrate my settings from XChat? * UNIX/Linux > 1. Copy ~/.xchat2 to ~/.config/hexchat > 2. Rename ~/.config/hexchat/xchat.conf to ~/.config/hexchat/hexchat.conf > 3. Rename ~/.config/hexchat/xchatlogs to ~/.config/hexchat/logs > 4. Move all your 3rd party addons to ~/.config/hexchat/addons > 5. Rename ~/.config/hexchat/plugin\_\*.conf to ~/.config/hexchat/addon\_\*.conf * Windows > 1. Copy %APPDATA%\\X-Chat 2 to %APPDATA%\\HexChat > 2. Rename %APPDATA%\\HexChat\\xchat.conf to %APPDATA%\\HexChat\\hexchat.conf > 3. Rename %APPDATA%\\HexChat\\xchatlogs to %APPDATA%\\HexChat\\logs > 4. Move all your 3rd party addons to %APPDATA%\\HexChat\\addons > 5. Rename %APPDATA%\\HexChat\\plugin\_\*.conf to %APPDATA%\\HexChat\\addon\_\*.conf ## Contributions, Development and Bugs. ### I found a bug, what can I do? Firstly, make sure it's the latest stable version of HexChat. If you still experience issues, you can search for the issue on [GitHub](https://github.com/hexchat/hexchat/issues?state=open) if it has not been reported open an issue with as much detail as possible. ### Can I write a new language translation for HexChat? You sure can, but I don't accept translations directly. They must be done through the [Transifex Project](https://www.transifex.com/projects/p/hexchat/). You simply register on the site, then you can apply for membership in a translation team via the web interface. Approvals are done manually so it might take a few days for you to be approved. Also bear in mind that the email address with which you register on Transifex will be visible in the translation files. If you want to test your translation in action: * Download your translation from Transifex * Open the downloaded _.po_ file with [Poedit](http://www.poedit.net/) * Simply press _Save_ in Poedit, which causes it to generate a _.mo_ file next to the _.po_ file * Copy the generated _.mo_ file to _HexChat \ locale \ &lt;language code> \ LC\_MESSAGES \ hexchat.mo_ * Restart HexChat *** For pretty html: `pandoc --toc -s faq.md -o faq.html`