chiark / gitweb /
_eclient_state is more general than _eclient_connected
[disorder] / disobedience / choose.c
index 24aa9f69325ff5d84d687ba8adc2fc9859b9f9b1..cc9f3acdc94efef4419b59370af14ae7d05eeda3 100644 (file)
@@ -48,7 +48,8 @@ struct displaydata {
 };
 
 /* instantiate the node vector type */
-VECTOR_TYPE(nodevector, struct choosenode *, xrealloc)
+
+VECTOR_TYPE(nodevector, struct choosenode *, xrealloc);
 
 struct choosenode {
   struct choosenode *parent;            /* parent node */
@@ -936,7 +937,8 @@ static void activate_properties(GtkMenuItem attribute((unused)) *menuitem,
 }
 
 static gboolean sensitive_play(struct choosenode attribute((unused)) *cn) {
-  return !!files_selected;
+  return (!!files_selected
+          && (disorder_eclient_state(client) & DISORDER_CONNECTED));
 }
 
 #if 0
@@ -946,13 +948,13 @@ static gboolean sensitive_remove(struct choosenode attribute((unused)) *cn) {
 #endif
 
 static gboolean sensitive_properties(struct choosenode attribute((unused)) *cn) {
-  return !!files_selected;
+  return !!files_selected && (disorder_eclient_state(client) & DISORDER_CONNECTED);
 }
 
 /* Main menu plumbing ------------------------------------------------------ */
 
 static int choose_properties_sensitive(GtkWidget attribute((unused)) *w) {
-  return !!files_selected;
+  return !!files_selected && (disorder_eclient_state(client) & DISORDER_CONNECTED);
 }
 
 static int choose_selectall_sensitive(GtkWidget attribute((unused)) *w) {