Do emit "changed" signal

This commit is contained in:
Yevgen Muntyan 2006-11-09 04:59:08 -06:00
parent 4beff880d5
commit a874d189ce
2 changed files with 13 additions and 5 deletions

View File

@ -228,7 +228,17 @@ check_parents (GSList *schemes,
return schemes;
}
void
static void
gtk_source_style_manager_changed (GtkSourceStyleManager *mgr)
{
if (!mgr->priv->need_reload)
{
mgr->priv->need_reload = TRUE;
g_signal_emit (mgr, signals[CHANGED], 0);
}
}
static void
gtk_source_style_manager_reload (GtkSourceStyleManager *mgr)
{
GHashTable *schemes_hash;
@ -281,7 +291,6 @@ gtk_source_style_manager_reload (GtkSourceStyleManager *mgr)
mgr->priv->schemes = schemes;
mgr->priv->need_reload = FALSE;
g_signal_emit (mgr, signals[CHANGED], 0);
}
void
@ -304,7 +313,8 @@ gtk_source_style_manager_set_search_path (GtkSourceStyleManager *mgr,
mgr->priv->dirs = g_slist_prepend (mgr->priv->dirs, g_strdup (path[i]));
mgr->priv->dirs = g_slist_reverse (mgr->priv->dirs);
mgr->priv->need_reload = TRUE;
gtk_source_style_manager_changed (mgr);
}
void

View File

@ -67,8 +67,6 @@ void gtk_source_style_manager_append_search_path (GtkSourceStyleManager *mana
void gtk_source_style_manager_prepend_search_path (GtkSourceStyleManager *manager,
const gchar *path);
void gtk_source_style_manager_reload (GtkSourceStyleManager *manager);
/* Do we need to add a GError? I don't think so, we can print a warning message on the terminal */
gboolean gtk_source_style_manager_add_scheme (GtkSourceStyleManager *manager,
const gchar *filename);