chiark / gitweb /
protogen: The bulk of the eclient code generation.
[disorder] / disobedience / choose-menu.c
index 61943d251fcb81544bb9a88250e22fb15dd7fd6d..b4aa0ce5acf051e510ab660bc9ccc2468a8c5bad 100644 (file)
@@ -29,7 +29,9 @@ static void choose_playchildren_callback(GtkTreeModel *model,
 static void choose_playchildren_received(void *v,
                                          const char *err,
                                          int nvec, char **vec);
-static void choose_playchildren_played(void *v, const char *err);
+static void choose_playchildren_played(void *v,
+                                       const char *err,
+                                       const char *id);
 
 /** @brief Popup menu */
 static GtkWidget *choose_menu;
@@ -116,7 +118,7 @@ static void choose_play_activate(GtkMenuItem attribute((unused)) *item,
                                       choose_gather_selected_files_callback,
                                       v);
   for(int n = 0; n < v->nvec; ++n)
-    disorder_eclient_play(client, v->vec[n], choose_play_completed, 0);
+    disorder_eclient_play(client, choose_play_completed, v->vec[n], 0);
 }
   
 static int choose_properties_sensitive(void *extra) {
@@ -250,11 +252,12 @@ static void choose_playchildren_received(void attribute((unused)) *v,
     return;
   }
   for(int n = 0; n < nvec; ++n)
-    disorder_eclient_play(client, vec[n], choose_playchildren_played, NULL);
+    disorder_eclient_play(client, choose_playchildren_played, vec[n], NULL);
 }
 
 static void choose_playchildren_played(void attribute((unused)) *v,
-                                       const char *err) {
+                                       const char *err,
+                                       const char attribute((unused)) *id) {
   if(err) {
     popup_protocol_error(0, err);
     return;
@@ -265,6 +268,7 @@ static void choose_playchildren_played(void attribute((unused)) *v,
 static struct menuitem choose_menuitems[] = {
   {
     "Play track",
+    GTK_STOCK_MEDIA_PLAY,
     choose_play_activate,
     choose_play_sensitive,
     0,
@@ -272,6 +276,7 @@ static struct menuitem choose_menuitems[] = {
   },
   {
     "Track properties",
+    GTK_STOCK_PROPERTIES,
     choose_properties_activate,
     choose_properties_sensitive,
     0,
@@ -279,6 +284,7 @@ static struct menuitem choose_menuitems[] = {
   },
   {
     "Select children",
+    NULL,
     choose_selectchildren_activate,
     choose_selectchildren_sensitive,
     0,
@@ -286,6 +292,7 @@ static struct menuitem choose_menuitems[] = {
   },
   {
     "Play children",
+    NULL,
     choose_playchildren_activate,
     choose_selectchildren_sensitive,    /* re-use */
     0,
@@ -293,6 +300,7 @@ static struct menuitem choose_menuitems[] = {
   },
   {
     "Deselect all tracks",
+    NULL,
     choose_selectnone_activate,
     choose_selectnone_sensitive,
     0,