chiark / gitweb /
Set Debian version to 4.0 too
[disorder] / disobedience / choose.c
index aabc215b1e567cdcc87ad617a9a6313853813683..7c37d444ae9f408e462ba62d288e2bff5c4b6231 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
@@ -230,7 +230,6 @@ static void redisplay_tree(const char *why);
 static struct displaydata display_tree(struct choosenode *cn, int x, int y);
 static void undisplay_tree(struct choosenode *cn);
 static void initiate_search(void);
-static void delete_widgets(struct choosenode *cn);
 static void expand_from(struct choosenode *cn);
 static struct choosenode *first_search_result(struct choosenode *cn);
 
@@ -828,17 +827,6 @@ static void prev_clicked(GtkButton attribute((unused)) *button,
 
 /* Display functions ------------------------------------------------------- */
 
-/** @brief Delete all the widgets in the tree */
-static void delete_widgets(struct choosenode *cn) {
-  int n;
-
-  delete_cn_widgets(cn);
-  for(n = 0; n < cn->children.nvec; ++n)
-    delete_widgets(cn->children.vec[n]);
-  cn->flags &= ~(CN_DISPLAYED|CN_SELECTED);
-  files_selected = 0;
-}
-
 /** @brief Update the display */
 static void redisplay_tree(const char *why) {
   struct displaydata d;
@@ -1378,6 +1366,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 +1385,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 +1488,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);
   }