chiark / gitweb /
Remove CPPery for playlists
authorRichard Kettlewell <rjk@greenend.org.uk>
Thu, 26 Nov 2009 10:56:49 +0000 (10:56 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Thu, 26 Nov 2009 10:56:49 +0000 (10:56 +0000)
disobedience/disobedience.c
disobedience/disobedience.h
disobedience/menu.c
disobedience/playlists.c

index 9b050f4..96bf5c6 100644 (file)
@@ -490,9 +490,7 @@ int main(int argc, char **argv) {
   disorder_eclient_version(client, version_completed, 0);
   event_register("log-connected", check_rtp_address, 0);
   suppress_actions = 0;
-#if PLAYLISTS
   playlists_init();
-#endif
   /* If no password is set yet pop up a login box */
   if(!config->password)
     login_box();
index 001a0b0..11da2c3 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef DISOBEDIENCE_H
 #define DISOBEDIENCE_H
 
-#define PLAYLISTS 1
-
 #include "common.h"
 
 #include <time.h>
@@ -259,7 +257,6 @@ void popup_settings(void);
 
 /* Playlists */
 
-#if PLAYLISTS
 void playlists_init(void);
 void playlist_window_create(gpointer callback_data,
                             guint callback_action,
@@ -269,7 +266,6 @@ extern int nplaylists;
 extern GtkWidget *menu_playlists_widget;
 extern GtkWidget *playlists_menu;
 extern GtkWidget *menu_editplaylists_widget;
-#endif
 
 #endif /* DISOBEDIENCE_H */
 
index 6a265ba..3566745 100644 (file)
 static GtkWidget *selectall_widget;
 static GtkWidget *selectnone_widget;
 static GtkWidget *properties_widget;
-#if PLAYLISTS
 GtkWidget *menu_playlists_widget;
 GtkWidget *playlists_menu;
 GtkWidget *menu_editplaylists_widget;
-#endif
 
 /** @brief Main menu widgets */
 GtkItemFactory *mainmenufactory;
@@ -298,7 +296,6 @@ GtkWidget *menubar(GtkWidget *w) {
       0,                                /* item_type */
       0                                 /* extra_data */
     },
-#if PLAYLISTS
     {
       (char *)"/Edit/Edit playlists",   /* path */
       0,                                /* accelerator */
@@ -307,7 +304,6 @@ GtkWidget *menubar(GtkWidget *w) {
       0,                                /* item_type */
       0                                 /* extra_data */
     },
-#endif
     
     
     {
@@ -350,7 +346,6 @@ GtkWidget *menubar(GtkWidget *w) {
       (char *)"<CheckItem>",            /* item_type */
       0                                 /* extra_data */
     },
-#if PLAYLISTS
     {
       (char *)"/Control/Activate playlist", /* path */
       0,                                /* accelerator */
@@ -359,8 +354,7 @@ GtkWidget *menubar(GtkWidget *w) {
       (char *)"<Branch>",               /* item_type */
       0                                 /* extra_data */
     },
-#endif
-    
+
     {
       (char *)"/Help",                  /* path */
       0,                                /* accelerator */
@@ -404,22 +398,18 @@ GtkWidget *menubar(GtkWidget *w) {
                                                 "<GdisorderMain>/Edit/Deselect all tracks");
   properties_widget = gtk_item_factory_get_widget(mainmenufactory,
                                                  "<GdisorderMain>/Edit/Track properties");
-#if PLAYLISTS
   menu_playlists_widget = gtk_item_factory_get_item(mainmenufactory,
                                                "<GdisorderMain>/Control/Activate playlist");
   playlists_menu = gtk_item_factory_get_widget(mainmenufactory,
                                                "<GdisorderMain>/Control/Activate playlist");
   menu_editplaylists_widget = gtk_item_factory_get_widget(mainmenufactory,
                                                      "<GdisorderMain>/Edit/Edit playlists");
-#endif
   assert(selectall_widget != 0);
   assert(selectnone_widget != 0);
   assert(properties_widget != 0);
-#if PLAYLISTS
   assert(menu_playlists_widget != 0);
   assert(playlists_menu != 0);
   assert(menu_editplaylists_widget != 0);
-#endif
 
   GtkWidget *edit_widget = gtk_item_factory_get_widget(mainmenufactory,
                                                        "<GdisorderMain>/Edit");
index 5c02d8c..c10ef6f 100644 (file)
@@ -40,8 +40,6 @@
 #include "popup.h"
 #include "validity.h"
 
-#if PLAYLISTS
-
 static void playlist_list_received_playlists(void *v,
                                              const char *err,
                                              int nvec, char **vec);
@@ -1312,8 +1310,6 @@ void playlists_init(void) {
   event_register("playlist-modified", playlist_editor_set_buttons, 0);
 }
 
-#endif
-
 /*
 Local Variables:
 c-basic-offset:2