]> Dogcows Code - chaz/openbox/blobdiff - plugins/keyboard/keysrc.yacc
free unused paths
[chaz/openbox] / plugins / keyboard / keysrc.yacc
index 8772fa178ad619183cd01fce26df6efacacd0eb7..d779da838464daec914ee6caf555d71c15ccbc90 100644 (file)
@@ -25,8 +25,6 @@ static char *path;
 %token <integer> INTEGER;
 %token <string> STRING
 %token <string> FIELD
-%token <string> EXECUTE
-%token <string> RESTART
 %token <string> DESKTOP
 
 %type <list> fields
@@ -36,10 +34,8 @@ static char *path;
 config:
   | config '\n'
   | config fields FIELD '\n' { addbinding($2, $3, NULL, 0); }
-  | config fields DESKTOP INTEGER '\n' { addbinding($2, $3, NULL, $4); }
-  | config fields RESTART '\n' { addbinding($2, $3, NULL, 0); }
-  | config fields EXECUTE STRING '\n' { addbinding($2, $3, $4, 0); }
-  | config fields RESTART STRING '\n' { addbinding($2, $3, $4, 0); }
+  | config fields FIELD INTEGER '\n' { addbinding($2, $3, NULL, $4); }
+  | config fields FIELD STRING '\n' { addbinding($2, $3, $4, 0); }
   ;
 
 fields:
@@ -90,8 +86,15 @@ static void addbinding(GList *keylist, char *action, char *apath, int num)
     /* these have extra data! */
     if (a->func == action_execute || a->func == action_restart)
         a->data.execute.path = apath;
+    else
+        g_free(apath);
     if (a->func == action_desktop)
         a->data.desktop.desk = (unsigned) num + 1;
+    if (a->func == action_move_relative_horz ||
+        a->func == action_move_relative_vert ||
+        a->func == action_resize_relative_horz ||
+        a->func == action_resize_relative_vert)
+        a->data.relative.delta = num;
 
     if (!kbind(keylist, a)) {
         action_free(a);
This page took 0.02262 seconds and 4 git commands to generate.