1 diff -aurN fbpanel-4.3.orig/panel.c fbpanel-4.3/panel.c
2 --- fbpanel-4.3.orig/panel.c 2005-05-08 09:46:40.000000000 +0200
3 +++ fbpanel-4.3/panel.c 2006-08-20 12:38:19.000000000 +0200
15 static gchar *cfgfile = NULL;
16 +time_t last_config_poll = 0;
18 +/* Array of config files to watch */
19 +GArray *config_files = NULL;
21 static gchar version[] = VERSION;
22 gchar *cprofile = "default";
25 panel_configure_event (GtkWidget *widget, GdkEventConfigure *e, panel *p)
29 + if ((time(NULL) - last_config_poll) > 10)
32 + struct stat cfgstat;
35 + for (i = 0; i < config_files->len; i++)
37 + f = g_array_index(config_files, watched_file, i);
38 + stat(f.filename, &cfgstat);
39 + if (cfgstat.st_mtime > f.mtime)
45 + last_config_poll = time(NULL);
48 if (e->width == p->cw && e->height == p->ch && e->x == p->cx && e->y == p->cy)
52 fp = fopen(fname, "r");
53 LOG(LOG_INFO, " %s %s\n", fname, fp ? "ok" : "no");
57 + f.mtime = time(NULL);
58 + g_array_append_val(config_files, f);
62 //ERR("Can't load %s\n", fname);
65 - /* check private configuration directory */
66 - fname = g_strdup_printf("%s/share/fbpanel/%s", PREFIX, profile);
67 + /* check system-wide configuration directory */
68 + fname = g_strdup_printf("/etc/fbpanel/%s", profile);
69 fp = fopen(fname, "r");
70 LOG(LOG_INFO, " %s %s\n", fname, fp ? "ok" : "no");
74 + f.mtime = time(NULL);
75 + g_array_append_val(config_files, f);
81 signal(SIGUSR1, sig_usr);
87 + for (i = 0; i < config_files->len; i++)
89 + w = g_array_index(config_files, watched_file, i);
92 + g_array_free(config_files, TRUE);
94 + config_files = g_array_new(FALSE, FALSE, sizeof(watched_file));
96 if (!(pfp = open_profile(cprofile)))
99 diff -aurN fbpanel-4.3.orig/panel.h fbpanel-4.3/panel.h
100 --- fbpanel-4.3.orig/panel.h 2005-05-07 12:26:55.000000000 +0200
101 +++ fbpanel-4.3/panel.h 2006-08-20 12:38:19.000000000 +0200
104 extern command commands[];
111 +extern GArray *config_files;
113 extern gchar *cprofile;
115 extern Atom a_UTF8_STRING;
116 diff -aurN fbpanel-4.3.orig/plugin.c fbpanel-4.3/plugin.c
117 --- fbpanel-4.3.orig/plugin.c 2005-05-29 06:02:03.000000000 +0200
118 +++ fbpanel-4.3/plugin.c 2006-08-20 12:38:19.000000000 +0200
120 LOG(LOG_INFO, " %s ... %s\n", str->str, m ? "ok" : "no");
122 DBG("error is %s\n", g_module_error());
123 - g_string_printf(str, "%s/share/fbpanel/plugins/%s.so", PREFIX, type);
124 + g_string_printf(str, "%s/lib/fbpanel/plugins/%s.so", PREFIX, type);
125 m = g_module_open(str->str, G_MODULE_BIND_LAZY);
126 LOG(LOG_INFO, " %s ... %s\n", str->str, m ? "ok" : "no");
128 diff -aurN fbpanel-4.3.orig/plugins/menu.c fbpanel-4.3/plugins/menu.c
129 --- fbpanel-4.3.orig/plugins/menu.c 2005-05-21 06:58:55.000000000 +0200
130 +++ fbpanel-4.3/plugins/menu.c 2006-08-20 12:38:19.000000000 +0200
134 if ((fp = fopen(name, "r"))) {
136 LOG(LOG_INFO, "Including %s\n", name);
137 m->files = g_slist_prepend(m->files, p->fp);
140 + f.mtime = time(NULL);
141 + g_array_append_val(config_files, f);
143 ERR("Can't include %s\n", name);