Commit 9c6d6067 authored by Paolo Borelli's avatar Paolo Borelli Committed by Paolo Borelli

restore Higlight Mode menu to the proper sensitivity. update the

2004-03-05  Paolo Borelli  <pborelli@katamail.com>

	* gedit-mdi.c: restore Higlight Mode menu to the proper sensitivity.
	* gedit-gedit-prefs-manager-app.c: update the sensitivity of the
	Higlight Mode menu.
parent 35eddb54
2004-03-05 Paolo Borelli <pborelli@katamail.com>
* gedit-mdi.c: restore Higlight Mode menu to the proper sensitivity.
* gedit-gedit-prefs-manager-app.c: update the sensitivity of the
Higlight Mode menu.
2004-03-05 Paolo Maggi <paolo.maggi@polito.it>
* gedit-file-selector-util.c (analyze_response): fixed bug #136231 (Should
......
......@@ -1420,9 +1420,6 @@ gedit_mdi_set_active_window_verbs_sensitivity (BonoboMDI *mdi)
gedit_menus_set_verb_list_sensitive (ui_component,
gedit_menus_all_sensible_verbs, TRUE);
bonobo_ui_component_set_prop (
ui_component, "/menu/View/HighlightMode", "sensitive", "1", NULL);
if (active_child == NULL)
{
gedit_menus_set_verb_list_sensitive (ui_component,
......@@ -1434,6 +1431,13 @@ gedit_mdi_set_active_window_verbs_sensitivity (BonoboMDI *mdi)
goto end;
}
if (gedit_prefs_manager_get_enable_syntax_highlighting ())
bonobo_ui_component_set_prop (ui_component, "/menu/View/HighlightMode",
"sensitive", "1", NULL);
else
bonobo_ui_component_set_prop (ui_component, "/menu/View/HighlightMode",
"sensitive", "0", NULL);
gedit_menus_set_verb_sensitive (ui_component, "/commands/DocumentsMoveToNewWindow",
(bonobo_mdi_n_children_for_window (active_window) > 1) ? TRUE : FALSE);
......@@ -1502,7 +1506,6 @@ end:
bonobo_ui_component_thaw (ui_component, NULL);
}
static void
gedit_mdi_set_active_window_undo_redo_verbs_sensitivity (BonoboMDI *mdi)
{
......@@ -1636,7 +1639,6 @@ gedit_mdi_hide_output_window_cb (GtkWidget *widget, gpointer user_data)
prefs->output_window_visible);
}
GtkWidget *
gedit_mdi_get_output_window_from_window (BonoboWindow *win)
{
......@@ -1667,8 +1669,6 @@ gedit_mdi_get_output_window_from_window (BonoboWindow *win)
return (r != NULL) ? GTK_WIDGET (r) : NULL;
}
static GeditWindowPrefs *
gedit_window_prefs_new (void)
{
......@@ -1909,7 +1909,6 @@ get_verb_name_for_language (GtkSourceLanguage *lang)
return verb_name;
}
static void
add_languages_menu (BonoboMDI *mdi, BonoboWindow *win)
{
......
......@@ -819,23 +819,21 @@ gedit_prefs_manager_syntax_hl_enable_changed (GConfClient *client,
if (strcmp (entry->key, GPM_SYNTAX_HL_ENABLE) == 0)
{
gboolean enable;
GList *docs;
GList *l;
gboolean enable;
if (entry->value->type == GCONF_VALUE_BOOL)
enable = gconf_value_get_bool (entry->value);
enable = gconf_value_get_bool (entry->value);
else
enable = GPM_DEFAULT_SYNTAX_HL_ENABLE;
docs = gedit_get_open_documents ();
l = docs;
while (l != NULL)
{
g_return_if_fail (GTK_IS_SOURCE_BUFFER (l->data));
gtk_source_buffer_set_highlight (GTK_SOURCE_BUFFER (l->data),
enable);
......@@ -843,6 +841,25 @@ gedit_prefs_manager_syntax_hl_enable_changed (GConfClient *client,
}
g_list_free (docs);
/* update the sensitivity of the Higlight Mode menu item */
l = gedit_get_top_windows ();
while (l != NULL)
{
BonoboUIComponent *ui_component;
g_return_if_fail (BONOBO_IS_WINDOW (l->data));
ui_component = bonobo_mdi_get_ui_component_from_window (l->data);
if (enable)
bonobo_ui_component_set_prop (ui_component, "/menu/View/HighlightMode",
"sensitive", "1", NULL);
else
bonobo_ui_component_set_prop (ui_component, "/menu/View/HighlightMode",
"sensitive", "0", NULL);
l = g_list_next (l);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment