chiark / gitweb /
Don't stomp on choose widhet's submenu's color scheme
[disorder] / disobedience / choose.c
index aabc215b1e567cdcc87ad617a9a6313853813683..6658a45362f6720e5ea717f26f110525089c0417 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder
- * Copyright (C) 2006, 2007 Richard Kettlewell
+ * Copyright (C) 2006-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
@@ -1378,6 +1378,14 @@ static int choose_selectall_sensitive(GtkWidget attribute((unused)) *w) {
   return FALSE;
 }
 
+/** @brief Determine whether the edit menu's select none option should be sensitive
+ *
+ * TODO not implemented,  see also choose_selectnone_activate()
+ */
+static int choose_selectnone_sensitive(GtkWidget attribute((unused)) *w) {
+  return FALSE;
+}
+
 /** @brief Called when the edit menu's properties option is activated */
 static void choose_properties_activate(GtkWidget attribute((unused)) *w) {
   activate_track_properties(0, 0);
@@ -1389,12 +1397,20 @@ static void choose_properties_activate(GtkWidget attribute((unused)) *w) {
 static void choose_selectall_activate(GtkWidget attribute((unused)) *w) {
 }
 
+/** @brief Called when the edit menu's select none option is activated
+ *
+ * TODO not implemented, see choose_selectnone_sensitive() */
+static void choose_selectnone_activate(GtkWidget attribute((unused)) *w) {
+}
+
 /** @brief Main menu callbacks for Choose screen */
 static const struct tabtype tabtype_choose = {
   choose_properties_sensitive,
   choose_selectall_sensitive,
+  choose_selectnone_sensitive,
   choose_properties_activate,
   choose_selectall_activate,
+  choose_selectnone_activate,
 };
 
 /* Public entry points ----------------------------------------------------- */
@@ -1484,27 +1500,23 @@ GtkWidget *choose_widget(void) {
   /* Create the popup menus */
   NW(menu);
   track_menu = gtk_menu_new();
-  gtk_widget_set_style(track_menu, tool_style);
   g_signal_connect(track_menu, "destroy", G_CALLBACK(gtk_widget_destroyed),
                    &track_menu);
   for(n = 0; track_menuitems[n].name; ++n) {
     NW(menu_item);
     track_menuitems[n].w = 
       gtk_menu_item_new_with_label(track_menuitems[n].name);
-    gtk_widget_set_style(track_menuitems[n].w, tool_style);
     gtk_menu_attach(GTK_MENU(track_menu), track_menuitems[n].w,
                     0, 1, n, n + 1);
   }
   NW(menu);
   dir_menu = gtk_menu_new();
-  gtk_widget_set_style(dir_menu, tool_style);
   g_signal_connect(dir_menu, "destroy", G_CALLBACK(gtk_widget_destroyed),
                    &dir_menu);
   for(n = 0; dir_menuitems[n].name; ++n) {
     NW(menu_item);
     dir_menuitems[n].w = 
       gtk_menu_item_new_with_label(dir_menuitems[n].name);
-    gtk_widget_set_style(dir_menuitems[n].w, tool_style);
     gtk_menu_attach(GTK_MENU(dir_menu), dir_menuitems[n].w,
                     0, 1, n, n + 1);
   }