diff --git a/src/tilda.c b/src/tilda.c index 50daa470..e2f5eff3 100644 --- a/src/tilda.c +++ b/src/tilda.c @@ -479,9 +479,25 @@ static gint get_instance_number () return i; } +tilda_window *tw = NULL; static void termination_handler (G_GNUC_UNUSED gint signum) { - DEBUG_FUNCTION ("termination_handler"); - gtk_main_quit (); + if(signum==SIGHUP){ + DEBUG_FUNCTION ("reload_handler"); + gint instance=get_instance_number(); + gchar *config_file=get_config_file_name(instance); + DEBUG_FUNCTION (config_file); + config_init (config_file); + const gchar *font=config_getstr ("font"); + tilda_term *tt; + for (int i=0; iterms); i++) { + tt = g_list_nth_data (tw->terms, i); + PangoFontDescription *description = pango_font_description_from_string (font); + vte_terminal_set_font (VTE_TERMINAL(tt->vte_term), description); + } + }else{ + DEBUG_FUNCTION ("termination_handler"); + gtk_main_quit (); + } } /* @@ -530,8 +546,6 @@ int main (int argc, char *argv[]) { DEBUG_FUNCTION ("main"); - tilda_window *tw = NULL; - struct sigaction sa; struct lock_info lock; gboolean need_wizard = FALSE; @@ -610,6 +624,7 @@ int main (int argc, char *argv[]) sigaction (SIGABRT, &sa, NULL); sigaction (SIGTERM, &sa, NULL); sigaction (SIGKILL, &sa, NULL); + sigaction (SIGHUP, &sa, NULL); /* If the config file doesn't exist open up the wizard */ if (access (tw->config_file, R_OK) == -1) @@ -657,4 +672,3 @@ int main (int argc, char *argv[]) return 0; } -