1
## Description: add some description
2
## Origin/Author: add some origin or author
4
=== modified file 'src/fe-gtk/fe-gtk.c'
5
--- src/fe-gtk/fe-gtk.c 2008-04-16 16:18:43 +0000
6
+++ src/fe-gtk/fe-gtk.c 2014-04-28 12:09:59 +0000
8
#include <gtk/gtktogglebutton.h>
9
#include <gtk/gtkmessagedialog.h>
10
#include <gtk/gtkversion.h>
13
#include "../common/xchat.h"
14
#include "../common/fe.h"
20
+static gboolean colors_changed_apply(gpointer data) {
22
+ setup_apply_real (TRUE, TRUE, TRUE);
24
+ return G_SOURCE_REMOVE;
27
+static void colors_changed(GFileMonitor *monitor,
30
+ GFileMonitorEvent event_type,
31
+ gpointer user_data) {
35
+ GSource *s = g_main_context_find_source_by_id(NULL, t);
37
+ g_source_destroy(s);
40
+ t = g_timeout_add(10, colors_changed_apply, NULL);
52
channelwin_pix = pixmap_load_from_file (prefs.background);
53
input_style = create_input_style (gtk_style_new ());
55
+ snprintf (buf, sizeof (buf), "%s/%s", get_xdir_fs (), "colors.conf");
56
+ GFile *f = g_file_new_for_path(buf);
57
+ GFileMonitor *m =g_file_monitor_file(f, G_FILE_MONITOR_SEND_MOVED, NULL, NULL);
58
+ g_signal_connect(G_OBJECT(m), "changed", G_CALLBACK(colors_changed), 0);
63
=== modified file 'src/fe-gtk/palette.c'
64
--- src/fe-gtk/palette.c 2012-09-30 08:57:19 +0000
65
+++ src/fe-gtk/palette.c 2014-04-28 12:01:50 +0000
69
static int done_alloc = FALSE;
71
+ GdkColormap *cmap = gtk_widget_get_colormap (widget);
73
- if (!done_alloc) /* don't do it again */
77
- cmap = gtk_widget_get_colormap (widget);
78
- for (i = MAX_COL; i >= 0; i--)
79
- gdk_colormap_alloc_color (cmap, &colors[i], FALSE, TRUE);
81
+ gdk_colormap_free_colors(cmap, colors, MAX_COL);
85
+ for (i = MAX_COL; i >= 0; i--)
86
+ gdk_colormap_alloc_color (cmap, &colors[i], FALSE, TRUE);
89
/* maps XChat 2.0.x colors to current */
91
=== modified file 'src/fe-gtk/setup.c'
92
--- src/fe-gtk/setup.c 2008-06-21 23:31:54 +0000
93
+++ src/fe-gtk/setup.c 2014-04-28 12:02:49 +0000
98
+ palette_alloc(gui->window);
99
mg_update_xtext (gui->xtext);
101
if (prefs.style_namelistgad)