chiark / gitweb /
Rearrange crazy control.c logic. No longer are there two widgets per
[disorder] / disobedience / settings.c
index 3450085fdd52607a499211d62dbba360fc3b64d1..83557122943ae688abef258778acef4ffe65ad32 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of Disobedience
- * Copyright (C) 2007 Richard Kettlewell
+ * Copyright (C) 2007, 2008 Richard Kettlewell
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -264,22 +264,13 @@ void load_settings(void) {
   }
 }
 
-/** @brief Callback used by set_tool_colors() */
-static void set_tool_colors_callback(GtkWidget *w,
-                                     gpointer attribute((unused)) data) {
-  set_tool_colors(w);
-}
-
-/** @brief Recursively set tool widget colors */
-void set_tool_colors(GtkWidget *w) {
-  GtkWidget *child;
-
-  gtk_widget_set_style(w, tool_style);
-  if(GTK_IS_CONTAINER(w))
-    gtk_container_foreach(GTK_CONTAINER(w), set_tool_colors_callback, 0);
-  if(GTK_IS_MENU_ITEM(w)
-     && (child = gtk_menu_item_get_submenu(GTK_MENU_ITEM(w))))
-    set_tool_colors(child);
+/** @brief Recursively set tool widget colors
+ *
+ * This is currently unused; the idea was to allow for configurability without
+ * allowing GTK+ to override our use of color, but things seem generally better
+ * without this particular call.
+ */
+void set_tool_colors(GtkWidget attribute((unused)) *w) {
 }
 
 /** @brief Pop up a settings editor widget */
@@ -338,7 +329,7 @@ void popup_settings(void) {
                        1, 1);
     }
   }
-  gtk_container_add(GTK_CONTAINER(settings_window), table);
+  gtk_container_add(GTK_CONTAINER(settings_window), frame_widget(table, NULL));
   gtk_widget_show_all(settings_window);
   /* TODO: save settings
      TODO: web browser