Index: src/profile-editor.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/profile-editor.c,v
retrieving revision 1.36
diff -u -r1.36 profile-editor.c
--- src/profile-editor.c	22 Aug 2002 03:56:53 -0000	1.36
+++ src/profile-editor.c	22 Oct 2002 00:32:42 -0000
@@ -140,7 +140,7 @@
 static void profile_forgotten (TerminalProfile     *profile,
                                GtkWidget           *editor);
 static void profile_changed   (TerminalProfile     *profile,
-                               TerminalSettingMask  mask,
+                               TerminalSettingMask *mask,
                                GtkWidget           *editor);
 
 
@@ -246,101 +246,101 @@
 
 static void
 profile_changed (TerminalProfile          *profile,
-                 TerminalSettingMask       mask,
+                 TerminalSettingMask      *mask,
                  GtkWidget                *editor)
 {
-  if (mask & TERMINAL_SETTING_VISIBLE_NAME)
+  if (mask->visible_name)
     profile_editor_update_visible_name (editor, profile);
 
-  if (mask & TERMINAL_SETTING_ICON)
+  if (mask->icon_file)
     profile_editor_update_icon (editor, profile);
   
-  if (mask & TERMINAL_SETTING_CURSOR_BLINK)
+  if (mask->cursor_blink)
     profile_editor_update_cursor_blink (editor, profile);
 
-  if (mask & TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR)
+  if (mask->default_show_menubar)
     profile_editor_update_default_show_menubar (editor, profile);
 
-  if ((mask & TERMINAL_SETTING_FOREGROUND_COLOR) ||
-      (mask & TERMINAL_SETTING_BACKGROUND_COLOR))
+  if ((mask->foreground_color) ||
+      (mask->background_color))
     {
       profile_editor_update_color_scheme_menu (editor, profile);
       profile_editor_update_color_pickers (editor, profile);
     }
 
-  if (mask & TERMINAL_SETTING_TITLE)
+  if (mask->title)
     profile_editor_update_title (editor, profile);
   
-  if (mask & TERMINAL_SETTING_TITLE_MODE)
+  if (mask->title_mode)
     profile_editor_update_title_mode (editor, profile);
 
-  if (mask & TERMINAL_SETTING_ALLOW_BOLD)
+  if (mask->allow_bold)
     profile_editor_update_allow_bold (editor, profile);
 
-  if (mask & TERMINAL_SETTING_SILENT_BELL)
+  if (mask->silent_bell)
     profile_editor_update_silent_bell (editor, profile);
 
-  if (mask & TERMINAL_SETTING_WORD_CHARS)
+  if (mask->word_chars)
     profile_editor_update_word_chars (editor, profile);
 
-  if (mask & TERMINAL_SETTING_SCROLLBAR_POSITION)
+  if (mask->scrollbar_position)
     profile_editor_update_scrollbar_position (editor, profile);
 
-  if (mask & TERMINAL_SETTING_SCROLLBACK_LINES)
+  if (mask->scrollback_lines)
     profile_editor_update_scrollback_lines (editor, profile);
 
-  if (mask & TERMINAL_SETTING_SCROLL_ON_KEYSTROKE)
+  if (mask->scroll_on_keystroke)
     profile_editor_update_scroll_on_keystroke (editor, profile);
 
-  if (mask & TERMINAL_SETTING_SCROLL_ON_OUTPUT)
+  if (mask->scroll_on_output)
     profile_editor_update_scroll_on_output (editor, profile);
 
-  if (mask & TERMINAL_SETTING_EXIT_ACTION)
+  if (mask->exit_action)
     profile_editor_update_exit_action (editor, profile);
 
-  if (mask & TERMINAL_SETTING_LOGIN_SHELL)
+  if (mask->login_shell)
     profile_editor_update_login_shell (editor, profile);
 
-  if (mask & TERMINAL_SETTING_UPDATE_RECORDS)
+  if (mask->update_records)
     profile_editor_update_update_records (editor, profile);
 
-  if (mask & TERMINAL_SETTING_USE_CUSTOM_COMMAND)
+  if (mask->use_custom_command)
     profile_editor_update_use_custom_command (editor, profile);
 
-  if (mask & TERMINAL_SETTING_CUSTOM_COMMAND)
+  if (mask->custom_command)
     profile_editor_update_custom_command (editor, profile);
 
-  if (mask & TERMINAL_SETTING_PALETTE)
+  if (mask->palette)
     profile_editor_update_palette (editor, profile);
 
-  if (mask & TERMINAL_SETTING_X_FONT)
+  if (mask->x_font)
     profile_editor_update_x_font (editor, profile);
 
-  if (mask & TERMINAL_SETTING_BACKGROUND_TYPE)
+  if (mask->background_type)
     profile_editor_update_background_type (editor, profile);
   
-  if (mask & TERMINAL_SETTING_BACKGROUND_IMAGE)
+  if (mask->background_image_file)
     profile_editor_update_background_image (editor, profile);
 
-  if (mask & TERMINAL_SETTING_SCROLL_BACKGROUND)
+  if (mask->scroll_background)
     profile_editor_update_scroll_background (editor, profile);
 
-  if (mask & TERMINAL_SETTING_BACKGROUND_DARKNESS)
+  if (mask->background_darkness)
     profile_editor_update_background_darkness (editor, profile);
 
-  if (mask & TERMINAL_SETTING_BACKSPACE_BINDING)
+  if (mask->backspace_binding)
     profile_editor_update_backspace_binding (editor, profile);
 
-  if (mask & TERMINAL_SETTING_DELETE_BINDING)
+  if (mask->delete_binding)
     profile_editor_update_delete_binding (editor, profile);
 
-  if (mask & TERMINAL_SETTING_USE_THEME_COLORS)
+  if (mask->use_theme_colors)
     profile_editor_update_use_theme_colors (editor, profile);
     
-  if (mask & TERMINAL_SETTING_USE_SYSTEM_FONT)
+  if (mask->use_system_font)
     profile_editor_update_use_system_font (editor, profile);
 
-  if (mask & TERMINAL_SETTING_FONT)
+  if (mask->font)
     profile_editor_update_font (editor, profile);
   
   profile_editor_update_sensitivity (editor, profile);
@@ -1322,16 +1322,18 @@
 profile_editor_update_sensitivity (GtkWidget       *editor,
                                    TerminalProfile *profile)
 {
-  TerminalSettingMask mask;
-  TerminalSettingMask last_mask;
+  TerminalSettingMask *mask;
   GtkWidget *w;
   
   /* the first time in this function the object data is unset
    * thus the last mask is 0, which means everything is sensitive,
    * which is what we want.
    */
+#if 0
+  TerminalSettingMask last_mask;
   last_mask = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (editor),
                                                   "cached-lock-mask"));
+#endif
   
   mask = terminal_profile_get_locked_settings (profile);
 
@@ -1340,21 +1342,21 @@
    */
   w = profile_editor_get_widget (editor, "custom-command-entry");
   gtk_widget_set_sensitive (w,
-                            !((mask & TERMINAL_SETTING_CUSTOM_COMMAND) ||
+                            !((mask->custom_command) ||
                               !terminal_profile_get_use_custom_command (profile))); 
   if (terminal_profile_get_background_type (profile) == TERMINAL_BACKGROUND_IMAGE)
     {
       w = profile_editor_get_widget (editor, "background-image-fileentry");
-      gtk_widget_set_sensitive (w, !(mask & TERMINAL_SETTING_BACKGROUND_IMAGE));
+      gtk_widget_set_sensitive (w, !(mask->background_image_file));
       w = profile_editor_get_widget (editor, "scroll-background-checkbutton");
-      gtk_widget_set_sensitive (w, !(mask & TERMINAL_SETTING_SCROLL_BACKGROUND));
+      gtk_widget_set_sensitive (w, !(mask->scroll_background));
       w = profile_editor_get_widget (editor, "darken-background-vbox");
-      gtk_widget_set_sensitive (w, !(mask & TERMINAL_SETTING_BACKGROUND_DARKNESS));
+      gtk_widget_set_sensitive (w, !(mask->background_darkness));
     }
   else if (terminal_profile_get_background_type (profile) == TERMINAL_BACKGROUND_TRANSPARENT) 
   {
       w = profile_editor_get_widget (editor, "darken-background-vbox");
-      gtk_widget_set_sensitive (w, !(mask & TERMINAL_SETTING_BACKGROUND_DARKNESS));
+      gtk_widget_set_sensitive (w, !(mask->background_darkness));
       w = profile_editor_get_widget (editor, "background-image-fileentry");
       gtk_widget_set_sensitive (w, FALSE);
       w = profile_editor_get_widget (editor, "scroll-background-checkbutton");
@@ -1374,11 +1376,9 @@
   if (!terminal_profile_get_use_system_font (profile))
     {
       if (terminal_widget_supports_pango_fonts ())
-        set_insensitive (editor, "font-hbox",
-                     mask & TERMINAL_SETTING_FONT);
+        set_insensitive (editor, "font-hbox", mask->font);
       else
-        set_insensitive (editor, "font-hbox",
-                     mask & TERMINAL_SETTING_X_FONT);
+        set_insensitive (editor, "font-hbox", mask->x_font);
     }
   else
     {
@@ -1396,98 +1396,97 @@
   else
     {      
       set_insensitive (editor, "foreground-colorpicker",
-                       mask & TERMINAL_SETTING_FOREGROUND_COLOR);
+                       mask->foreground_color);
       
       set_insensitive (editor, "background-colorpicker",
-                       mask & TERMINAL_SETTING_BACKGROUND_COLOR);
+                       mask->background_color);
       
       set_insensitive (editor, "color-scheme-optionmenu",
-                       (mask & (TERMINAL_SETTING_BACKGROUND_COLOR |
-                                TERMINAL_SETTING_FOREGROUND_COLOR)));
+                       (mask->background_color) ||
+                       (mask->foreground_color));
     }
   
 #if 0 /* uncomment once we've tested the sensitivity code */
   if (mask == last_mask)
     return;
-#endif
-
   g_object_set_data (G_OBJECT (editor), "cached-lock-mask",
                      GINT_TO_POINTER (mask));
+#endif
   
   set_insensitive (editor, "profile-name-entry",
-                   mask & TERMINAL_SETTING_VISIBLE_NAME);
+                   mask->visible_name);
 
   set_insensitive (editor, "profile-icon-entry",
-                   mask & TERMINAL_SETTING_ICON);
+                   mask->icon_file);
   
   set_insensitive (editor, "blink-cursor-checkbutton",
-                   mask & TERMINAL_SETTING_CURSOR_BLINK);
+                   mask->cursor_blink);
 
   set_insensitive (editor, "show-menubar-checkbutton",
-                   mask & TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR);
+                   mask->default_show_menubar);
 
   set_insensitive (editor, "title-entry",
-                   mask & TERMINAL_SETTING_TITLE);
+                   mask->title);
   
   set_insensitive (editor, "title-mode-optionmenu",
-                   mask & TERMINAL_SETTING_TITLE_MODE);
+                   mask->title_mode);
 
   set_insensitive (editor, "allow-bold-checkbutton",
-                   mask & TERMINAL_SETTING_ALLOW_BOLD);
+                   mask->allow_bold);
 
   set_insensitive (editor, "bell-checkbutton",
-                   mask & TERMINAL_SETTING_SILENT_BELL);
+                   mask->silent_bell);
 
   set_insensitive (editor, "word-chars-entry",
-                   mask & TERMINAL_SETTING_WORD_CHARS);
+                   mask->word_chars);
 
   set_insensitive (editor, "scrollbar-position-optionmenu",
-                   mask & TERMINAL_SETTING_SCROLLBAR_POSITION);
+                   mask->scrollbar_position);
 
   set_insensitive (editor, "scrollback-lines-spinbutton",
-                   mask & TERMINAL_SETTING_SCROLLBACK_LINES);
+                   mask->scrollback_lines);
 
   set_insensitive (editor, "scrollback-kilobytes-spinbutton",
-                   mask & TERMINAL_SETTING_SCROLLBACK_LINES);
+                   mask->scrollback_lines);
   
   set_insensitive (editor, "scroll-on-keystroke-checkbutton",
-                   mask & TERMINAL_SETTING_SCROLL_ON_KEYSTROKE);
+                   mask->scroll_on_keystroke);
 
   set_insensitive (editor, "scroll-on-output-checkbutton",
-                   mask & TERMINAL_SETTING_SCROLL_ON_OUTPUT);
+                   mask->scroll_on_output);
 
   set_insensitive (editor, "exit-action-optionmenu",
-                   mask & TERMINAL_SETTING_EXIT_ACTION);
+                   mask->exit_action);
 
   set_insensitive (editor, "login-shell-checkbutton",
-                   mask & TERMINAL_SETTING_LOGIN_SHELL);
+                   mask->login_shell);
 
   set_insensitive (editor, "update-records-checkbutton",
-                   mask & TERMINAL_SETTING_UPDATE_RECORDS);
+                   mask->update_records);
 
   set_insensitive (editor, "use-custom-command-checkbutton",
-                   mask & TERMINAL_SETTING_USE_CUSTOM_COMMAND);
+                   mask->use_custom_command);
 
   set_insensitive (editor, "palette-optionmenu",
-                   mask & TERMINAL_SETTING_PALETTE);
+                   mask->palette);
 
   set_insensitive (editor, "solid-radiobutton",
-                   mask & TERMINAL_SETTING_BACKGROUND_TYPE);
+                   mask->background_type);
   set_insensitive (editor, "image-radiobutton",
-                   mask & TERMINAL_SETTING_BACKGROUND_TYPE);
+                   mask->background_type);
   set_insensitive (editor, "transparent-radiobutton",
-                   mask & TERMINAL_SETTING_BACKGROUND_TYPE);
+                   mask->background_type);
 
   set_insensitive (editor, "backspace-binding-optionmenu",
-                   mask & TERMINAL_SETTING_BACKSPACE_BINDING);
+                   mask->backspace_binding);
   set_insensitive (editor, "delete-binding-optionmenu",
-                   mask & TERMINAL_SETTING_DELETE_BINDING);
+                   mask->delete_binding);
 
   set_insensitive (editor, "use-theme-colors-checkbutton",
-                   mask & TERMINAL_SETTING_USE_THEME_COLORS);
+                   mask->use_theme_colors);
 
   set_insensitive (editor, "system-font-checkbutton",
-                   mask & TERMINAL_SETTING_USE_SYSTEM_FONT);
+                   mask->use_system_font);
 
   
   {
@@ -1498,7 +1497,7 @@
       {
         char *s = g_strdup_printf ("palette-colorpicker-%d", i+1);
 
-        set_insensitive (editor, s, mask & TERMINAL_SETTING_PALETTE);
+        set_insensitive (editor, s, mask->palette);
 
         g_free (s);
 
Index: src/terminal-profile.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-profile.c,v
retrieving revision 1.22
diff -u -r1.22 terminal-profile.c
--- src/terminal-profile.c	5 Jul 2002 03:51:53 -0000	1.22
+++ src/terminal-profile.c	22 Oct 2002 00:32:43 -0000
@@ -75,6 +75,7 @@
   char *profile_dir;
   GConfClient *conf;
   guint notify_id;
+  TerminalSettingMask mask;
   TerminalSettingMask locked;
   /* can't set keys when reporting a key changed,
    * avoids a bunch of pesky signal handler blocks
@@ -214,8 +215,8 @@
 static void update_default_profile       (const char  *name,
                                           gboolean     locked);
 
-static void emit_changed (TerminalProfile    *profile,
-                          TerminalSettingMask mask);
+static void emit_changed (TerminalProfile     *profile,
+                          TerminalSettingMask *mask);
 
 
 static gpointer parent_class;
@@ -257,7 +258,8 @@
   g_return_if_fail (profiles != NULL);
   
   profile->priv = g_new0 (TerminalProfilePrivate, 1);
-  profile->priv->locked = 0;
+  TERMINAL_SETTING_MASK_CLEAR (profile->priv->mask);
+  TERMINAL_SETTING_MASK_CLEAR (profile->priv->locked);
   profile->priv->cursor_blink = FALSE;
   profile->priv->default_show_menubar = TRUE;
   profile->priv->visible_name = g_strdup ("<not named>");
@@ -309,9 +311,8 @@
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (TerminalProfileClass, changed),
                   NULL, NULL,
-                  /* should be VOID__ENUM but I'm lazy */
-                  g_cclosure_marshal_VOID__INT,
-                  G_TYPE_NONE, 1, G_TYPE_INT);
+                  g_cclosure_marshal_VOID__POINTER,
+                  G_TYPE_NONE, 1, G_TYPE_POINTER);
 
   signals[FORGOTTEN] =
     g_signal_new ("forgotten",
@@ -1685,8 +1686,8 @@
 }
 
 static gboolean
-set_palette_string (TerminalProfile *profile,
-                    const char      *candidate_str)
+set_palette (TerminalProfile *profile,
+             const char      *candidate_str)
 {  
   if (candidate_str != NULL)
     {
@@ -1856,538 +1857,115 @@
 void
 terminal_profile_update (TerminalProfile *profile)
 {
-  char *key;
-  gboolean bool_val;
-  char *str_val;
-  int int_val;
-  double float_val;
-  TerminalSettingMask mask;
   TerminalSettingMask locked;
   TerminalSettingMask old_locked;
   
-  mask = 0;
-  locked = 0;
-
-  /* KEY_CURSOR_BLINK */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_CURSOR_BLINK);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  /*   g_print ("cursor blink is now %d\n", bool_val); */
-  if (bool_val != profile->priv->cursor_blink)
-    {
-      mask |= TERMINAL_SETTING_CURSOR_BLINK;
-      profile->priv->cursor_blink = bool_val;
-    }  
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_CURSOR_BLINK;
-  
-  g_free (key);
-
-  /* KEY_DEFAULT_SHOW_MENUBAR */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_DEFAULT_SHOW_MENUBAR);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-
-  if (bool_val != profile->priv->default_show_menubar)
-    {
-      mask |= TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR;
-      profile->priv->default_show_menubar = bool_val;
-    }
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR;
-  
-  g_free (key);
-
-  /* KEY_VISIBLE_NAME */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_VISIBLE_NAME);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_visible_name (profile, str_val))
-    mask |= TERMINAL_SETTING_VISIBLE_NAME;
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_VISIBLE_NAME;
-
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_FOREGROUND_COLOR */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_FOREGROUND_COLOR);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_foreground_color (profile, str_val))
-    mask |= TERMINAL_SETTING_FOREGROUND_COLOR;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_FOREGROUND_COLOR;
-
-  g_free (str_val);
-  g_free (key);
-
-
-  /* KEY_BACKGROUND_COLOR */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_BACKGROUND_COLOR);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_background_color (profile, str_val))
-    mask |= TERMINAL_SETTING_BACKGROUND_COLOR;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_BACKGROUND_COLOR;
-  
-  g_free (str_val);
-  g_free (key);
-
-
-  /* KEY_TITLE */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_TITLE);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_title (profile, str_val))
-    mask |= TERMINAL_SETTING_TITLE;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_TITLE;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_TITLE_MODE */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_TITLE_MODE);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_title_mode (profile, str_val))
-    mask |= TERMINAL_SETTING_TITLE_MODE;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_TITLE_MODE;
-  
-  g_free (str_val);
-  g_free (key);
-
-
-  /* KEY_ALLOW_BOLD */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_ALLOW_BOLD);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->allow_bold)
-    {
-      mask |= TERMINAL_SETTING_ALLOW_BOLD;
-      profile->priv->allow_bold = bool_val;
-    }  
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_ALLOW_BOLD;
-  
-  g_free (key);
-
-  /* KEY_SILENT_BELL */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_SILENT_BELL);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->silent_bell)
-    {
-      mask |= TERMINAL_SETTING_SILENT_BELL;
-      profile->priv->silent_bell = bool_val;
-    }  
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_SILENT_BELL;
-  
-  g_free (key);
-
-  /* KEY_WORD_CHARS */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_WORD_CHARS);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_word_chars (profile, str_val))
-    mask |= TERMINAL_SETTING_WORD_CHARS;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_WORD_CHARS;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_SCROLLBAR_POSITION */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_SCROLLBAR_POSITION);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_scrollbar_position (profile, str_val))
-    mask |= TERMINAL_SETTING_SCROLLBAR_POSITION;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_SCROLLBAR_POSITION;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_SCROLLBACK_LINES */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_SCROLLBACK_LINES);
-  int_val = gconf_client_get_int (profile->priv->conf,
-                                  key, NULL);
-  if (set_scrollback_lines (profile, int_val))
-    mask |= TERMINAL_SETTING_SCROLLBACK_LINES;
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_SCROLL_ON_KEYSTROKE;
-  
-  g_free (key);
-
-  
-  /* KEY_SCROLL_ON_KEYSTROKE */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_SCROLL_ON_KEYSTROKE);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->scroll_on_keystroke)
-    {
-      mask |= TERMINAL_SETTING_SCROLL_ON_KEYSTROKE;
-      profile->priv->scroll_on_keystroke = bool_val;
-    }  
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_SCROLL_ON_KEYSTROKE;
-  
-  g_free (key);
-
-  /* KEY_SCROLL_ON_OUTPUT */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_SCROLL_ON_OUTPUT);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->scroll_on_output)
-    {
-      mask |= TERMINAL_SETTING_SCROLL_ON_OUTPUT;
-      profile->priv->scroll_on_output = bool_val;
-    }  
-
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_SCROLL_ON_OUTPUT;
-  
-  g_free (key);
-
-  /* KEY_EXIT_ACTION */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_EXIT_ACTION);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_exit_action (profile, str_val))
-    mask |= TERMINAL_SETTING_EXIT_ACTION;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_EXIT_ACTION;
-  
-  g_free (str_val);
-  g_free (key);
-  
-  /* KEY_LOGIN_SHELL */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_LOGIN_SHELL);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->login_shell)
-    {
-      mask |= TERMINAL_SETTING_LOGIN_SHELL;
-      profile->priv->login_shell = bool_val;
-    }  
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_LOGIN_SHELL;
-  
-  g_free (key);
-
-  /* KEY_UPDATE_RECORDS */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_UPDATE_RECORDS);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->update_records)
-    {
-      mask |= TERMINAL_SETTING_UPDATE_RECORDS;
-      profile->priv->update_records = bool_val;
-    }  
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_UPDATE_RECORDS;
-  
-  g_free (key);
-
-  /* KEY_USE_CUSTOM_COMMAND */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_USE_CUSTOM_COMMAND);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->use_custom_command)
-    {
-      mask |= TERMINAL_SETTING_USE_CUSTOM_COMMAND;
-      profile->priv->use_custom_command = bool_val;
-    }  
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_USE_CUSTOM_COMMAND;
-  
-  g_free (key);
-
-  /* KEY_CUSTOM_COMMAND */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_CUSTOM_COMMAND);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_custom_command (profile, str_val))
-    mask |= TERMINAL_SETTING_CUSTOM_COMMAND;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_CUSTOM_COMMAND;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_ICON */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_ICON);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_icon_file (profile, str_val))
-    mask |= TERMINAL_SETTING_ICON;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_ICON;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_PALETTE */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_PALETTE);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_palette_string (profile, str_val))
-    mask |= TERMINAL_SETTING_PALETTE;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_PALETTE;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_X_FONT */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_X_FONT);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_x_font (profile, str_val))
-    mask |= TERMINAL_SETTING_X_FONT;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_X_FONT;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_BACKGROUND_TYPE */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_BACKGROUND_TYPE);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_background_type (profile, str_val))
-    mask |= TERMINAL_SETTING_BACKGROUND_TYPE;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_BACKGROUND_TYPE;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_BACKGROUND_IMAGE */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_BACKGROUND_IMAGE);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_background_image_file (profile, str_val))
-    mask |= TERMINAL_SETTING_BACKGROUND_IMAGE;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_BACKGROUND_IMAGE;
-
-  g_free (str_val);
-  g_free (key);
+  TERMINAL_SETTING_MASK_CLEAR (profile->priv->mask);
+  TERMINAL_SETTING_MASK_CLEAR (locked);
 
-  /* KEY_SCROLL_BACKGROUND */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_SCROLL_BACKGROUND);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->scroll_background)
-    {
-      mask |= TERMINAL_SETTING_SCROLL_BACKGROUND;
-      profile->priv->scroll_background = bool_val;
-    }  
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_SCROLL_BACKGROUND;
-  
-  g_free (key);
-
-  /* KEY_BACKGROUND_DARKNESS */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_BACKGROUND_DARKNESS);
-  float_val = gconf_client_get_float (profile->priv->conf,
-                                      key, NULL);
-  if (float_val != profile->priv->background_darkness)
-    {
-      mask |= TERMINAL_SETTING_BACKGROUND_DARKNESS;
-      profile->priv->background_darkness = float_val;
-    }
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_BACKGROUND_DARKNESS;
-  
-  g_free (key);
-  
-  /* KEY_BACKSPACE_BINDING */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_BACKSPACE_BINDING);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_backspace_binding (profile, str_val))
-    mask |= TERMINAL_SETTING_BACKSPACE_BINDING;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_BACKSPACE_BINDING;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_DELETE_BINDING */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_DELETE_BINDING);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
+#define UPDATE_BOOLEAN(KName, FName)                                        \
+{                                                                           \
+  char *key = gconf_concat_dir_and_key (profile->priv->profile_dir, KName); \
+  gboolean val = gconf_client_get_bool (profile->priv->conf, key, NULL);    \
+                                                                            \
+  if (val != profile->priv->FName)                                          \
+    {                                                                       \
+      profile->priv->mask.FName = TRUE;                                     \
+      profile->priv->FName = val;                                           \
+    }                                                                       \
+                                                                            \
+  locked.FName =                                                            \
+    !gconf_client_key_is_writable (profile->priv->conf, key, NULL);         \
+                                                                            \
+  g_free (key);                                                             \
+}
+
+#define UPDATE_INTEGER(KName, FName)                                        \
+{                                                                           \
+  char *key = gconf_concat_dir_and_key (profile->priv->profile_dir, KName); \
+  int val = gconf_client_get_int (profile->priv->conf, key, NULL);          \
+                                                                            \
+  profile->priv->mask.FName = set_##FName (profile, val);                   \
+                                                                            \
+  locked.FName =                                                            \
+    !gconf_client_key_is_writable (profile->priv->conf, key, NULL);         \
+                                                                            \
+  g_free (key);                                                             \
+}
+
+#define UPDATE_FLOAT(KName, FName)                                          \
+{                                                                           \
+  char *key = gconf_concat_dir_and_key (profile->priv->profile_dir, KName); \
+  double val = gconf_client_get_float (profile->priv->conf, key, NULL);     \
+                                                                            \
+  if (val != profile->priv->FName)                                          \
+    {                                                                       \
+      profile->priv->mask.FName = TRUE;                                     \
+      profile->priv->FName = val;                                           \
+    }                                                                       \
+                                                                            \
+  g_free (key);                                                             \
+}
+
+#define UPDATE_STRING(KName, FName)                                         \
+{                                                                           \
+  char *key = gconf_concat_dir_and_key (profile->priv->profile_dir, KName); \
+  char *val = gconf_client_get_string (profile->priv->conf, key, NULL);     \
+                                                                            \
+  profile->priv->mask.FName = set_##FName (profile, val);                   \
+                                                                            \
+  locked.FName =                                                            \
+    !gconf_client_key_is_writable (profile->priv->conf, key, NULL);         \
+                                                                            \
+  g_free (val);                                                             \
+  g_free (key);                                                             \
+}
+
+  UPDATE_BOOLEAN (KEY_CURSOR_BLINK,         cursor_blink);
+  UPDATE_BOOLEAN (KEY_DEFAULT_SHOW_MENUBAR, default_show_menubar);
+  UPDATE_STRING  (KEY_VISIBLE_NAME,         visible_name);
+  UPDATE_STRING  (KEY_FOREGROUND_COLOR,     foreground_color);
+  UPDATE_STRING  (KEY_BACKGROUND_COLOR,     background_color);
+  UPDATE_STRING  (KEY_TITLE,                title);
+  UPDATE_STRING  (KEY_TITLE_MODE,           title_mode);
+  UPDATE_BOOLEAN (KEY_ALLOW_BOLD,           allow_bold);
+  UPDATE_BOOLEAN (KEY_SILENT_BELL,          silent_bell);
+  UPDATE_STRING  (KEY_WORD_CHARS,           word_chars);
+  UPDATE_STRING  (KEY_SCROLLBAR_POSITION,   scrollbar_position);
+  UPDATE_INTEGER (KEY_SCROLLBACK_LINES,     scrollback_lines);
+  UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE,  scroll_on_keystroke);
+  UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT,     scroll_on_output);
+  UPDATE_STRING  (KEY_EXIT_ACTION,          exit_action);
+  UPDATE_BOOLEAN (KEY_LOGIN_SHELL,          login_shell);
+  UPDATE_BOOLEAN (KEY_UPDATE_RECORDS,       update_records);
+  UPDATE_BOOLEAN (KEY_USE_CUSTOM_COMMAND,   use_custom_command);
+  UPDATE_STRING  (KEY_CUSTOM_COMMAND,       custom_command);
+  UPDATE_STRING  (KEY_ICON,                 icon_file);
+  UPDATE_STRING  (KEY_PALETTE,              palette);
+  UPDATE_STRING  (KEY_X_FONT,               x_font);
+  UPDATE_STRING  (KEY_BACKGROUND_TYPE,      background_type);
+  UPDATE_STRING  (KEY_BACKGROUND_IMAGE,     background_image_file);
+  UPDATE_BOOLEAN (KEY_SCROLL_BACKGROUND,    scroll_background);
+  UPDATE_FLOAT   (KEY_BACKGROUND_DARKNESS,  background_darkness);
+  UPDATE_STRING  (KEY_BACKSPACE_BINDING,    backspace_binding);
+  UPDATE_STRING  (KEY_DELETE_BINDING,       delete_binding);
+  UPDATE_BOOLEAN (KEY_USE_THEME_COLORS,     use_theme_colors);
+  UPDATE_BOOLEAN (KEY_USE_SYSTEM_FONT,      use_system_font);
+  UPDATE_STRING  (KEY_FONT,                 font);
+  
+#undef UPDATE_BOOLEAN
+#undef UPDATE_INTEGER
+#undef UPDATE_FLOAT
+#undef UPDATE_STRING
 
-  if (set_delete_binding (profile, str_val))
-    mask |= TERMINAL_SETTING_DELETE_BINDING;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_DELETE_BINDING;
-  
-  g_free (str_val);
-  g_free (key);
-
-  /* KEY_USE_THEME_COLORS */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_USE_THEME_COLORS);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->use_theme_colors)
-    {
-      mask |= TERMINAL_SETTING_USE_THEME_COLORS;
-      profile->priv->use_theme_colors = bool_val;
-    }  
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_USE_THEME_COLORS;
-  
-  g_free (key);
-  
-  /* KEY_USE_SYSTEM_FONT */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_USE_SYSTEM_FONT);
-  bool_val = gconf_client_get_bool (profile->priv->conf,
-                                    key, NULL);
-  if (bool_val != profile->priv->use_system_font)
-    {
-      mask |= TERMINAL_SETTING_USE_SYSTEM_FONT;
-      profile->priv->use_system_font = bool_val;
-    }  
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_USE_SYSTEM_FONT;
-  
-  g_free (key);
-
-  /* KEY_FONT */
-  
-  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
-                                  KEY_FONT);
-  str_val = gconf_client_get_string (profile->priv->conf,
-                                     key, NULL);
-
-  if (set_font (profile, str_val))
-    mask |= TERMINAL_SETTING_FONT;
-  
-  if (!gconf_client_key_is_writable (profile->priv->conf, key, NULL))
-    locked |= TERMINAL_SETTING_FONT;
-  
-  g_free (str_val);
-  g_free (key);
-  
   /* Update state and emit signals */
   
   old_locked = profile->priv->locked;
   profile->priv->locked = locked;
   
-  if (mask != 0 || locked != old_locked)
-    emit_changed (profile, mask);
+  if (!(terminal_setting_mask_is_empty (&profile->priv->mask) &&
+        TERMINAL_SETTING_MASK_EQUAL (locked, old_locked)))
+    emit_changed (profile, &profile->priv->mask);
 }
 
 
@@ -2412,12 +1990,11 @@
   TerminalProfile *profile;
   const char *key;
   GConfValue *val;
-  TerminalSettingMask mask;  
   TerminalSettingMask old_locked;
   
   profile = TERMINAL_PROFILE (user_data);
 
-  mask = 0;
+  TERMINAL_SETTING_MASK_CLEAR (profile->priv->mask);
   old_locked = profile->priv->locked;
 
   val = gconf_entry_get_value (entry);
@@ -2426,470 +2003,111 @@
   
   /*   g_print ("Key '%s' changed\n", key); */
 
-#define UPDATE_LOCKED(flag)                     \
-      if (gconf_entry_get_is_writable (entry))  \
-        profile->priv->locked &= ~(flag);        \
-      else                                      \
-        profile->priv->locked |= (flag);
-  
-  if (strcmp (key, KEY_CURSOR_BLINK) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->cursor_blink)
-        {
-          mask |= TERMINAL_SETTING_CURSOR_BLINK;
-          profile->priv->cursor_blink = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_CURSOR_BLINK);
-    }
-  else if (strcmp (key, KEY_DEFAULT_SHOW_MENUBAR) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->default_show_menubar)
-        {
-          mask |= TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR;
-          profile->priv->default_show_menubar = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR);
-    }
-  else if (strcmp (key, KEY_VISIBLE_NAME) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_visible_name (profile, str_val))
-        mask |= TERMINAL_SETTING_VISIBLE_NAME;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_VISIBLE_NAME);
-    }
-  else if (strcmp (key, KEY_FOREGROUND_COLOR) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_foreground_color (profile, str_val))
-        mask |= TERMINAL_SETTING_FOREGROUND_COLOR;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_FOREGROUND_COLOR);
-    }
-  else if (strcmp (key, KEY_BACKGROUND_COLOR) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_background_color (profile, str_val))
-        mask |= TERMINAL_SETTING_BACKGROUND_COLOR;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_BACKGROUND_COLOR);
-    }
-  else if (strcmp (key, KEY_TITLE) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_title (profile, str_val))
-        mask |= TERMINAL_SETTING_TITLE;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_TITLE);
-    }
-  else if (strcmp (key, KEY_TITLE_MODE) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_title_mode (profile, str_val))
-        mask |= TERMINAL_SETTING_TITLE_MODE;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_TITLE_MODE);
-    }
-  else if (strcmp (key, KEY_ALLOW_BOLD) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
+#define BEGIN_UPDATE if (0) {}
+#define END_UPDATE
 
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->allow_bold)
-        {
-          mask |= TERMINAL_SETTING_ALLOW_BOLD;
-          profile->priv->allow_bold = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_ALLOW_BOLD);
-    }
-  else if (strcmp (key, KEY_SILENT_BELL) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->silent_bell)
-        {
-          mask |= TERMINAL_SETTING_SILENT_BELL;
-          profile->priv->silent_bell = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_SILENT_BELL);
-    }
-  else if (strcmp (key, KEY_WORD_CHARS) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_word_chars (profile, str_val))
-        mask |= TERMINAL_SETTING_WORD_CHARS;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_WORD_CHARS);
-    }
-  else if (strcmp (key, KEY_SCROLLBAR_POSITION) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_scrollbar_position (profile, str_val))
-        mask |= TERMINAL_SETTING_SCROLLBAR_POSITION;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_SCROLLBAR_POSITION);
-    }
-  else if (strcmp (key, KEY_SCROLLBACK_LINES) == 0)
-    {
-      int int_val;
-
-      int_val = profile->priv->scrollback_lines;
-      if (val && val->type == GCONF_VALUE_INT)
-        int_val = gconf_value_get_int (val);
-      
-      if (set_scrollback_lines (profile, int_val))
-        mask |= TERMINAL_SETTING_SCROLLBACK_LINES;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_SCROLLBACK_LINES);
-    }
-  else if (strcmp (key, KEY_SCROLL_ON_KEYSTROKE) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->scroll_on_keystroke)
-        {
-          mask |= TERMINAL_SETTING_SCROLL_ON_KEYSTROKE;
-          profile->priv->scroll_on_keystroke = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_SCROLL_ON_KEYSTROKE);
-    }
-  else if (strcmp (key, KEY_SCROLL_ON_OUTPUT) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->scroll_on_output)
-        {
-          mask |= TERMINAL_SETTING_SCROLL_ON_OUTPUT;
-          profile->priv->scroll_on_output = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_SCROLL_ON_OUTPUT);
-    }  
-  else if (strcmp (key, KEY_EXIT_ACTION) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_exit_action (profile, str_val))
-        mask |= TERMINAL_SETTING_EXIT_ACTION;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_EXIT_ACTION);
-    }
-  else if (strcmp (key, KEY_LOGIN_SHELL) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->login_shell)
-        {
-          mask |= TERMINAL_SETTING_LOGIN_SHELL;
-          profile->priv->login_shell = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_LOGIN_SHELL);
-    }
-  else if (strcmp (key, KEY_UPDATE_RECORDS) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->update_records)
-        {
-          mask |= TERMINAL_SETTING_UPDATE_RECORDS;
-          profile->priv->update_records = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_UPDATE_RECORDS);
-    }
-  else if (strcmp (key, KEY_USE_CUSTOM_COMMAND) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->use_custom_command)
-        {
-          mask |= TERMINAL_SETTING_USE_CUSTOM_COMMAND;
-          profile->priv->use_custom_command = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_USE_CUSTOM_COMMAND);
-    }
-  else if (strcmp (key, KEY_CUSTOM_COMMAND) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_custom_command (profile, str_val))
-        mask |= TERMINAL_SETTING_CUSTOM_COMMAND;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_CUSTOM_COMMAND);
-    }
-  else if (strcmp (key, KEY_ICON) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_icon_file (profile, str_val))
-        mask |= TERMINAL_SETTING_ICON;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_ICON);
-    }
-  else if (strcmp (key, KEY_PALETTE) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_palette_string (profile, str_val))
-        mask |= TERMINAL_SETTING_PALETTE;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_PALETTE);
-    }
-  else if (strcmp (key, KEY_X_FONT) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_x_font (profile, str_val))
-        mask |= TERMINAL_SETTING_X_FONT;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_X_FONT);
-    }
-  else if (strcmp (key, KEY_BACKGROUND_TYPE) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_background_type (profile, str_val))
-        mask |= TERMINAL_SETTING_BACKGROUND_TYPE;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_BACKGROUND_TYPE);
-    }
-  else if (strcmp (key, KEY_BACKGROUND_IMAGE) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_background_image_file (profile, str_val))
-        mask |= TERMINAL_SETTING_BACKGROUND_IMAGE;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_BACKGROUND_IMAGE);
-    }
-  else if (strcmp (key, KEY_SCROLL_BACKGROUND) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = FALSE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->scroll_background)
-        {
-          mask |= TERMINAL_SETTING_SCROLL_BACKGROUND;
-          profile->priv->scroll_background = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_SCROLL_BACKGROUND);
-    }
-  else if (strcmp (key, KEY_BACKGROUND_DARKNESS) == 0)
-    {
-      double float_val;
-
-      float_val = 0.5;
-
-      if (val && val->type == GCONF_VALUE_FLOAT)
-        float_val = gconf_value_get_float (val);
-
-      if (float_val != profile->priv->background_darkness)
-        {
-          mask |= TERMINAL_SETTING_BACKGROUND_DARKNESS;
-          profile->priv->background_darkness = float_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_BACKGROUND_DARKNESS);
-    }
-  else if (strcmp (key, KEY_BACKSPACE_BINDING) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_backspace_binding (profile, str_val))
-        mask |= TERMINAL_SETTING_BACKSPACE_BINDING;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_BACKSPACE_BINDING);
-    }
-  else if (strcmp (key, KEY_DELETE_BINDING) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_delete_binding (profile, str_val))
-        mask |= TERMINAL_SETTING_DELETE_BINDING;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_DELETE_BINDING);
-    }
-  else if (strcmp (key, KEY_USE_THEME_COLORS) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = TRUE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->use_theme_colors)
-        {
-          mask |= TERMINAL_SETTING_USE_THEME_COLORS;
-          profile->priv->use_theme_colors = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_USE_THEME_COLORS);
-    }
-  else if (strcmp (key, KEY_USE_SYSTEM_FONT) == 0)
-    {
-      gboolean bool_val;
-
-      bool_val = TRUE;
-
-      if (val && val->type == GCONF_VALUE_BOOL)
-        bool_val = gconf_value_get_bool (val);
-
-      if (bool_val != profile->priv->use_system_font)
-        {
-          mask |= TERMINAL_SETTING_USE_SYSTEM_FONT;
-          profile->priv->use_system_font = bool_val;
-        }
-
-      UPDATE_LOCKED (TERMINAL_SETTING_USE_SYSTEM_FONT);
-    }
-  else if (strcmp (key, KEY_FONT) == 0)
-    {
-      const char *str_val;
-
-      str_val = NULL;
-      if (val && val->type == GCONF_VALUE_STRING)
-        str_val = gconf_value_get_string (val);
-      
-      if (set_font (profile, str_val))
-        mask |= TERMINAL_SETTING_FONT;
-
-      UPDATE_LOCKED (TERMINAL_SETTING_FONT);
-    }
-  
-  if (mask != 0 || old_locked != profile->priv->locked)
-    emit_changed (profile, mask);
+#define UPDATE_BOOLEAN(KName, FName, Preset)                                \
+else if (strcmp (key, KName) == 0)                                          \
+  {                                                                         \
+    gboolean setting = (Preset);                                            \
+                                                                            \
+    if (val && val->type == GCONF_VALUE_BOOL)                               \
+      setting = gconf_value_get_bool (val);                                 \
+                                                                            \
+    if (setting != profile->priv->FName)                                    \
+      {                                                                     \
+        profile->priv->mask.FName = TRUE;                                   \
+        profile->priv->FName = setting;                                     \
+      }                                                                     \
+                                                                            \
+    profile->priv->locked.FName = !gconf_entry_get_is_writable (entry);     \
+  }
+
+#define UPDATE_INTEGER(KName, FName, Preset)                                \
+else if (strcmp (key, KName) == 0)                                          \
+  {                                                                         \
+    int setting = (Preset);                                                 \
+                                                                            \
+    if (val && val->type == GCONF_VALUE_INT)                                \
+      setting = gconf_value_get_int (val);                                  \
+                                                                            \
+    profile->priv->mask.FName = set_##FName (profile, setting);             \
+                                                                            \
+    profile->priv->locked.FName = !gconf_entry_get_is_writable (entry);     \
+  }
+
+#define UPDATE_FLOAT(KName, FName, Preset)                                  \
+else if (strcmp (key, KName) == 0)                                          \
+  {                                                                         \
+    float setting = (Preset);                                               \
+                                                                            \
+    if (val && val->type == GCONF_VALUE_FLOAT)                              \
+      setting = gconf_value_get_float (val);                                \
+                                                                            \
+    if (setting != profile->priv->FName)                                    \
+      {                                                                     \
+        profile->priv->mask.FName = TRUE;                                   \
+        profile->priv->FName = setting;                                     \
+      }                                                                     \
+                                                                            \
+    profile->priv->locked.FName = !gconf_entry_get_is_writable (entry);     \
+  }
+
+#define UPDATE_STRING(KName, FName, Preset)                                 \
+else if (strcmp (key, KName) == 0)                                          \
+  {                                                                         \
+    const char * setting = (Preset);                                        \
+                                                                            \
+    if (val && val->type == GCONF_VALUE_STRING)                             \
+      setting = gconf_value_get_string (val);                               \
+                                                                            \
+    profile->priv->mask.FName = set_##FName (profile, setting);             \
+                                                                            \
+    profile->priv->locked.FName = !gconf_entry_get_is_writable (entry);     \
+  }
+
+  BEGIN_UPDATE
+    UPDATE_BOOLEAN (KEY_CURSOR_BLINK,           cursor_blink,           FALSE)
+    UPDATE_BOOLEAN (KEY_DEFAULT_SHOW_MENUBAR,   default_show_menubar,   FALSE)
+    UPDATE_STRING  (KEY_VISIBLE_NAME,           visible_name,           NULL)
+    UPDATE_STRING  (KEY_FOREGROUND_COLOR,       foreground_color,       NULL)
+    UPDATE_STRING  (KEY_BACKGROUND_COLOR,       background_color,       NULL)
+    UPDATE_STRING  (KEY_TITLE,                  title,                  NULL)
+    UPDATE_STRING  (KEY_TITLE_MODE,             title_mode,             NULL)
+    UPDATE_BOOLEAN (KEY_ALLOW_BOLD,             allow_bold,             FALSE)
+    UPDATE_BOOLEAN (KEY_SILENT_BELL,            silent_bell,            FALSE)
+    UPDATE_STRING  (KEY_WORD_CHARS,             word_chars,             NULL)
+    UPDATE_STRING  (KEY_SCROLLBAR_POSITION,     scrollbar_position,     NULL)
+    UPDATE_INTEGER (KEY_SCROLLBACK_LINES,       scrollback_lines,       profile->priv->scrollback_lines)
+    UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE, 	scroll_on_keystroke,    FALSE)
+    UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT,       scroll_on_output,       FALSE)
+    UPDATE_STRING  (KEY_EXIT_ACTION,            exit_action,            NULL)
+    UPDATE_BOOLEAN (KEY_LOGIN_SHELL,            login_shell,            FALSE)
+    UPDATE_BOOLEAN (KEY_UPDATE_RECORDS,         update_records,         FALSE)
+    UPDATE_BOOLEAN (KEY_USE_CUSTOM_COMMAND,     use_custom_command,     FALSE)
+    UPDATE_STRING  (KEY_CUSTOM_COMMAND,         custom_command,         NULL)
+    UPDATE_STRING  (KEY_ICON,                   icon_file,              NULL)
+    UPDATE_STRING  (KEY_PALETTE,                palette,                NULL)
+    UPDATE_STRING  (KEY_X_FONT,                 x_font,                 NULL)
+    UPDATE_STRING  (KEY_BACKGROUND_TYPE,        background_type,        NULL)
+    UPDATE_STRING  (KEY_BACKGROUND_IMAGE,       background_image_file,  NULL)
+    UPDATE_BOOLEAN (KEY_SCROLL_BACKGROUND,      scroll_background,      FALSE)
+    UPDATE_FLOAT   (KEY_BACKGROUND_DARKNESS,    scroll_background,      0.5)
+    UPDATE_STRING  (KEY_BACKSPACE_BINDING,      backspace_binding,      NULL)
+    UPDATE_STRING  (KEY_DELETE_BINDING,         delete_binding,         NULL)
+    UPDATE_BOOLEAN (KEY_USE_THEME_COLORS,       use_theme_colors,       TRUE)
+    UPDATE_BOOLEAN (KEY_USE_SYSTEM_FONT,        use_system_font,        TRUE)
+    UPDATE_STRING  (KEY_FONT,                   font,                   NULL)
+  END_UPDATE
+  
+#undef UPDATE_BOOLEAN
+#undef UPDATE_INTEGER
+#undef UPDATE_FLOAT
+#undef UPDATE_STRING
+
+  if (!(terminal_setting_mask_is_empty (&profile->priv->mask) &&
+        TERMINAL_SETTING_MASK_EQUAL (old_locked, profile->priv->locked)))
+    emit_changed (profile, &profile->priv->mask);
 }
 
 static void
@@ -2987,7 +2205,8 @@
         {
           TerminalProfile *p = tmp->data;
           
-          emit_changed (p, TERMINAL_SETTING_IS_DEFAULT);
+          p->priv->mask.is_default = TRUE;
+          emit_changed (p, &p->priv->mask);
           tmp = tmp->next;
         }
 
@@ -2996,8 +2215,12 @@
   else if (changed)
     {
       if (old_default)
-        emit_changed (old_default, TERMINAL_SETTING_IS_DEFAULT);
-      emit_changed (profile, TERMINAL_SETTING_IS_DEFAULT);
+        {
+          old_default->priv->mask.is_default = TRUE;
+          emit_changed (old_default, &old_default->priv->mask);
+        }
+      profile->priv->mask.is_default = TRUE;
+      emit_changed (profile, &profile->priv->mask);
     }
 }
 
@@ -3139,10 +2362,10 @@
     }
 }
 
-TerminalSettingMask
+TerminalSettingMask *
 terminal_profile_get_locked_settings (TerminalProfile *profile)
 {
-  return profile->priv->locked;
+  return &profile->priv->locked;
 }
 
 TerminalProfile*
@@ -3200,8 +2423,8 @@
 }
 
 static void
-emit_changed (TerminalProfile    *profile,
-              TerminalSettingMask mask)
+emit_changed (TerminalProfile     *profile,
+              TerminalSettingMask *mask)
 {
   profile->priv->in_notification_count += 1;
   g_signal_emit (G_OBJECT (profile), signals[CHANGED], 0, mask);  
@@ -3832,6 +3055,19 @@
   memcpy (palette, colors, MIN (TERMINAL_PALETTE_SIZE, n_colors) * sizeof (GdkColor));
 
   g_free (colors);
+
+  return TRUE;
+}
+
+gboolean 
+terminal_setting_mask_is_empty(TerminalSettingMask *mask)
+{
+  unsigned *pMask = (unsigned *) mask;
+  unsigned *pEnd = pMask + (sizeof (TerminalSettingMask) / 
+                            sizeof (unsigned));
+
+  while (pMask < pEnd)
+    if (*pMask++) return FALSE;
 
   return TRUE;
 }
Index: src/terminal-profile.h
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-profile.h,v
retrieving revision 1.19
diff -u -r1.19 terminal-profile.h
--- src/terminal-profile.h	5 Jul 2002 03:51:53 -0000	1.19
+++ src/terminal-profile.h	22 Oct 2002 00:32:43 -0000
@@ -31,43 +31,40 @@
 #define CONF_KEYS_PREFIX CONF_PREFIX"/keybindings"
 #define FALLBACK_PROFILE_ID "Default"
 
-typedef enum
+typedef struct _TerminalSettingMask
 {
-  TERMINAL_SETTING_VISIBLE_NAME         = 1 << 0,
-  TERMINAL_SETTING_CURSOR_BLINK         = 1 << 1,
-  TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR = 1 << 2,
-  TERMINAL_SETTING_FOREGROUND_COLOR     = 1 << 3,
-  TERMINAL_SETTING_BACKGROUND_COLOR     = 1 << 4,
-  TERMINAL_SETTING_TITLE                = 1 << 5,
-  TERMINAL_SETTING_TITLE_MODE           = 1 << 6,
-  TERMINAL_SETTING_ALLOW_BOLD           = 1 << 7,
-  TERMINAL_SETTING_SILENT_BELL          = 1 << 8,
-  TERMINAL_SETTING_WORD_CHARS           = 1 << 9,
-  TERMINAL_SETTING_SCROLLBAR_POSITION   = 1 << 10,
-  TERMINAL_SETTING_SCROLLBACK_LINES     = 1 << 11,
-  TERMINAL_SETTING_SCROLL_ON_KEYSTROKE  = 1 << 12,
-  TERMINAL_SETTING_SCROLL_ON_OUTPUT     = 1 << 13,
-  TERMINAL_SETTING_EXIT_ACTION          = 1 << 14,
-  TERMINAL_SETTING_LOGIN_SHELL          = 1 << 15,
-  TERMINAL_SETTING_UPDATE_RECORDS       = 1 << 16,
-  TERMINAL_SETTING_USE_CUSTOM_COMMAND   = 1 << 17,
-  TERMINAL_SETTING_CUSTOM_COMMAND       = 1 << 18,
-  TERMINAL_SETTING_ICON                 = 1 << 19,
-  TERMINAL_SETTING_IS_DEFAULT           = 1 << 20,
-  TERMINAL_SETTING_PALETTE              = 1 << 21,
-  TERMINAL_SETTING_X_FONT               = 1 << 22,
-  TERMINAL_SETTING_BACKGROUND_TYPE      = 1 << 23,
-  TERMINAL_SETTING_BACKGROUND_IMAGE     = 1 << 24,
-  TERMINAL_SETTING_SCROLL_BACKGROUND    = 1 << 25,
-  TERMINAL_SETTING_BACKGROUND_DARKNESS  = 1 << 26,
-  TERMINAL_SETTING_BACKSPACE_BINDING    = 1 << 27,
-  TERMINAL_SETTING_DELETE_BINDING       = 1 << 28,
-  TERMINAL_SETTING_USE_THEME_COLORS     = 1 << 29,
-  TERMINAL_SETTING_USE_SYSTEM_FONT      = 1 << 30,
-  TERMINAL_SETTING_FONT                 = 1 << 31
-
-  /* Out of bits! To add a setting you have to write a bunch of code ;-) */
-  
+  unsigned visible_name:1,
+           cursor_blink:1,
+           default_show_menubar:1,
+           foreground_color:1,
+           background_color:1,
+           title:1,
+           title_mode:1,
+           allow_bold:1,
+           silent_bell:1,
+           word_chars:1,
+           scrollbar_position:1,
+           scrollback_lines:1,
+           scroll_on_keystroke:1,
+           scroll_on_output:1,
+           exit_action:1,
+           login_shell:1,
+           update_records:1,
+           use_custom_command:1,
+           custom_command:1,
+           icon_file:1,
+           is_default:1,
+           palette:1,
+           x_font:1,
+           background_type:1,
+           background_image_file:1,
+           scroll_background:1,
+           background_darkness:1,
+           backspace_binding:1,
+           delete_binding:1,
+           use_theme_colors:1,
+           use_system_font:1,
+           font:1;
 } TerminalSettingMask;
 
 typedef enum
@@ -119,6 +116,9 @@
 #define TERMINAL_IS_PROFILE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_PROFILE))
 #define TERMINAL_PROFILE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_PROFILE, TerminalProfileClass))
 
+#define TERMINAL_SETTING_MASK_CLEAR(mask)  (memset (&mask, 0, sizeof (mask)))
+#define TERMINAL_SETTING_MASK_EQUAL(a, b)  (sizeof (a) == sizeof (b) && 0 == memcmp (&a, &b, sizeof (a)))
+
 typedef struct _TerminalProfile        TerminalProfile;
 typedef struct _TerminalProfileClass   TerminalProfileClass;
 typedef struct _TerminalProfilePrivate TerminalProfilePrivate;
@@ -135,7 +135,7 @@
   GObjectClass parent_class;
 
   void (* changed)   (TerminalProfile           *profile,
-                      TerminalSettingMask        mask);
+                      TerminalSettingMask       *mask);
   void (* forgotten) (TerminalProfile           *profile);
 };
 
@@ -275,7 +275,7 @@
 TerminalProfile* terminal_profile_lookup_by_visible_name (const char      *name);
 void             terminal_profile_forget                 (TerminalProfile *profile);
 
-TerminalSettingMask terminal_profile_get_locked_settings (TerminalProfile *profile);
+TerminalSettingMask* terminal_profile_get_locked_settings (TerminalProfile *profile);
 
 void terminal_profile_update (TerminalProfile *profile);
 
@@ -286,6 +286,8 @@
 void terminal_profile_delete_list (GConfClient *conf,
                                    GList      *list,
                                    GtkWindow  *transient_parent);
+
+gboolean terminal_setting_mask_is_empty(TerminalSettingMask *mask);
 
 extern const GdkColor terminal_palette_linux[TERMINAL_PALETTE_SIZE];
 extern const GdkColor terminal_palette_xterm[TERMINAL_PALETTE_SIZE];
Index: src/terminal-screen.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-screen.c,v
retrieving revision 1.58
diff -u -r1.58 terminal-screen.c
--- src/terminal-screen.c	22 Sep 2002 19:01:13 -0000	1.58
+++ src/terminal-screen.c	22 Oct 2002 00:32:44 -0000
@@ -468,7 +468,7 @@
 
 static void
 profile_changed_callback (TerminalProfile          *profile,
-                          TerminalSettingMask       mask,
+                          TerminalSettingMask      *mask,
                           TerminalScreen           *screen)
 {
   reread_profile (screen);
Index: src/terminal-window.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-window.c,v
retrieving revision 1.60
diff -u -r1.60 terminal-window.c
--- src/terminal-window.c	22 Sep 2002 19:01:13 -0000	1.60
+++ src/terminal-window.c	22 Oct 2002 00:32:44 -0000
@@ -2305,9 +2305,9 @@
 
 
 static void
-default_profile_changed (TerminalProfile    *profile,
-                         TerminalSettingMask mask,
-                         void               *data)
+default_profile_changed (TerminalProfile     *profile,
+                         TerminalSettingMask *mask,
+                         void                *data)
 {
   /* This no longer applies, since our "new window" item
    * is based on the current profile, not the default profile
Index: src/terminal.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal.c,v
retrieving revision 1.46
diff -u -r1.46 terminal.c
--- src/terminal.c	22 Sep 2002 19:03:40 -0000	1.46
+++ src/terminal.c	22 Oct 2002 00:32:45 -0000
@@ -2222,11 +2222,11 @@
 }
 
 static void
-default_profile_changed (TerminalProfile    *profile,
-                         TerminalSettingMask mask,
-                         void               *profile_optionmenu)
+default_profile_changed (TerminalProfile     *profile,
+                         TerminalSettingMask *mask,
+                         void                *profile_optionmenu)
 {
-  if (mask & TERMINAL_SETTING_IS_DEFAULT)
+  if (mask->is_default)
     {
       if (terminal_profile_get_is_default (profile))
         profile_optionmenu_set_selected (GTK_WIDGET (profile_optionmenu),
